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 708633 - audiomixer: Should not take channel mask in consideration when in mono or stereo
audiomixer: Should not take channel mask in consideration when in mono or stereo
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: git master
Assigned To: Mathieu Duponchelle
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-09-23 14:57 UTC by Mathieu Duponchelle
Modified: 2018-11-03 11:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fixes the reported issue (3.02 KB, patch)
2013-09-23 14:57 UTC, Mathieu Duponchelle
needs-work Details | Review
Review fixes. (2.93 KB, patch)
2013-09-23 15:47 UTC, Mathieu Duponchelle
none Details | Review
This patch makes sure we remove the channel mask even if the "channels" field is a range or a list. (3.04 KB, patch)
2013-09-23 20:03 UTC, Mathieu Duponchelle
committed Details | Review

Description Mathieu Duponchelle 2013-09-23 14:57:31 UTC
Created attachment 255577 [details] [review]
fixes the reported issue

It can cause negotiation to fail.
Comment 1 Sebastian Dröge (slomo) 2013-09-23 15:09:07 UTC
Review of attachment 255577 [details] [review]:

::: gst/adder/gstadder.c
@@ +293,3 @@
+
+    s = gst_caps_get_structure (result, i);
+    if (gst_structure_get_int (s, "channels", &channels))

This could be a range or list, not necessarily an int

@@ +348,3 @@
+
+  n = gst_caps_get_size (caps);
+  for (i = 0; i < n; i++) {

In setcaps the size should always be 1, no?

@@ +352,3 @@
+
+    s = gst_caps_get_structure (caps, i);
+    if (gst_structure_get_int (s, "channels", &channels))

And here it should be always an int
Comment 2 Sebastian Dröge (slomo) 2013-09-23 15:10:21 UTC
And with 2 channels the channel mask is important, only with 1 channel it can be omitted (=> mono).
Comment 3 Mathieu Duponchelle 2013-09-23 15:47:12 UTC
Created attachment 255582 [details] [review]
Review fixes.

> This could be a range or list, not necessarily an int

I think if it's a range we can assume channel-mask should either not be set or not matter here ?

> In setcaps the size should always be 1, no?

True, fixed

> And here it should be always an int

OK, but may'be it's still better to check in case it hasn't been set at all ? I know channels is mandatory but some elements might not respect it ?
Comment 4 Olivier Crête 2013-09-23 19:43:34 UTC
Shouldn't gst_audio_info_from_caps just ignore the channel mask if the channels={1,2} ? For the setcaps part ?
Comment 5 Mathieu Duponchelle 2013-09-23 19:45:32 UTC
I think audio_info_is_equal could ignore it in fact, but that's a more intrusive change than the one proposed in my opinion, not sure we want to do that just before release.
Comment 6 Mathieu Duponchelle 2013-09-23 20:03:09 UTC
Created attachment 255592 [details] [review]
This patch makes sure we remove the channel mask even if the "channels" field is a range or a list.
Comment 7 Olivier Crête 2013-09-23 20:18:54 UTC
Review of attachment 255592 [details] [review]:

Looks good to me
Comment 8 Sebastian Dröge (slomo) 2013-09-24 08:24:37 UTC
After 1.2.0
Comment 9 Sebastian Dröge (slomo) 2013-09-28 11:33:25 UTC
commit f330c014121590a5fad01fd06aef1273812b3315
Author: MathieuDuponchelle <mathieu.duponchelle@epitech.eu>
Date:   Sun Sep 15 21:48:43 2013 +0200

    adder: Don't take channel mask in consideration in mono or stereo
    
    This could cause negotiation to fail.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708633
Comment 10 Sebastian Dröge (slomo) 2013-09-30 08:43:04 UTC
Actually this is not correct AFAIU. This would allow mixing two or one channels that are not stereo or mono (i.e. just the rear right channel) with mono.
Comment 11 Tim-Philipp Müller 2016-09-25 15:27:54 UTC
Mathieu, would have been nice if you had followed up on this...

After 3 years it probably doesn't make sense to revert this anymore now, so let's just close this again and point anyone to audiomixer.
Comment 12 Tim-Philipp Müller 2016-09-26 12:07:27 UTC
Same code was used in audiomixer apparently, so re-open and retitle, since it seems more likely anyone is going to look at that for audiomixer.

Test case would probably be helpful.
Comment 13 Edward Hervey 2018-11-01 16:27:27 UTC
Automated removal of (bad) usage of the "NONE" target milestone.
Comment 14 GStreamer system administrator 2018-11-03 11:26:03 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/90.