After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 496708 - [audioconvert] Should set channel positions when converting to more than 2 channels
[audioconvert] Should set channel positions when converting to more than 2 ch...
Status: RESOLVED INVALID
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-14 11:17 UTC by Sebastian Dröge (slomo)
Modified: 2007-11-14 17:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2007-11-14 11:17:28 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 ;)
Comment 1 Thijs Vermeir 2007-11-14 11:21:46 UTC
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?
Comment 2 Sebastian Dröge (slomo) 2007-11-14 11:32:58 UTC
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...
Comment 3 Tim-Philipp Müller 2007-11-14 11:40:10 UTC
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.

Comment 4 Sebastian Dröge (slomo) 2007-11-14 16:59:57 UTC
Ok, turns out that it's actually fixed in CVS and I used a too old checkout last time I tried it :)