[Bug 793763] New: rtpopuspay does not honour 'stereo' prop
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Fri Feb 23 17:26:11 UTC 2018
https://bugzilla.gnome.org/show_bug.cgi?id=793763
Bug ID: 793763
Summary: rtpopuspay does not honour 'stereo' prop
Classification: Platform
Product: GStreamer
Version: 1.x
OS: Linux
Status: NEW
Severity: normal
Priority: Normal
Component: gst-plugins-good
Assignee: gstreamer-bugs at lists.freedesktop.org
Reporter: dwmw2 at infradead.org
QA Contact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
GST_DEBUG=3 GST_DEBUG_DUMP_DOT_DIR=/tmp gst-launch-1.0 pulsesrc ! opusenc !
rtpopuspay !
"application/x-rtp,media=audio,encoding-name=OPUS,stereo=(string)1" ! filesink
location=/dev/null
Look at resulting graph; the opusenc is actually taking 1-channel audio.
This makes it "work":
--- a/gst/rtp/gstrtpopuspay.c
+++ b/gst/rtp/gstrtpopuspay.c
@@ -254,14 +254,14 @@ gst_rtp_opus_pay_getcaps (GstRTPBasePayload * payload,
GstCaps *caps2 = gst_caps_copy (caps);
gst_caps_set_simple (caps, "channels", G_TYPE_INT, 2, NULL);
- gst_caps_set_simple (caps2, "channels", G_TYPE_INT, 1, NULL);
- caps = gst_caps_merge (caps, caps2);
+// gst_caps_set_simple (caps2, "channels", G_TYPE_INT, 1, NULL);
+// caps = gst_caps_merge (caps, caps2);
} else if (!strcmp (stereo, "0")) {
GstCaps *caps2 = gst_caps_copy (caps);
gst_caps_set_simple (caps, "channels", G_TYPE_INT, 1, NULL);
- gst_caps_set_simple (caps2, "channels", G_TYPE_INT, 2, NULL);
- caps = gst_caps_merge (caps, caps2);
+// gst_caps_set_simple (caps2, "channels", G_TYPE_INT, 2, NULL);
+// caps = gst_caps_merge (caps, caps2);
}
}
gst_caps_unref (peercaps);
However that isn't quite right because 'stereo=1' is supposed to be a *hint*.
It's supposed to *allow* mono audio if it really has to, but I'd like it to
make *some* attempt to do as it's asked. It looks like reordering the
channels=[1,2] vs. channels=[2,1] options is expected to do that? It doesn't
seem to work.
FWIW I saw this in a Farstream conference the other way round: I was setting
'stereo=0' and still actually getting stereo because the "hint" wasn't
honoured.
--
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