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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 1110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 std::string error; 1121 std::string error;
1122 bool res = transport_controller_->RemoveRemoteCandidates(candidates, &error); 1122 bool res = transport_controller_->RemoveRemoteCandidates(candidates, &error);
1123 if (!res && !error.empty()) { 1123 if (!res && !error.empty()) {
1124 LOG(LS_ERROR) << "Error when removing remote candidates: " << error; 1124 LOG(LS_ERROR) << "Error when removing remote candidates: " << error;
1125 } 1125 }
1126 return true; 1126 return true;
1127 } 1127 }
1128 1128
1129 cricket::IceConfig WebRtcSession::ParseIceConfig( 1129 cricket::IceConfig WebRtcSession::ParseIceConfig(
1130 const PeerConnectionInterface::RTCConfiguration& config) const { 1130 const PeerConnectionInterface::RTCConfiguration& config) const {
1131 cricket::IceConfig ice_config; 1131 ContinualGatheringPolicy gathering_policy;
1132 ice_config.receiving_timeout = config.ice_connection_receiving_timeout; 1132 switch (config.continual_gathering_policy) {
1133 ice_config.prioritize_most_likely_candidate_pairs = 1133 case PeerConnectionInterface::GATHER_ONCE:
1134 config.prioritize_most_likely_ice_candidate_pairs; 1134 gathering_policy = GATHER_ONCE;
1135 ice_config.backup_connection_ping_interval = 1135 break;
1136 config.ice_backup_candidate_pair_ping_interval; 1136 case PeerConnectionInterface::GATHER_CONTINUALLY:
1137 ice_config.gather_continually = (config.continual_gathering_policy == 1137 gathering_policy = GATHER_CONTINUALLY;
1138 PeerConnectionInterface::GATHER_CONTINUALLY); 1138 break;
1139 return ice_config; 1139 default:
1140 RTC_DCHECK(false);
1141 gathering_policy = GATHER_ONCE;
1142 }
1143 return ContinualGatheringPolicy(
1144 config.ice_connection_receiving_timeout,
1145 config.ice_backup_candidate_pair_ping_interval, gathering_policy,
1146 config.prioritize_most_likely_ice_candidate_pairs,
1147 -1 /* max_strong_interval_ms */);
1140 } 1148 }
1141 1149
1142 void WebRtcSession::SetIceConfig(const cricket::IceConfig& config) { 1150 void WebRtcSession::SetIceConfig(const cricket::IceConfig& config) {
1143 transport_controller_->SetIceConfig(config); 1151 transport_controller_->SetIceConfig(config);
1144 } 1152 }
1145 1153
1146 void WebRtcSession::MaybeStartGathering() { 1154 void WebRtcSession::MaybeStartGathering() {
1147 transport_controller_->MaybeStartGathering(); 1155 transport_controller_->MaybeStartGathering();
1148 } 1156 }
1149 1157
(...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
2161 ssl_cipher_suite); 2169 ssl_cipher_suite);
2162 } 2170 }
2163 } 2171 }
2164 2172
2165 void WebRtcSession::OnSentPacket_w(const rtc::SentPacket& sent_packet) { 2173 void WebRtcSession::OnSentPacket_w(const rtc::SentPacket& sent_packet) {
2166 RTC_DCHECK(worker_thread()->IsCurrent()); 2174 RTC_DCHECK(worker_thread()->IsCurrent());
2167 media_controller_->call_w()->OnSentPacket(sent_packet); 2175 media_controller_->call_w()->OnSentPacket(sent_packet);
2168 } 2176 }
2169 2177
2170 } // namespace webrtc 2178 } // namespace webrtc
OLDNEW
« 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