[NUT-devel] Change flag bits

Oded Shimon ods15 at ods15.dyndns.org
Sat Mar 11 13:59:44 CET 2006


Any objection to this patch? It makes it somewhat easier/nicer to move over 
the stream flags to API, and keep the nut flags in the demuxer...

Also, 128 is low enough for the flags which have no use to be coded in 
frame header, because vlc's can only store up to 127 in a single byte.

Also, the non-stream flags are pushed to top of first byte so they can 
expand towards down while stream flags expand toward up...

(I know, this is all very silly, but I see no reason against any of this, 
the decision between this is almost arbitrary, so might as well go with the 
more convinient direction?)

- ods15
-------------- next part --------------
Index: DOCS/tech/mpcf.txt
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/tech/mpcf.txt,v
retrieving revision 1.139
diff -u -r1.139 mpcf.txt
--- DOCS/tech/mpcf.txt	11 Mar 2006 10:19:02 -0000	1.139
+++ DOCS/tech/mpcf.txt	11 Mar 2006 12:55:57 -0000
@@ -497,14 +497,14 @@
 
 flags[frame_code], frame_flags
     Bit  Name             Description
-      1  FLAG_SIZE_MSB    if set, data_size_msb is at frame header,
-                          otherwise data_size_msb is 0
-      2  FLAG_CHECKSUM    if set then the frame header contains a checksum
-      4  FLAG_KEY         if set, frame is keyframe
-      8  FLAG_EOR         if set, stream has no relevance on
+      1  FLAG_KEY         if set, frame is keyframe
+      2  FLAG_EOR         if set, stream has no relevance on
                           presentation. (EOR)
-    256  FLAG_CODED       if set, coded_flags are stored in the frame header.
-    512  FLAG_INVALID     if set, frame_code is invalid.
+     32  FLAG_SIZE_MSB    if set, data_size_msb is at frame header,
+                          otherwise data_size_msb is 0
+     64  FLAG_CHECKSUM    if set then the frame header contains a checksum
+    128  FLAG_CODED       if set, coded_flags are stored in the frame header.
+    256  FLAG_INVALID     if set, frame_code is invalid.
 
     EOR frames MUST be zero-length and must be set keyframe.
     All streams SHOULD end with EOR, where the pts of the EOR indicates the


More information about the NUT-devel mailing list