Re: AudioFileComponents
Re: AudioFileComponents
- Subject: Re: AudioFileComponents
- From: William Stewart <email@hidden>
- Date: Mon, 12 Sep 2005 16:08:10 -0700
On 12/09/2005, at 12:27 PM, Francisco Gimeno wrote:
Hello,
yes... as its name is "Audio"Codec I wasn't hoping to support video
codec ;). And for Core"Audio" too... But there is no Core"Video"
nor Core"Media".
The Audio Codecs part was really clear for me. As far I know Ogg
supports Vorbis, Speex and FLAC.
but it also support Theora Video Codec. So as I have to write an
"FileComponent" I was wondering if a more generic than
AudioFileComponent exists.
As per my previous email - the generic components are the QT eat/spit
ones that will bring your file format into and out of any application
that uses the QT Movie as a basis for manipulating media.
There's a fundamental difference in philosophy though that I think
should be emphasised. QT's API is all about dealing with
synchronisation - its primary data format is a movie that contains
tracks where each track is potentially a different media type.
An AFC is really operating on files that have a primary role of a
single data stream - for instance, CAF, AIFF, WAV files, etc, are all
files that only contain a single media (audio) stream. Just as we've
written an AFC to deal with MP4 files, you could also do the same for
Ogg files - but with the same restrictions - you could only deal with
a single audio stream (track) from that file and you probably
wouldn't want to open the file with the AFC if it also contained video.
If this common enough - and I think it would be - then that is a
useful component to have. Anyone using the CoreAudio API can then
read and write Ogg files with single audio tracks - just like they
can now read/write MP4 files with single audio tracks. As James said
previously, if these Ogg files have Vorbis, Speex or FLAC data in
them is irrelevant as far as the AFC goes (or should be!) But for a
developer to use them, there would also have to be an AudioCodec each
for Vorbis, Speex and/or FLAC.
Lets take one of these data formats and imagine we have this
available as an AudioCodec. What does that give me? (Lets take FLAC
as the example)
(1) I could read or write a CAF file with FLAC data in it - CAF files
(CoreAudioFormat Files) can take any audio data format
(2) I could read or write a Movie file with FLAC data in it - Movie
files can also contain any audio data format
These will both work with QT 7 (or Tiger) as it is today.
(3) With an Ogg AFC, I could also read or write Ogg files with FLAC data
Of course, we're really talking about 2 components here - 1
AudioCodec would be an 'aenc' - an audio encoder component - this
would transform linear PCM to FLAC - the writing part above. The
other AudioCodec would be an 'adec' - an audio decoder component -
this transforms the FLAC data to linear PCM - the reading part above.
I want to reuse the most ( or to rewrite the less ) code as
possible. So, you say to me there is nothing more generic than
AudioFileComponent for other medias ( maybe this mail should go
into another mailing list ).
No - but you could certainly use the AFC you write say as the part
that reads the audio data from an Ogg file in say the QT movie
importer you write to also deal with Ogg files that have video in
them as well.
Its alot of work though, and you really might want to ask yourself
whether the most important part of this equation is support for the
file format (ogg) or the various data formats (vorbis, flac, etc) -
particularly when those data formats could just as easily go into
other file format containers that have a broader support.
So, I launch now another question. Is there any news on a "Core
Media/Core Video" API? will that support a more Generic
AudioFileComponent?
Yes - QT. We have with QT 7, part support for AudioFileComponents,
but this hasn't been fully implemented as yet in QT - so we can't
have QT use arbitrary AFCs. This is still something that the QT group
is working on for a future release.
Bill
Thx for your fast response,
Francisco Gimeno
AudioCodecs don't support video -- CoreAudio doesn't provide any
API for doing video. Perhaps that was obvious.. But if you wanted
to support for example two different audio codecs in Ogg, then you
would need to return the proper AudioStreamBasicDescription as the
data format with the appropriate 4 char format ID, Then an
AudioCodec that supports that format ID will get instantiated by
an AudioConverter. For example CAF (CoreAudio Format) files can
contain any kind of audio data format for which there is an
AudioCodec.
I have been studying how to impement Ogg Support for MacOsX. I
have though that Ogg File Format should be inside into an
AudioFileComponent, and Vorbis codec in a AudioCodecComponent.
As Ogg supports Video too ( with other VideoCodecs ) I wouldn't
want to implement just another FileComponent for Video ( indeed,
I haven't seen the Doc for it ).
So, what's the right way for supporting Ogg File Format for both
Audio and Video Codecs reusing the most?
_______________________________________________
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
--
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