Chromium Code Reviews| 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 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1278 mask.min_bitrate_bps = bitrate.min_bitrate_bps; | 1278 mask.min_bitrate_bps = bitrate.min_bitrate_bps; |
| 1279 mask.start_bitrate_bps = bitrate.current_bitrate_bps; | 1279 mask.start_bitrate_bps = bitrate.current_bitrate_bps; |
| 1280 mask.max_bitrate_bps = bitrate.max_bitrate_bps; | 1280 mask.max_bitrate_bps = bitrate.max_bitrate_bps; |
| 1281 | 1281 |
| 1282 RTC_DCHECK(call_.get()); | 1282 RTC_DCHECK(call_.get()); |
| 1283 call_->SetBitrateConfigMask(mask); | 1283 call_->SetBitrateConfigMask(mask); |
| 1284 | 1284 |
| 1285 return RTCError::OK(); | 1285 return RTCError::OK(); |
| 1286 } | 1286 } |
| 1287 | 1287 |
| 1288 RTCError PeerConnection::SetBitrateAllocationStrategy( | |
| 1289 rtc::scoped_refptr<rtc::BitrateAllocationStrategy> | |
| 1290 bitrate_allocation_strategy) { | |
| 1291 rtc::Thread* worker_thread = factory_->worker_thread(); | |
|
stefan-webrtc
2017/09/05 10:42:47
Do we have to invoke SetBitrateAllocationStrategy
alexnarest
2017/09/05 13:37:46
It looks like worker_thread and worker_queue_ are
| |
| 1292 if (!worker_thread->IsCurrent()) { | |
| 1293 return worker_thread->Invoke<RTCError>( | |
| 1294 RTC_FROM_HERE, rtc::Bind(&PeerConnection::SetBitrateAllocationStrategy, | |
| 1295 this, bitrate_allocation_strategy)); | |
| 1296 } | |
| 1297 RTC_DCHECK(call_.get()); | |
| 1298 call_->SetBitrateAllocationStrategy(bitrate_allocation_strategy); | |
| 1299 return RTCError::OK(); | |
| 1300 } | |
| 1301 | |
| 1288 bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file, | 1302 bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file, |
| 1289 int64_t max_size_bytes) { | 1303 int64_t max_size_bytes) { |
| 1290 return factory_->worker_thread()->Invoke<bool>( | 1304 return factory_->worker_thread()->Invoke<bool>( |
| 1291 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StartRtcEventLog_w, this, file, | 1305 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StartRtcEventLog_w, this, file, |
| 1292 max_size_bytes)); | 1306 max_size_bytes)); |
| 1293 } | 1307 } |
| 1294 | 1308 |
| 1295 void PeerConnection::StopRtcEventLog() { | 1309 void PeerConnection::StopRtcEventLog() { |
| 1296 factory_->worker_thread()->Invoke<void>( | 1310 factory_->worker_thread()->Invoke<void>( |
| 1297 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StopRtcEventLog_w, this)); | 1311 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StopRtcEventLog_w, this)); |
| (...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2523 return event_log_->StartLogging(file, max_size_bytes); | 2537 return event_log_->StartLogging(file, max_size_bytes); |
| 2524 } | 2538 } |
| 2525 | 2539 |
| 2526 void PeerConnection::StopRtcEventLog_w() { | 2540 void PeerConnection::StopRtcEventLog_w() { |
| 2527 if (event_log_) { | 2541 if (event_log_) { |
| 2528 event_log_->StopLogging(); | 2542 event_log_->StopLogging(); |
| 2529 } | 2543 } |
| 2530 } | 2544 } |
| 2531 | 2545 |
| 2532 } // namespace webrtc | 2546 } // namespace webrtc |
| OLD | NEW |