[theora-dev] My issues with ogg and directshow...

Ralph Giles giles at xiph.org
Mon May 10 09:28:03 PDT 2004

On Sat, May 08, 2004 at 04:58:03PM -0400, Timothy B. Terriberry wrote:
> > Ok, so given that the graph has to be built before data is passed
> > downstream, there is a problem. How can the demuxer know what filters to
> > connect to (ie what the streams are) ? The demux needs to read ahead
> enough
> > to find the BOS pages. Now we know how many streams there are. How does
> it
> > know what kind of streams they are ? It has to be able to recognise the
> > capture patterns of every possible codec. So a "codec oblivious" demux
> is
> > already out of the question.
> This is an issue of where the separation line is drawn, not whether or not
> separation can exist. The Ogg abstraction has a richer interaction between
> codec and muxer than the DS framework mandates. But this doesn't prevent
> you from defining an "Ogg codec" interface as a richer instance of the
> general DS codec interface, adding such things as generic functions to
> answer questions like, "Given this initial packet, can you decode this
> stream?" or, "What are the DS media parameters corresponding to this
> complete set of header packets?" or, "What is the time associated with
> this granule position?" The muxer can still rely wholly on the codecs to
> answer these questions, it just needs a richer codec API than the DS
> framework in general has. New codecs can still be added without
> modifications to the demux so long as they implement this extended API.
> And as an aside, please don't use the phrase "granule rate"... it implies,
> incorrectly, than the granule position->time mapping can be accomplished
> by multiplying by a simple scale factor, and this is NOT true in general.
> In particular, it is not true for Theora.

In case anyone's wondering why we keep weirdly asserting this, it's to leave
room for things like the keyframe flag hack in theora. Only granulepos->time
is technically required for seeking, so we're complicating things by storing
extra information where the possibility of time->granulepos would normally be
to make finding keyframes within the Ogg framework easier.

Also, minumum specification has been an Ogg design principle so far, so we've
tried to impose no unnecessary limitation on what can be done with the format.
At least prior to the mux discussion.

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'theora-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.

More information about the Theora-dev mailing list