webrtcbin: advertise harder the rtcp-mux-only requirement

And ignore rtcp ICE candidates

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2239>
This commit is contained in:
Matthew Waters 2021-05-13 21:11:30 +10:00 committed by GStreamer Marge Bot
parent abe7e724ed
commit a836bd4766
2 changed files with 9 additions and 0 deletions

View file

@ -3227,6 +3227,8 @@ _create_offer_task (GstWebRTCBin * webrtc, const GstStructure * options,
if (sdp_media_from_transceiver (webrtc, &media, trans, media_idx,
bundled_mids, 0, bundle_ufrag, bundle_pwd, reserved_pts, all_mids,
error)) {
/* as per JSEP, a=rtcp-mux-only is only added for new streams */
gst_sdp_media_add_attribute (&media, "rtcp-mux-only", "");
gst_sdp_message_add_media (ret, &media);
media_idx++;
} else {

View file

@ -691,6 +691,13 @@ gst_webrtc_ice_add_candidate (GstWebRTCICE * ice, GstWebRTCICEStream * stream,
}
}
if (cand->component_id == 2) {
/* we only support rtcp-mux so rtcp candidates are useless for us */
GST_INFO_OBJECT (ice, "Dropping RTCP candidate %s", candidate);
nice_candidate_free (cand);
return;
}
candidates = g_slist_append (candidates, cand);
nice_agent_set_remote_candidates (ice->priv->nice_agent, item->nice_stream_id,