[NUT-devel] Info Packets

Michael Niedermayer michaelni at gmx.at
Mon Feb 20 20:10:42 CET 2006


Hi

On Mon, Feb 20, 2006 at 01:23:16PM +0200, Oded Shimon wrote:
> 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...

yes, its a little bit "compressed" but negative values are like rationals
very rare, at least for the stuff we want to store currently ...


> 
> >     }
> > 
> > 
> > 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?

no but its not a problem, lavf will just ignore chapterId completely and encode
only negative ones


> 2. timebase msecs is "bleh" :/

yes, but it was that way already, my proposal makes it msecs only if the
packet is not for a specific stream which is better then it was ...


> 3. what are start,len, and chapterid, if the packet applies globally?

start=0, chapterid=0, len=length in msec of video or 0 if not known?


[...]
-- 
Michael




More information about the NUT-devel mailing list