[Bug 761588] opusdec: no mono/stereo channel conversion

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Feb 16 10:34:23 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=761588

--- Comment #7 from Vincent Penquerc'h <vincent.penquerch at collabora.co.uk> ---
(In reply to Sebastian Dröge (slomo) from comment #6)
> Review of attachment 320728 [details] [review]:
> 
> ::: ext/opus/gstopusdec.c
> @@ +239,2 @@
>      caps = gst_caps_truncate (caps);
>      caps = gst_caps_make_writable (caps);
> 
> If I see this correctly, we would now also allow outputting stereo for 5.1
> input and the other way around?

This will fail negotiation due to different number of channels, as there's just
a special case to allow 1 and 2 together. I think all conversions may be legal,
in which case, we might just remove that special case and look at how some
other such element does. I'm pretty sure there's an element that does channel
duplication already which I could copy the logic from.

> @@ +841,3 @@
> +      GstStructure *s = gst_caps_get_structure (filter, n);
> +      if (gst_structure_get_int (s, "channels", &channels)) {
> +        if (channels == 1 || channels == 2) {
> 
> Even without a filter something can be done here. In the resulting caps we
> should be able to set channels to [1,2] too even if downstream only supports
> one of the two (as we can convert in the decoder)

Do you have a test case I can use to make sure this works (getting a call
without a filter) ?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list