diff options
author | 2004-05-25 20:42:22 +0000 | |
---|---|---|
committer | 2004-05-25 20:42:22 +0000 | |
commit | 8d4d64c9856738024333d863d44bdf5f254026e8 (patch) | |
tree | 89fea10d602d2aaa4dc5e2fe4e8dc27c8827c4f8 /DOCS | |
parent | 082a233476dffee24334b70bedb3ecb21dd9131c (diff) |
remove index flag
max_short_distance
reserved_v -> reserved_count
header repeation rules
some of this is from rich
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12502 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'DOCS')
-rw-r--r-- | DOCS/tech/mpcf.txt | 41 |
1 files changed, 33 insertions, 8 deletions
diff --git a/DOCS/tech/mpcf.txt b/DOCS/tech/mpcf.txt index 6e8ddeb622..23864cf080 100644 --- a/DOCS/tech/mpcf.txt +++ b/DOCS/tech/mpcf.txt @@ -89,6 +89,7 @@ main header: version v stream_count v max_distance v + max_short_distance v global_time_base_nom v global_time_base_denom v short_startcode v @@ -113,7 +114,7 @@ main header: data_size_mul[i]= tmp_mul; data_size_lsb[i]= tmp_size + j; timestamp_delta[i]= tmp_timestamp; - reserved_v[i]= tmp_res; + reserved_count[i]= tmp_res; } } reserved_bytes @@ -132,7 +133,6 @@ stream_header: msb_timestamp_shift v decode_delay v fixed_fps u(1) - index_flag u(1) reserved u(6) for(;;){ codec_specific_data_type v @@ -170,14 +170,13 @@ frame if(flags[frame_code]&1){ data_size_msb v } - for(i=0; i<reserved_v[frame_code]; i++) + for(i=0; i<reserved_count[frame_code]; i++) reserved v data Index: index_startcode f(64) packet header - stream_id v index_length v for(i=0; i<index_length; i++){ index_timestamp v @@ -267,13 +266,25 @@ max_distance there is only a single frame between the 2 frame_startcodes this can be used by the demuxer to detect damaged frame headers if the damage results in a too long chain - SHOULD be set to <=16384 to ensure reasonable error recovery + SHOULD be set to <=32768 or at least <=65536 unless there is a very good + reason to set it higher otherwise reasonable error recovery will be + impossible + +max_short_distance + max distance of short startcodes or frame_startcodes, the distance may + only be larger if there is only a single frame between the 2 + frame_startcodes/short startcodes this can be used by the demuxer to + detect damaged frame headers if the damage results in a too long chain + SHOULD be set to <=4096 or at least <=8192 unless there is a very good + reason to set it higher otherwise reasonable error recovery will be + impossible + short_startcode MUST be 3 bytes long and MUST have 'N' as first byte, the second byte MUST not be a printable uppercase letter / must not be within 65..90, default is 0x4EFE79 - + stream_id Note: streams with a lower relative class MUST have a lower relative id so a stream with class 0 MUST allways have a id which is lower then any @@ -539,11 +550,18 @@ stream_header (id=n) headers may be repated, but if they are then they MUST all be repeated together and repeated headers MUST be identical +headers MAY only repeated at the closest possible positions after 2^x where x is +an integer and the file end, so the headers may be repeated at 4102 if thats the +closest possition after 2^12=4096 at which the headers can be placed -headers MUST be repeated every 10sec at least ? FIXME -headers MUST be repeated BEFORE keyframes +headers MUST be placed at least at the begin of the file and immedeatly before +the index or at the file end if there is no index headers MUST be repeated at least twice (so they exist 3 times in a file) +a demuxer MUST not demux a stream which contains more than one stream, or which +is wrapped in a structure to facilitate more than one stream or otherwise +duplicate the role of a container. any such file is to be considered invalid + Index the index can be repeated but there SHOULD be at least one for each stream at the end @@ -561,6 +579,13 @@ for example, the current song title & artist of the currently shown music video Unknown packets MUST be ignored by the demuxer + demuxer (non-normative) + +in the absence of valid header at beginning, players SHOULD search for backup +headers starting at offset 2^x for each x players SHOULD end their search from a +particular offset when any startcode is found (including syncpoint) + + Sample code (GPL, & untested) typedef BufferContext{ |