Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(627)

Unified Diff: webrtc/api/peerconnection.cc

Issue 1987833002: Add a flag to filter out high-cost networks. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: merge with head Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/api/java/src/org/webrtc/PeerConnection.java ('k') | webrtc/api/peerconnectioninterface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/peerconnection.cc
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc
index 5a0d32a5ff8e67416c1d3f3abbe9127f5e97739a..d5cbd5ea8770248fcb7ed79532b01b39df9ce785 100644
--- a/webrtc/api/peerconnection.cc
+++ b/webrtc/api/peerconnection.cc
@@ -2128,6 +2128,12 @@ bool PeerConnection::InitializePortAllocator_n(
LOG(LS_INFO) << "TCP candidates are disabled.";
}
+ if (configuration.candidate_network_policy ==
+ kCandidateNetworkPolicyLowCost) {
+ portallocator_flags |= cricket::PORTALLOCATOR_DISABLE_COSTLY_NETWORKS;
+ LOG(LS_INFO) << "Do not gather candidates on high-cost networks";
+ }
+
port_allocator_->set_flags(portallocator_flags);
// No step delay is used while allocating ports.
port_allocator_->set_step_delay(cricket::kMinimumStepDelay);
« no previous file with comments | « webrtc/api/java/src/org/webrtc/PeerConnection.java ('k') | webrtc/api/peerconnectioninterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698