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

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


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

--- Comment #8 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
(In reply to Vincent Penquerc'h from comment #7)
> (In reply to Sebastian Dröge (slomo) from comment #6)
> > Review of attachment 320728 [details] [review] [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.

I would keep this as a special case for mono/stereo. Let everything else fail
:)

> > @@ +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) ?

Without writing code? No. Do a caps query on the sinkpad without a filter, and
have downstream a capsfilter that accepts only mono or only stereo.

-- 
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