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 347221 - [audioconvert] channel remapping does not work right
[audioconvert] channel remapping does not work right
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal major
: 0.10.9
Assigned To: Jan Schmidt
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-07-11 13:28 UTC by Tim-Philipp Müller
Modified: 2006-07-11 21:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for audioconvert unit test (4.74 KB, patch)
2006-07-11 13:43 UTC, Tim-Philipp Müller
none Details | Review
fix for core bug (5.99 KB, patch)
2006-07-11 16:53 UTC, Jan Schmidt
none Details | Review

Description Tim-Philipp Müller 2006-07-11 13:28:47 UTC
audioconvert does not seem to be able to re-map channels. I believe the following pipeline should work:

gst-launch-0.10 audioconvert   fakesrc sizetype=2 sizemax=6 ! 'audio/x-raw-int,endianness=1234,signed=(boolean)true,width=16,depth=16,rate=48000,channels=3,channel-positions=(GstAudioChannelPosition)<GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,GST_AUDIO_CHANNEL_POSITION_LFE>' ! audioconvert ! 'audio/x-raw-int,endianness=1234,signed=(boolean)true,width=16,depth=16,rate=48000,channels=3,channel-positions=(GstAudioChannelPosition)<GST_AUDIO_CHANNEL_POSITION_FRONT_RIGHT,GST_AUDIO_CHANNEL_POSITION_FRONT_LEFT,GST_AUDIO_CHANNEL_POSITION_LFE>' ! fakesink -v

(the initial stand-alone audioconvert element is there to make sure the audio channel position enum GType is registered and the filter caps can be parsed).

Yet it fails with a non-negotiated error.

I ran into this in connection with faad and alsa (which can have different channel layouts for 7.1 audio it appears, although I only discovered this after fixing a bug in alsa.c, currently it won't add an 8 channels structure to the detected caps so it gets downmixed to 6 channels even if 8 channel output is allegedly available).
Comment 1 Tim-Philipp Müller 2006-07-11 13:34:36 UTC
FWIW, it doesn't seem to be a regression, or if it is one then it is not a recent one. Same thing happens with audioconvert from -base 0.10.6 through 0.10.8.
Comment 2 Tim-Philipp Müller 2006-07-11 13:43:16 UTC
Created attachment 68773 [details] [review]
patch for audioconvert unit test
Comment 3 Jan Schmidt 2006-07-11 16:53:05 UTC
Created attachment 68779 [details] [review]
fix for core bug

This patch fixes the core bug, which is that GstValueArray comparisons return TRUE for lists of the same length with the values in a different order. The main difference between GstValueList and GstValueArray is the fact that Arrays are meant to be ordered, so I have no idea how the hell this happened.

Patch includes a core test for the bug.
Comment 4 Tim-Philipp Müller 2006-07-11 18:56:43 UTC
*** Bug 346798 has been marked as a duplicate of this bug. ***
Comment 5 Jan Schmidt 2006-07-11 21:09:39 UTC
Both patches committed to CVS:

        * gst/gstvalue.c: (gst_value_compare_list),
        (gst_value_compare_array), (_gst_value_initialize):
        * tests/check/gst/gstvalue.c: (GST_START_TEST):
        Make GstValueArray comparison be order dependent as designed.
        Add checks for value lists and value array comparisons.
        Fixes #347221

        * tests/check/elements/audioconvert.c: (get_float_mc_caps),
        (get_int_mc_caps), (GST_START_TEST), (audioconvert_suite):
          Patch from #347221 adding a test for audioconvert
          channel remappings.