[NUT-devel] Patch for info packets

Rich Felker dalias at aerifal.cx
Thu Feb 23 21:41:10 CET 2006


On Thu, Feb 23, 2006 at 08:18:32PM +0200, Oded Shimon wrote:
> New patch. One kink left to sort out is info frames. My suggestion for it 
> is to use negative chapter id's..

Is it your intent that negative chapter id's need to be unique?
IMO either type of chapter id makes sense in info frames, but storing
chapters in info frames rather than packets should be discouraged
except for streaming purposes. On the other hand, maybe it's
preferable not to call those divisions chapters at all. I'm not sure.
I'm just motivated partially by the idea that remuxing a stream to a
permenant-storage file could be done without examining or alterring
the info frames other than replacing them by info packets, but maybe
this is a stupid goal.

> Can I commit this patch?

Ask Michael. IMO it's mostly ok. See below.

> +chapter_id
> +    Id of chapter this packet applies to. If zero, packet applies to whole
> +    file. Positive chapter_id's are real chapters and MUST NOT overlap.
> +    Negative chapter_id indicate a sub region of file and not a real
> +    chapter. chapter_id MUST be unique to the region it represents.
> +
> +chapter_start
> +    s= chapter_start % stream_count
> +    timestamp= chapter_start / stream_count
> +    timestamp of start of chapter in timebase of stream 's'.
> +
> +chapter_len
> +    Length of chapter in same timebase of chapter_start.

Maybe this is annoying for players, but I wonder if the timebases
don't need to be allowed to differ to allow exact cutting between any
two frames of the file.

> +    "Cover" (allowed types are "PNG" and "JPEG")
>          image of the (CD, DVD, VHS, ..) cover (preferably PNG or JPEG)

I wouldn't mind removing this and letting people who want it include
it as an extension (X-Cover). I'm hesitant to recommend such a bloated
practice as storing 'attachments' in a NUT file.

> +Info:
> +-----
> +
> +All info packets with the same chapter_id and stream_id are repeated info
> +packets and MUST be binary identical.
> +
> +All info packets MUST appear after main headers at begginning of file, and
> +SHOULD be repeated after all main headers unless they are very large.

OK. This answers the question above.

Rich





More information about the NUT-devel mailing list