From 83d459b68cd22fdad81a317039938262e3f228b4 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Mon, 22 Feb 2021 16:59:25 +1100 Subject: [PATCH] webrtcbin: use regular ice nomination by default 1. We don't currently deal with an a=ice-options in the SDP which means we currently violate https://tools.ietf.org/html/rfc5245#section-8.1.1 which states: "If its peer is using ICE options (present in an ice-options attribute from the peer) that the agent does not understand, the agent MUST use a regular nomination algorithm." 2. The recommendation is default to regular nomination in both RFC5245 and RFC8445. libnice change for this is https://gitlab.freedesktop.org/libnice/libnice/-/merge_requests/125 which requires an API break in libnice. Change-Id: I672c2d92b2ac258b563ed7a77a263502d1656bd2 Part-of: --- ext/webrtc/gstwebrtcice.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ext/webrtc/gstwebrtcice.c b/ext/webrtc/gstwebrtcice.c index 9ca03a4..2b389ef 100644 --- a/ext/webrtc/gstwebrtcice.c +++ b/ext/webrtc/gstwebrtcice.c @@ -1074,11 +1074,15 @@ static void gst_webrtc_ice_constructed (GObject * object) { GstWebRTCICE *ice = GST_WEBRTC_ICE (object); + NiceAgentOption options = 0; _start_thread (ice); + options |= NICE_AGENT_OPTION_ICE_TRICKLE; + options |= NICE_AGENT_OPTION_REGULAR_NOMINATION; + ice->priv->nice_agent = nice_agent_new_full (ice->priv->main_context, - NICE_COMPATIBILITY_RFC5245, NICE_AGENT_OPTION_ICE_TRICKLE); + NICE_COMPATIBILITY_RFC5245, options); g_signal_connect (ice->priv->nice_agent, "new-candidate-full", G_CALLBACK (_on_new_candidate), ice); -- 2.7.4