OLD | NEW |
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 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1272 // modifications. | 1272 // modifications. |
1273 if (port_allocator_) { | 1273 if (port_allocator_) { |
1274 if (!network_thread()->Invoke<bool>( | 1274 if (!network_thread()->Invoke<bool>( |
1275 RTC_FROM_HERE, | 1275 RTC_FROM_HERE, |
1276 rtc::Bind(&PeerConnection::ReconfigurePortAllocator_n, this, | 1276 rtc::Bind(&PeerConnection::ReconfigurePortAllocator_n, this, |
1277 configuration))) { | 1277 configuration))) { |
1278 return false; | 1278 return false; |
1279 } | 1279 } |
1280 } | 1280 } |
1281 | 1281 |
1282 // TODO(deadbeef): Shouldn't have to hop to the worker thread twice... | 1282 // TODO(deadbeef): Shouldn't have to hop to the network thread twice... |
1283 session_->SetIceConfig(session_->ParseIceConfig(configuration)); | 1283 session_->SetIceConfig(session_->ParseIceConfig(configuration)); |
1284 | 1284 |
| 1285 // As described in JSEP, calling setConfiguration with new ICE servers or |
| 1286 // candidate policy must set a "needs-ice-restart" bit so that the next offer |
| 1287 // triggers an ICE restart which will pick up the changes. |
| 1288 if (configuration.servers != configuration_.servers || |
| 1289 configuration.type != configuration_.type) { |
| 1290 session_->SetNeedsIceRestartFlag(); |
| 1291 } |
1285 configuration_ = configuration; | 1292 configuration_ = configuration; |
1286 return true; | 1293 return true; |
1287 } | 1294 } |
1288 | 1295 |
1289 bool PeerConnection::AddIceCandidate( | 1296 bool PeerConnection::AddIceCandidate( |
1290 const IceCandidateInterface* ice_candidate) { | 1297 const IceCandidateInterface* ice_candidate) { |
1291 TRACE_EVENT0("webrtc", "PeerConnection::AddIceCandidate"); | 1298 TRACE_EVENT0("webrtc", "PeerConnection::AddIceCandidate"); |
1292 if (IsClosed()) { | 1299 if (IsClosed()) { |
1293 return false; | 1300 return false; |
1294 } | 1301 } |
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2367 | 2374 |
2368 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, | 2375 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, |
2369 int64_t max_size_bytes) { | 2376 int64_t max_size_bytes) { |
2370 return event_log_->StartLogging(file, max_size_bytes); | 2377 return event_log_->StartLogging(file, max_size_bytes); |
2371 } | 2378 } |
2372 | 2379 |
2373 void PeerConnection::StopRtcEventLog_w() { | 2380 void PeerConnection::StopRtcEventLog_w() { |
2374 event_log_->StopLogging(); | 2381 event_log_->StopLogging(); |
2375 } | 2382 } |
2376 } // namespace webrtc | 2383 } // namespace webrtc |
OLD | NEW |