[NUT-devel] Info Packets

Oded Shimon ods15 at ods15.dyndns.org
Mon Feb 20 12:23:16 CET 2006


On Mon, Feb 20, 2006 at 11:55:23AM +0100, Michael Niedermayer wrote:
> On Mon, Feb 20, 2006 at 06:22:34AM +0200, Oded Shimon wrote:
> > On Sun, Feb 19, 2006 at 10:04:21PM +0100, Michael Niedermayer wrote:
> > > and from where do we know the start/stop times of the chapters, iam
> > > strongly against putting all chapter start/stop times in a single packet
> > 
> > I already gave up this, I said so in the other thread...
> > 
> > The idea I have in mind right now is:
> > 
> > packet: streamid=-1, chapterid=1, start=0, len=50, title=bla
> > packet: streamid=-1, chapterid=2, start=50, len=30, title=whatever
> > packet: streamid=-1, chapterid=-1, start=30, len=40, title=...
> > 
> > It's not very different from your idea of identifying packets by stream and 
> > start/stop time... I suppose we can do that... Can you give a spec for how 
> > to code it?
> 
>     stream_plus_1                       v
>     start                               v
>     len                                 v
>     chapterid                           s
>     count                               v
>     for(i=0; i<count; i++{
>         name                            vb
>         value                           s
>         if(value==-1){
>             type= "UTF-8"
>             value                       vb
>         }else if(value==-2){
>             type                        vb
>             value                       vb
>         }else if(value<-2){

              type="rational"

>             value.den= -value-2
>             value.num                   s
>         }

            else {
              type="integer"
          }

right? And if you want an actual negative value, I suppose you use -3 and 
then the negative number...

>     }
> 
> 
> stream_plus_1
>     if zero then the packet applies to all streams
> 
> start/len
>     are in the timebase of stream_plus_1 - 1 or msecs if stream_plus_1=0

some questions...

1. you made chapterid signed, so you DO want the negative chapterid thing?
2. timebase msecs is "bleh" :/
3. what are start,len, and chapterid, if the packet applies globally?


It might be silly, but the idea of using the negative chapters was to NOT 
have the start and len in the "info header" but in the actual info, cause 
for ex. they make no sense if you are talking about a global packet.

ok, how about this idea...

     stream_plus_1                       v
     chapterid                           s
     if (chapterid) {
       start                             v
       len                               v
     }
     count                               v
     ...


Is this OK?

- ods15




More information about the NUT-devel mailing list