[vorbis-dev] Quicktime Component

Segher Boessenkool segher at chello.nl
Tue Jul 24 13:57:15 PDT 2001



Kevin Marks wrote:
> 
> At 1:50 PM +0200 7/24/01, Segher Boessenkool wrote:
> >It isn't -- it is for normal packets.  A packet in Ogg can be fragmented over
> >several ogg pages, so that it won't be continuous in the ogg file, so I either
> >need to a) call AddMediaSampleReference() several times for one packet,
> >so the
> >one ogg packet will be several quicktime samples, so I need to do some tricks
> >with frameDuration, as AddMediaSample() doesn't allow me to use
> >frameDuration=0
> >for the packet fragments before the last.
> 
> Was b) putting the page parsing in the decoder, and adding bigger
> chunks of the file in the importer? This does seem awkward too.

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).

> 
> >But even in mp3 _all_ samples are dependent on the previous ones for decoding?
> >And setting the "this-is-not-a-key-frame" flag on _all_ samples in a stream
> >seems like a bad idea to me (seeking gets horrible?)
> 
> There isn't any such flag for audio. I think the assumption is that

The QT5 API docs doesn't (explicitly) say it's only for video; maybe you
could forward this feedback to the QT documentation people?  Thanks :-)
(The flag I meant is called mediaSampleNotSync, btw).

> the decoder will settle down in a few frames. I'm not close to this
> code so I haven't explored this much, but you may get a slight glitch
> seeking within an MP3 or Qdesgn file for similar reasons.

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?

Argh, I should have cc:'ed qt-api on this discussion.  I will, with any more
questions i'll come up with...

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