From aeaef7a7f03aa22c0bc26347520555e8ed00d586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Laignel?= Date: Fri, 23 Feb 2024 11:00:20 +0100 Subject: [PATCH] webrtcbin: RFC5576 - early CNAME support See RFC5576: have CNAME available to the rtpjitterbuffer before the the first RTCP SR is received, for rapid synchronization. Similar to what was done for RTSP (last 2 commits) of [MR 2132]. [RFC5576]: https://www.rfc-editor.org/rfc/rfc5576 [MR 2132]: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2132 Part-of: --- subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c index a173b87b5e..e8b87332e4 100644 --- a/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c +++ b/subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c @@ -5620,6 +5620,9 @@ _update_transport_ptmap_from_media (GstWebRTCBin * webrtc, guint i, len; const gchar *proto; const GstSDPMedia *media = gst_sdp_message_get_media (sdp, media_idx); + const GstSDPMedia *remote_media = + gst_sdp_message_get_media (webrtc->current_remote_description->sdp, + media_idx); /* get proto */ proto = gst_sdp_media_get_proto (media); @@ -5672,6 +5675,11 @@ _update_transport_ptmap_from_media (GstWebRTCBin * webrtc, gst_caps_append_structure (item.caps, filtered); } + /* Get attributes from the remote media, + * such as ssrc-...-cname, ... + */ + gst_sdp_media_attributes_to_caps (remote_media, item.caps); + item.pt = pt; item.media_idx = media_idx; gst_caps_unref (outcaps);