[vorbis-dev] Quicktime Component

Segher Boessenkool segher at chello.nl
Thu Jul 26 16:20:05 PDT 2001



Kevin Marks wrote:
> 
> At 10:57 PM +0200 7/24/01, Segher Boessenkool wrote:
> >
> >Ooh, seems I forgot b).  In b), I add ogg pages (~4-8kB, that's quite a
> >nice size
> >actually) to the QT stream;  problem is, that sometimes (_very_ sometimes,
> >but it does happen) an ogg page doesn't complete any ogg packets, so I would
> >need the frameDuration trick there as well;  I solved it differently, namely
> >by just concatenating it with the next ogg page (which won't work at the last
> >page of the stream...  so no good solution);  but that way, the decoder needs
> >to chech whether it got one or multiple pages (not too much trouble, really).
> 
> Surely the last page must complete a packet; if not how could you
> decode it (if packet means what I call a frame in QT).

Ogg packet maps to what QuickTime calls a (VBR) sample.

It doesn't _have_ to complete a packet; think "truncated streamed stream"
or something alike.

An Ogg stream (which all Vorbis streams are) is more like an MPEG
system stream than it is like an MPEG audio stream.

> 
> The other advantage of this is that the sample offset and time tables
> in the Movie header won't get so big, which is a consideration, as it
> is held in RAM during play. The danger with VBR codecs with small
> frame durations is that these  tables get much bigger than the saving
> in being VBR (this is why PureVoice still pretends to be CBR in QT).
> 
> >
> >Okay, thanks...  So if I get it correctly, I just add as frameDuration the
> >number of the last pcm sample in the QT 'sample', minus the last in
> >the previous
> >one?
> 
> That sounds right - that way seeking should work.

Regarding what you said about the QT MPEG plugin not needing a MediaHandler
of its own -- either this is false, or it uses its own MediaHandler not
because it needs it, but because it "just wants to"; either way, it uses one.

I think to fully support Ogg in QT I don't even need a MediaHandler, but a
DataHandler. (Because one "frame" (your terminology) doesn't map to one
consecutive range of bytes in a file, in Ogg).

Cheers,

Segher

--- >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 'vorbis-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 Vorbis-dev mailing list