[vorbis-dev] Quicktime Component

Segher Boessenkool segher at chello.nl
Tue Jul 24 04:50:52 PDT 2001



Kevin Marks wrote:
> 
> At 8:14 PM -0400 7/23/01, Nick D'Amato wrote:
> >On 7/23/01 7:52 PM, Segher Boessenkool said:
> >
> >>  I read from the dataref associated with my media, and calculate offsets and
> >>  ogg page size from the ogg page headers.  That seems to work...  although
> >>  QT doesn't seem to like a zero-length in time, non-zero-length in bytes
> >>  sample...  I need some trickery for that (and similar cases).
> >
> >Yea there are some secrets of QT... we have to beat up Apple engineers to
> >get them (sorry Kevin =)
> 
> If this is for codebooks, I told you my suggested workaround there -

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.

> add them as SoundDescriptionExtensions. There isn't a concept of
> inter-sample dependency for audio in QT, so having the codebooks in

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

> magic samples means your file will stop working when edited.
> Try this in QT Player Pro (or another editing-enabled app):
> 
> Import a file. Select the last few seconds. Copy, New, Paste, save as
> self-contained.
> 
> Then try playing the new file. If it doesn't play, you have the
> problem I'm talking about.
> 
> At 7:39 PM -0400 7/23/01, Nick D'Amato wrote:
> >
> >Every time I open it in iTunes, it comes in saying 'song name (converted)'.
> >I guess iTunes will need some changes too.
> 
> That sounds like Mac easy Open doing things behind your back. If you
> don't set the 'import in place' flags, it converts the ogg file to a
> temporary movie file.
> 
> >Right now it comes in the form of an 'sdec' (sound decompressor) and an 'eat
> >' (movie import). So far, I didn't have a need for a  media handler. Do you
> >think I'll need one for additional functionality?
> 
> I would hope not. MP3 didn't need one.

But mp3 packets can't be fragmented.

> 
> >
> >>>  The last thing which I haven't figured out yet, when used in OS X on my
> >>>  iBook, it skips at frequent yet consistent intervals. Almost sounds as
> >>>  though carbonizing it changed the physical bit-size of one of my variables
> >  >> (ie. One byte being perceived as 16 bits or something like this)...
> 
> This is possible - you need to be careful about the packing you
> specify in your headers. The QT headers have big ugly macro blobs at
> each end to make the old structures that have short long short type
> stuff not get padded out to longs by the X compilers. Declaring
> copies of QtT structures in your own headers can make this happen.
> 
> At 2:20 AM +0200 7/24/01, Segher Boessenkool wrote:
> >
> >It wouldn't need the trickery if it would be possible to let the importer
> >"export" packets (i.s.o. pages), but that would mean i'd have to use a
> >media that's not associated with the original file, and that would mean
> >much worse performance.
> 
> Not sure I follow this. Import in place is a good idea from a

That's what I'm doing, yes.

> usability point of view. The trick with SampleDescriptionExtensions
> is that the are in the Movie Header

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