summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2023-01-03 17:44:37 -0500
committerOlivier CrĂȘte <olivier.crete@ocrete.ca>2023-01-12 18:48:35 -0500
commitc51ae6112d28e984859b348f60bfeea8864b8606 (patch)
tree3e1cbbb775da2361d233b4e37af4c284e4fc3e08
parent085e6c036a722b8ee975ea580aab1765fdae225a (diff)
downloadgstreamer-c51ae6112d28e984859b348f60bfeea8864b8606.tar.gz
rtpopus: Put MULTIOPUS in all caps
The RTP payload encoding-name are always in caps in GStreamer. In SDP, they are not case-sensitive, but since caps are, we need to pick a caps, and we picked upper-case along time ago. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3674>
-rw-r--r--subprojects/gst-plugins-good/docs/gst_plugins_cache.json4
-rw-r--r--subprojects/gst-plugins-good/gst/rtp/gstrtpopusdepay.c6
-rw-r--r--subprojects/gst-plugins-good/gst/rtp/gstrtpopuspay.c6
3 files changed, 8 insertions, 8 deletions
diff --git a/subprojects/gst-plugins-good/docs/gst_plugins_cache.json b/subprojects/gst-plugins-good/docs/gst_plugins_cache.json
index 3a91863b34..9baf233bb9 100644
--- a/subprojects/gst-plugins-good/docs/gst_plugins_cache.json
+++ b/subprojects/gst-plugins-good/docs/gst_plugins_cache.json
@@ -15572,7 +15572,7 @@
"long-name": "RTP Opus packet depayloader",
"pad-templates": {
"sink": {
- "caps": "application/x-rtp:\n media: audio\n payload: [ 96, 127 ]\n clock-rate: 48000\n encoding-name: { (string)OPUS, (string)X-GST-OPUS-DRAFT-SPITTKA-00, (string)multiopus }\n",
+ "caps": "application/x-rtp:\n media: audio\n payload: [ 96, 127 ]\n clock-rate: 48000\n encoding-name: { (string)OPUS, (string)X-GST-OPUS-DRAFT-SPITTKA-00, (string)MULTIOPUS }\n",
"direction": "sink",
"presence": "always"
},
@@ -15605,7 +15605,7 @@
"presence": "always"
},
"src": {
- "caps": "application/x-rtp:\n media: audio\n payload: [ 96, 127 ]\n clock-rate: 48000\n encoding-name: { (string)OPUS, (string)X-GST-OPUS-DRAFT-SPITTKA-00, (string)multiopus }\n",
+ "caps": "application/x-rtp:\n media: audio\n payload: [ 96, 127 ]\n clock-rate: 48000\n encoding-name: { (string)OPUS, (string)X-GST-OPUS-DRAFT-SPITTKA-00, (string)MULTIOPUS }\n",
"direction": "src",
"presence": "always"
}
diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpopusdepay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpopusdepay.c
index 3dc4fba112..d20dd7d85a 100644
--- a/subprojects/gst-plugins-good/gst/rtp/gstrtpopusdepay.c
+++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpopusdepay.c
@@ -42,7 +42,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
"media = (string) \"audio\", "
"payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ","
"clock-rate = (int) 48000, "
- "encoding-name = (string) { \"OPUS\", \"X-GST-OPUS-DRAFT-SPITTKA-00\", \"multiopus\" }")
+ "encoding-name = (string) { \"OPUS\", \"X-GST-OPUS-DRAFT-SPITTKA-00\", \"MULTIOPUS\" }")
);
static GstStaticPadTemplate gst_rtp_opus_depay_src_template =
@@ -105,7 +105,7 @@ gst_rtp_opus_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
s = gst_caps_get_structure (caps, 0);
- if (g_str_equal (gst_structure_get_string (s, "encoding-name"), "multiopus")) {
+ if (g_str_equal (gst_structure_get_string (s, "encoding-name"), "MULTIOPUS")) {
gint channels;
gint stream_count;
gint coupled_count;
@@ -119,7 +119,7 @@ gst_rtp_opus_depay_setcaps (GstRTPBaseDepayload * depayload, GstCaps * caps)
!gst_structure_has_field_typed (s, "num_streams", G_TYPE_STRING) ||
!gst_structure_has_field_typed (s, "coupled_streams", G_TYPE_STRING) ||
!gst_structure_has_field_typed (s, "channel_mapping", G_TYPE_STRING)) {
- GST_WARNING_OBJECT (depayload, "Encoding name 'multiopus' requires "
+ GST_WARNING_OBJECT (depayload, "Encoding name 'MULTIOPUS' requires "
"encoding-params, num_streams, coupled_streams and channel_mapping "
"as string fields in caps.");
goto reject_caps;
diff --git a/subprojects/gst-plugins-good/gst/rtp/gstrtpopuspay.c b/subprojects/gst-plugins-good/gst/rtp/gstrtpopuspay.c
index f08b0f5296..e3b0d946e9 100644
--- a/subprojects/gst-plugins-good/gst/rtp/gstrtpopuspay.c
+++ b/subprojects/gst-plugins-good/gst/rtp/gstrtpopuspay.c
@@ -28,7 +28,7 @@
*
* In addition to the RFC, which assumes only mono and stereo payload,
* the element supports multichannel Opus audio streams using a non-standardized
- * SDP config and "multiopus" codec developed by Google for libwebrtc. When the
+ * SDP config and "MULTIOPUS" codec developed by Google for libwebrtc. When the
* input data have more than 2 channels, rtpopuspay will add extra fields to
* output caps that can be used to generate SDP in the syntax understood by
* libwebrtc. For example in the case of 5.1 audio:
@@ -83,7 +83,7 @@ GST_STATIC_PAD_TEMPLATE ("src",
"media = (string) \"audio\", "
"payload = (int) " GST_RTP_PAYLOAD_DYNAMIC_STRING ", "
"clock-rate = (int) 48000, "
- "encoding-name = (string) { \"OPUS\", \"X-GST-OPUS-DRAFT-SPITTKA-00\", \"multiopus\" }")
+ "encoding-name = (string) { \"OPUS\", \"X-GST-OPUS-DRAFT-SPITTKA-00\", \"MULTIOPUS\" }")
);
static gboolean gst_rtp_opus_pay_setcaps (GstRTPBasePayload * payload,
@@ -255,7 +255,7 @@ gst_rtp_opus_pay_setcaps (GstRTPBasePayload * payload, GstCaps * caps)
/* libwebrtc only supports "multiopus" when channels > 2. Mono and stereo
* sound must always be payloaded according to RFC 7587. */
- encoding_name = "multiopus";
+ encoding_name = "MULTIOPUS";
if (gst_structure_get_int (s, "stream-count", &stream_count)) {
char *num_streams = g_strdup_printf ("%d", stream_count);