mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
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>
This commit is contained in:
parent
085e6c036a
commit
c51ae6112d
3 changed files with 8 additions and 8 deletions
|
@ -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"
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue