Re: AudioFileComponents
Re: AudioFileComponents
- Subject: Re: AudioFileComponents
- From: Brad Ford <email@hidden>
- Date: Tue, 13 Sep 2005 12:49:44 -0700
On Sep 12, 2005, at 12:53 PM, William Stewart wrote:
So, what's the right way for supporting Ogg File Format for both
Audio and Video Codecs reusing the most?
QuickTime provides an import and export components (eat/spit
components) that are designed to translate a file to/from QT's
movie file format. With these components, you would be able to read/
write ogg files with the QT APIs and applications.
It really depends on what you want, what your common usage scenario
is, the users you want to support, how much time/work you want to
do, etc.
I second what Bill said (sorry if I'm jumping in a little late on
this thread).
It sounds like you're going to need to write the following:
To playback Ogg files:
1) (* REQUIRED*) An Audio Decoder component to decode the vorbis
format (component type 'adec')
2) (* OPTIONAL *) If you want to decode and play back Theora video,
you'll need to write a QuickTime video/image decompressor component
(type 'imdc'), or maybe one has already been written by someone
else. I'm not familiar with theora.
(*REQUIRED* 1 of the following)
3) A QuickTime movie importer component (type 'eat '). This type of
component reads data from a particular file format, parses it, and
creates a QuickTime movie for it in memory.
or
4) If you don't care about video at all, you could go the
AudioFileComponent route instead or 3) (type 'afil')
A QuickTime 'eat ' component will likely take more time to write than
an 'afil' component, if you intend to support the reading of video --
but I would recommend going the 'eat ' route if video is likely to be
encountered.
Things to consider:
If you write an 'eat ' component, apps that use the very high level
QuickTime movie file API's to read files will be able to read Ogg
files for free. In practice, lots of apps use these api's because 1)
they've been around for a very long time, and 2) QuickTime supports
so many formats (3gpp, avi, bmp, dv stream, flc, aif, wav, mp3, caff,
mp4, etc).
If you write an 'afil' component, apps that use the AudioFile api to
read files will get Ogg audio file reading for free. I believe more
and more apps are adopting these all the time.
To write Ogg files:
1) (*REQUIRED*) An Audio Encoder component to encode the vorbis
format from pcm data (component type 'aenc').
2) (* OPTIONAL *) If you want to encode the theora video format,
you'll need to write a QuickTime video/image compressor component
(type 'imco'), or maybe one has already been written by someone else.
(*REQUIRED* 1 of the following)
3) A QuickTime movie exporter component (type 'spit'). This type of
component sources data from a QuickTime movie in memory and writes to
your desired file format.
or
4) If you don't care about video at all, you could go the
AudioFileComponent route instead of 3.
Things to consider:
Same things as above. Note that 'eat ' components are generally
harder to write than 'afil' components for writing native files,
because AudioFileComponents can dictate the audio formats they will
accept and rely on clients to convert the source data to one of those
acceptible formats. 'eat ' components are required to do more work,
as they are passed a movie. If the movie's format is incompatible
with the formats that can be written in your native file format, you
must perform the conversion within your SpitToDataRef() routine, for
instance.
-Brad Ford
QuickTime Engineering
Bill
Thank you,
Francisco Gimeno
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
--
mailto:email@hidden
tel: +1 408 974 4056
______________________________________________________________________
____
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
______________________________________________________________________
____
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden