GNOME Bugzilla – Bug 496708
[audioconvert] Should set channel positions when converting to more than 2 channels
Last modified: 2007-11-14 17:04:21 UTC
Hi, currently audioconvert doesn't set any channel positions when, for example, converting two channel audio into 5 channels. This causes gst_audio_get_channel_positions() if called from an element after audioconvert to print a g_warning(). audioconvert should probably set the default channel positions if none are specified in the caps it converts to. Example pipeline would be: gst-launch-0.10 audiotestsrc ! audioconvert ! "audio/x-raw-int,channels=5" ! fakesink Might also be that this is just a bug in the pipeline and the capsfilter should instead contain channel positions ;)
It does set the channel positions in the current CVS version... $ gst-launch-0.10 -v audiotestsrc ! audioconvert ! "audio/x-raw-int,channels=5" ! fakesink ... Setting pipeline to PAUSED ... /pipeline0/audiotestsrc0.src: caps = audio/x-raw-float, endianness=(int)1234, width=(int)64, rate=(int)44100, channels=(int)1 Pipeline is PREROLLING ... /pipeline0/audioconvert0.src: caps = audio/x-raw-int, channels=(int)5, width=(int)32, rate=(int)44100, endianness=(int)1234, signed=(boolean)true, depth=(int)32, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER > /pipeline0/audioconvert0.sink: caps = audio/x-raw-float, endianness=(int)1234, width=(int)64, rate=(int)44100, channels=(int)1 /pipeline0/capsfilter0.src: caps = audio/x-raw-int, channels=(int)5, width=(int)32, rate=(int)44100, endianness=(int)1234, signed=(boolean)true, depth=(int)32, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER > /pipeline0/capsfilter0.sink: caps = audio/x-raw-int, channels=(int)5, width=(int)32, rate=(int)44100, endianness=(int)1234, signed=(boolean)true, depth=(int)32, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER > /pipeline0/fakesink0.sink: caps = audio/x-raw-int, channels=(int)5, width=(int)32, rate=(int)44100, endianness=(int)1234, signed=(boolean)true, depth=(int)32, channel-positions=(GstAudioChannelPosition)< GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT, GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT, GST_AUDIO_CHANNEL_POSITION_REAR_LEFT, GST_AUDIO_CHANNEL_POSITION_REAR_RIGHT, GST_AUDIO_CHANNEL_POSITION_FRONT_CENTER > Pipeline is PREROLLED ... ... Can you confirm this?
I'll test again with CVS when I'm back home... but some days ago the problem was there with CVS. Not sure if it was before or after the change that might've fixed this...
This should have been fixed by this commit: 2007-10-31 Tim-Philipp Müller <tim at centricular dot net> * gst/audioconvert/gstaudioconvert.c: (find_suitable_channel_layout), (gst_audio_convert_fixate_channels), (gst_audio_convert_fixate_caps): Preserve channel layout when fixating the number of channels in the output caps, or make sure there's a suitable channel position layout set on the caps if required. Fixes #430677.
Ok, turns out that it's actually fixed in CVS and I used a too old checkout last time I tried it :)