Add the network preference to RTCConfiguration.

The network preference is added to RTCConfiguration and passed to ICE.
ICE considers now the preference set by applications over network
interface types when making decisions in candidate pair switching.

Bug: webrtc:8816
Change-Id: I40d2612705b54c83dd45772ac855808e0a76b1e1
Reviewed-on: https://webrtc-review.googlesource.com/44020
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21855}
This commit is contained in:
Qingsi Wang
2018-02-01 10:38:40 -08:00
committed by Commit Bot
parent dc221515ff
commit 9a5c6f8f3f
11 changed files with 154 additions and 22 deletions

View File

@ -491,6 +491,12 @@ class PeerConnectionInterface : public rtc::RefCountInterface {
// called.
webrtc::TurnCustomizer* turn_customizer = nullptr;
// Preferred network interface.
// A candidate pair on a preferred network has a higher precedence in ICE
// than one on an un-preferred network, regardless of priority or network
// cost.
rtc::Optional<rtc::AdapterType> network_preference;
// Configure the SDP semantics used by this PeerConnection. Note that the
// WebRTC 1.0 specification requires kUnifiedPlan semantics. The
// RtpTransceiver API is only available with kUnifiedPlan semantics.