diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2015-11-03 14:50:53 +0200 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2016-02-17 14:58:01 +0000 |
commit | 01342378b56fe7445ae8292139aba93bab65cec3 (patch) | |
tree | f4b37c308c05fd23718276d887547e1f56a1ae5a | |
parent | 0472d9f8b238ff5ad99b88eafd556469e116796b (diff) | |
download | gstreamer-plugins-good-01342378b56fe7445ae8292139aba93bab65cec3.tar.gz |
opus: Add proper support for multichannel audio
https://bugzilla.gnome.org/show_bug.cgi?id=757152
-rw-r--r-- | gst/rtp/gstrtpopusdepay.c | 6 | ||||
-rw-r--r-- | gst/rtp/gstrtpopuspay.c | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/gst/rtp/gstrtpopusdepay.c b/gst/rtp/gstrtpopusdepay.c index abb7218e0..8152cd57f 100644 --- a/gst/rtp/gstrtpopusdepay.c +++ b/gst/rtp/gstrtpopusdepay.c @@ -47,7 +47,7 @@ static GstStaticPadTemplate gst_rtp_opus_depay_src_template = GST_STATIC_PAD_TEMPLATE ("src", GST_PAD_SRC, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("audio/x-opus, multistream = (boolean) FALSE") + GST_STATIC_CAPS ("audio/x-opus, channel-mapping-family = (int) 0") ); static GstBuffer *gst_rtp_opus_depay_process (GstRTPBaseDepayload * depayload, @@ -98,8 +98,8 @@ gst_rtp_opus_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps) const gchar *sprop_stereo, *sprop_maxcapturerate; srccaps = - gst_caps_new_simple ("audio/x-opus", "multistream", G_TYPE_BOOLEAN, FALSE, - NULL); + gst_caps_new_simple ("audio/x-opus", "channel-mapping-family", G_TYPE_INT, + 0, NULL); s = gst_caps_get_structure (caps, 0); if ((sprop_stereo = gst_structure_get_string (s, "sprop-stereo"))) { diff --git a/gst/rtp/gstrtpopuspay.c b/gst/rtp/gstrtpopuspay.c index ead49a58a..5038028b1 100644 --- a/gst/rtp/gstrtpopuspay.c +++ b/gst/rtp/gstrtpopuspay.c @@ -38,7 +38,8 @@ static GstStaticPadTemplate gst_rtp_opus_pay_sink_template = GST_STATIC_PAD_TEMPLATE ("sink", GST_PAD_SINK, GST_PAD_ALWAYS, - GST_STATIC_CAPS ("audio/x-opus, multistream = (boolean) FALSE") + GST_STATIC_CAPS + ("audio/x-opus, channels = (int) [1, 2], channel-mapping-family = (int) 0") ); static GstStaticPadTemplate gst_rtp_opus_pay_src_template = @@ -122,7 +123,7 @@ gst_rtp_opus_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps) if (gst_structure_get_int (s, "channels", &channels)) { if (channels > 2) { GST_ERROR_OBJECT (payload, - "More than 2 channels with multistream=FALSE is invalid"); + "More than 2 channels with channel-mapping-family=0 is invalid"); return FALSE; } else if (channels == 2) { sprop_stereo = "1"; |