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>
"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"
},
"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"
}
"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 =
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;
!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;
*
* 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:
"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,
/* 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);