[openbeosmediakit] Re: Question on new codec API

  • From: "David McPaul" <dmcpaul@xxxxxxxxxxxxxx>
  • To: openbeosmediakit@xxxxxxxxxxxxx
  • Date: Fri, 05 Dec 2003 22:55:17 +1100 EST

> > The GetNextChunk(void *cookie,
> >                             void **chunkBuffer, int32 *chunkSize,
> >                             media_header *mediaHeader)
> > 
> > Method does not supply a streamnumber which makes it difficult to 
> > determine which cookie I need to cast to.
> The idea is that AllocateCookie gets called once for each stream, so
> you can put everything needed for the stream (even it's number)
> into the cookie, and common data into the Reader class itself.

Hmm, I am thinking of a stream as being a stream of audio or video 
Are you thinking of a stream being the file?

> > I think all the methods need to supply this parameter
> > 
> > FreeCookie, GetStreamInfo, Seek.
> We could do that, but do we really need it?
> What exactly are you trying to do?

Well, my AVI reader handles 2 types of streams.  Audio and Video.

So I made a seperate cookie for each type.  Perhaps that was wrong of 
I was expecting that a streamnumber would be supplied so I can 
determine what data to supply (audio or video and from what track).
Also some containers have multiple audio or video tracks so how do I 
determine which one I should be reading in GetNextChunk?


There is no satisfaction in hanging a man who does not object to it
                -- G. B. Shaw

Other related posts: