[NUT-devel] Patch for info frames

Oded Shimon ods15 at ods15.dyndns.org
Sat Feb 25 20:42:22 CET 2006


On Sat, Feb 25, 2006 at 02:29:52PM -0500, Rich Felker wrote:
> On Sat, Feb 25, 2006 at 09:03:49PM +0200, Oded Shimon wrote:
> > +If an info stream contains an info frame for chapter X then it MUST contain
> > +an info frame with pts==chapter_start
>
> 1. If chapter_start is coded, then a copy of the info frame must
>    appear at the timestamp coded in chapter_start.

10l to Rich.

> 2. No frame with a different chapter_id (or EOR) may appear between
>    chapter_start and chapter_start+len.

I'm OK with that. Michael?

> With the addition of these constraints, it's always possible to decode
> with the stream-style behavior, but when chapter_len is known it
> provides extra information in advance (and may improve error
> recovery in case a frame is lost).
> 
> BTW, one more thing: chapter_start==0 is a weird way to omit the field
> since 0 is also a valid pts. 0 is not a valid value for chapter_start
> unless pts==0 as well, so this may be ok, but there may be problems if
> a packet is lost.. What about just always requiring chapter_start to
> be coded (and equal to the pts of the first copy) and making
> chapter_len the only optional field?

chapter_start never implicit, chapter_len zero means implicit. OK.

- ods15
-------------- next part --------------
Index: DOCS/tech/mpcf.txt
===================================================================
RCS file: /cvsroot/mplayer/main/DOCS/tech/mpcf.txt,v
retrieving revision 1.113
diff -u -r1.113 mpcf.txt
--- DOCS/tech/mpcf.txt	25 Feb 2006 18:51:46 -0000	1.113
+++ DOCS/tech/mpcf.txt	25 Feb 2006 19:41:12 -0000
@@ -640,6 +640,9 @@
 
 chapter_len
     Length of chapter in same timebase of chapter_start.
+    In info streams, if chapter_len is zero, chapter_len is the pts of
+    the first EOR or info frame with a different chapter_id in the same
+    info stream, minus chapter_start.
 
 type
     for example: "UTF8" -> string or "JPEG" -> JPEG image
@@ -741,6 +744,18 @@
 
 Info frames can be used to describe the file or some part of it (chapters)
 
+The pts of an info frame MUST be >=chapter_start and <=chapter_start+len
+(Compared using compare_ts)
+
+Info frames with a different chapter_id (or EOR) MUST NOT appear between
+chapter_start and chapter_start+len. For overlapping chapters several info
+streams can be used.
+
+If an info stream contains an info frame for chapter X then it MUST contain
+an info frame with pts==chapter_start. Due to this restriction, the only
+legal timebase for chapter_start (and chapter_len) is the info stream
+timebase.
+
 Info SHOULD be stored in global packets instead of info streams/frames if
 possible, and the amount of data is not large.
 


More information about the NUT-devel mailing list