GNOME Bugzilla – Bug 151624
Multichannel support
Last modified: 2006-02-09 22:45:50 UTC
The attached patch adds multichannel support to GStreamer. It adds a set of helper functions to the libgstaudio.so plugin which handle obtaining channel lists in a structure, setting channel lists and fixating channels to default values. The last is useful for the generic case, but does not work in specific cases (separating channels over different elements and so on). also, the patch adds support for handling multiple channels to the faad, a52dec, dtsdec, audioscale and alsasink plugins. The multichannel support consists of an enum "channel-positions" that is added to a GstStructure. In 0.8.x, this exists in addition to the channels=X option. channels=1/2 (which implies mono/stereo) don't need this property, all other values do. After 0.8.x, the channels=X property is to be removed in favour of this list. The enums are possible channel positions. Some are mututally exclusive, but the documentation and the helper funtions mostly take care of that. It works for me, but it is somewhat slow during autoplugging. Starting a song in RB takes 5-7 seconds. :-(. Still TODO: volume, audioscale, faac, ffenc_ac3, vorbisenc/dec, several muxers/demuxers (matroska and avi can contain multichannel PCM sound, qt probably too).
Created attachment 31182 [details] [review] First public version of the patch
This patch shows some memory issue (that I'm retracing to inside faad) on decoding. I don't know why, neither do I know if it's a bug in my patch or in faad (I suspect the first).
Created attachment 33709 [details] [review] update Fixed version. Disables all but 16bpp integer audio in the FAAD plugin, it *was* a bug in libfaad. :(. Thankyou, eternity. Working: * faad * a52dec * dtsdec * audioconvert To do: * mad * ffmpeg * vorbisdec The 5.1 matroska file in media/large/ plays fine now. :). Test using "gst-launch gnomevfssrc location=starwars.mkv ! matroskademux .audio_00 ! faad ! audioconvert ! osssink". s/osssink/fakesink/ breaks the whole thing quite badly, I don't handle missing properties yet, I probably should at some point. However, this patch seems a good starting point for more work.
*** Bug 151495 has been marked as a duplicate of this bug. ***
Created attachment 33711 [details] [review] update This one supports vorbis as well, and I think that finishes most of the decoders. Todo: * faac * ffenc_ac3 * mad (maybe?) * matroskademux, maybe avi, qt or mpegdemux (lpcm) * maybe some muxers
What about FLAC?