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

Unified Diff: webrtc/api/webrtcsession.cc

Issue 2025573002: Use continual gathering to restore backup connections (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: . Created 4 years, 6 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 | « no previous file | webrtc/p2p/base/fakeportallocator.h » ('j') | webrtc/p2p/base/p2ptransportchannel_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/webrtcsession.cc
diff --git a/webrtc/api/webrtcsession.cc b/webrtc/api/webrtcsession.cc
index b9a3fc8453389dc040a28f51a47d0a4649e0eb49..1a9cde6a3d06a72e24d065f0eb76ac21624f7950 100644
--- a/webrtc/api/webrtcsession.cc
+++ b/webrtc/api/webrtcsession.cc
@@ -1128,15 +1128,23 @@ bool WebRtcSession::RemoveRemoteIceCandidates(
cricket::IceConfig WebRtcSession::ParseIceConfig(
const PeerConnectionInterface::RTCConfiguration& config) const {
- cricket::IceConfig ice_config;
- ice_config.receiving_timeout = config.ice_connection_receiving_timeout;
- ice_config.prioritize_most_likely_candidate_pairs =
- config.prioritize_most_likely_ice_candidate_pairs;
- ice_config.backup_connection_ping_interval =
- config.ice_backup_candidate_pair_ping_interval;
- ice_config.gather_continually = (config.continual_gathering_policy ==
- PeerConnectionInterface::GATHER_CONTINUALLY);
- return ice_config;
+ ContinualGatheringPolicy gathering_policy;
+ switch (config.continual_gathering_policy) {
+ case PeerConnectionInterface::GATHER_ONCE:
+ gathering_policy = GATHER_ONCE;
+ break;
+ case PeerConnectionInterface::GATHER_CONTINUALLY:
+ gathering_policy = GATHER_CONTINUALLY;
+ break;
+ default:
+ RTC_DCHECK(false);
+ gathering_policy = GATHER_ONCE;
+ }
+ return ContinualGatheringPolicy(
+ config.ice_connection_receiving_timeout,
+ config.ice_backup_candidate_pair_ping_interval, gathering_policy,
+ config.prioritize_most_likely_ice_candidate_pairs,
+ -1 /* max_strong_interval_ms */);
}
void WebRtcSession::SetIceConfig(const cricket::IceConfig& config) {
« no previous file with comments | « no previous file | webrtc/p2p/base/fakeportallocator.h » ('j') | webrtc/p2p/base/p2ptransportchannel_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698