[Ffmpeg-devel] surround sound handling

François Revol revol
Fri Aug 18 22:19:57 CEST 2006


> Hi all,
> 
> I was trying to find out whether there was a standardised way
> of handling surround sound in libavcodec, but I wasn't very
> successful. Apart from the number of audio channels which is
> readily available, is there any non-codec-specific way to
> find out about the channel mapping on a decoded signal, and
> also the downmix rules for the material? I'm asking because
> for example AC-3 provides several different possibilities for
> both and I can't figure out how to access this information
> without going into examining private data specific for the
> codec.
> 
> Can anyone providee some insight, or point me to the places
> where I need to look?
> 

For what it's worth, you can have a look at how we do 
it in BeOS and Haiku, though truthfully I never used 
that feature, but it could give ideas for new APIs:

http://www.beclan.org/BeBook/The_Media_Kit/misc_api.html#media_multi_matrix

http://www.beclan.org/BeBook/The_Media_Kit/misc_api.html#multi_media_channels

http://www.beclan.org/BeBook/The_Media_Kit/misc_api.html#media_multi_audio_info

http://svn.berlios.de/viewcvs/haiku/haiku/trunk/headers/os/media/MediaDefs.h?rev=17458&view=markup

As I see it, the B_CHANNEL_* bits define which channels are present,
and the B_MATRIX_* bits identify which channel ordering are possible.

The media_multi_audio_info structure was created and appended later to the media_raw_audio structure historically.

Fran?ois.




More information about the ffmpeg-devel mailing list