webrtcbin: use regular ice nomination by default 75/263475/1
authorMatthew Waters <matthew@centricular.com>
Mon, 22 Feb 2021 05:59:25 +0000 (16:59 +1100)
committerSangchul Lee <sc11.lee@samsung.com>
Fri, 3 Sep 2021 06:40:14 +0000 (15:40 +0900)
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2031>

ext/webrtc/gstwebrtcice.c

index 9ca03a4..2b389ef 100644 (file)
@@ -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);