[NUT-devel] Info Packets

Oded Shimon ods15 at ods15.dyndns.org
Sun Feb 19 13:09:09 CET 2006


On Sun, Feb 19, 2006 at 10:28:39AM +0100, Michael Niedermayer wrote:
> Hi
> 
> Currently info packets are
> list of streams
> list of name/type/value triplets
> 
> i would suggest that we change this to
> first name/type/value is the "name/id" of what is described
> remander is a list of descriptions
> and require that any 2 info packets with the same name/id
> be identical
> 
> one case where the current variant is unclear is
> ChapterId=5
> StartTime=1min
> StopTime=2min
> 
> does this mean Chapter 5 is from 1min to 2min or that the info packet
> describes the time from 1min to 2min of chapter 5?

I don't think you can break down info packets to smaller than chapers...
Also, it's 'ChapterLength', not 'StopTime'...

I'm considering something different - each info packet is prepended with 
stream id/mask and chapter id/mask, and they identify the entire info 
packet.
If we do the chapter mask thing, we might want to bring back the 
"decompress element" you had... Chapters really would need an overflow 
protection, and building a custom v reader is slightly annoying, as they 
come in reverse order... (msb bits first)

Also, if we do do this, I'm wondering if to allow a stream which has 
already been described by an info packet to be described again, only this 
time the mask is different. like:

info packet 1: streams 1,2,3: title-whatever
info packet 2: stream 1: disposition-whatever
info packet 3: stream 2: ...

Same with chapters.

> for my suggestion it would be
> Chapter 5
> ---
> StartTime=1min
> StopTime=2min
> 
> vs.
> TimeSpan 123
> ---
> Chapter=5
> StartTime=1min
> StopTime=2min

I don't like the idea of info packets describing regions smaller than 
chapters, seems complex and unuseful.. describing several chapters at once 
though could be useful, using chapter mask...

> the following is the simplest way to store things i could come up with:
> 
> count                               v
> for(i=0; i<count; i++){
>     x                               v
>     name                            vb
>     if(x==0){
>         type                        vb
>         value                       vb
>     }else if(x==1){
>         type= "UTF-8"
>         value                       vb
>     }else{
>         type= "rational"
>         value.num                   s
>         value.den= x-1
>     }
> }

I like this (the compression)... I'm assuming you still want the stream 
mask in the begginning?..

- ods15




More information about the NUT-devel mailing list