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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6119>
This commit is contained in:
François Laignel 2024-02-23 11:00:20 +01:00 committed by GStreamer Marge Bot
parent d3e79077dc
commit aeaef7a7f0

View file

@ -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);