[NUT-devel] Re: [MPlayer-cvslog] CVS: main/DOCS/tech mpcf.txt, 1.121, 1.122

Oded Shimon ods15 at ods15.dyndns.org
Sat Mar 4 08:11:28 CET 2006


On Fri, Mar 03, 2006 at 11:33:33PM +0100, Michael Niedermayer CVS wrote:
> CVS change done by Michael Niedermayer CVS
> 
> Update of /cvsroot/mplayer/main/DOCS/tech
> In directory mail:/var2/tmp/cvs-serv7350
> 
> Modified Files:
> 	mpcf.txt 
> Log Message:
> the return of the monolithic index

May I further add...

- ods15
-------------- next part --------------
Index: DOCS/tech/mpcf.txt
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/tech/mpcf.txt,v
retrieving revision 1.123
diff -u -r1.123 mpcf.txt
--- DOCS/tech/mpcf.txt	3 Mar 2006 22:43:49 -0000	1.123
+++ DOCS/tech/mpcf.txt	4 Mar 2006 07:10:11 -0000
@@ -166,6 +166,7 @@
     time_base_denom                     v
     msb_pts_shift                       v
     max_pts_distance                    v
+    max_size                            v
     decode_delay                        v
     reserved                            u(7)
     fixed_fps                           u(1)
@@ -246,6 +247,8 @@
             }
         }
     }
+    reserved_bytes
+    index_ptr                           u(64)
 
 info_packet:
     stream_id_plus1                     v
@@ -288,7 +291,7 @@
 
 file:
     file_id_string
-    while(bytes_left > 8){
+    while(!eof){
         if(next_byte == 'N'){
             startcode                           f(64)
             forward_ptr                         v
@@ -304,7 +307,6 @@
         }else
             frame
     }
-    index_ptr                           u(64)
 
 the structure of a undamaged file should look like the following, but
 demuxers should be flexible and be able to deal with damaged headers so the
@@ -331,7 +333,7 @@
 
 file:
     file_id_string
-    while(bytes_left > 8){
+    while(!eof){
         packet_header, main_header, packet_footer
         reserved_headers
         for(i=0; i<stream_count; i++){
@@ -342,11 +344,10 @@
             packet_header, info_packet, packet_footer
             reserved_headers
         }
-        while(next_code == index_startcode){
+        if(next_code == index_startcode){
             packet_header, index_packet, packet_footer
-            reserved_headers
         }
-        if (bytes_left > 8) while(next_code != main_startcode){
+        if (!eof) while(next_code != main_startcode){
             if(next_code == syncpoint_startcode){
                 packet_header, syncpoint, packet_footer
             }
@@ -354,7 +355,6 @@
             reserved_headers
         }
     }
-    index_ptr                           u(64)
 
 
 Tag description:
@@ -407,6 +407,11 @@
     Note that last_pts is not necessarily the pts of the last frame
     on the same stream, as it is altered by syncpoint timestamps.
 
+max_size
+    max frame size without a checksum after the frameheader.
+    MUST be <=4*max_distance. If stored value is bigger than max_size MUST
+    be set to 4*max_distance .
+
 stream_id
     Stream identifier
     stream_id MUST be < stream_count
@@ -507,7 +512,7 @@
     end presentation time of the final frame.
     An EOR set stream is unset by the first content frames.
     EOR can only be unset in streams with zero decode_delay .
-    has_checksum must be set if the frame is larger then 2*max_distance or its
+    FLAG_CHECKSUM must be set if the frame is larger than max_size or its
     pts differs by more then max_pts_distance from the last frame
 
 stream_id_plus1[frame_code]
@@ -637,8 +642,13 @@
     that EOR. EOR is unset by the first keyframe after it.
 
 index_ptr
-    absolute location in the file of the first byte of the startcode of the 
-    first index packet, or 0 if there is no index
+    Length in bytes of the entire index, from the first byte of the
+    startcode until the last byte of the checksum.
+    Note: A demuxer can use this to find the index when it is written at
+    EOF, as index_ptr will always be 12 bytes before the end of file if
+    there is an index at all. Note that reserved_bytes comes before
+    index_ptr.
+
 
 Info tags:
 ----------
@@ -748,6 +758,8 @@
 
 Note: with realtime streaming, there is no end, so no index there either
 Index MAY only be repeated after main headers.
+If an index is written anywhere in the file, it MUST be written at end of
+file as well.
 
 
 Info:


More information about the NUT-devel mailing list