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 1271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1282 mask.min_bitrate_bps = bitrate.min_bitrate_bps; | 1282 mask.min_bitrate_bps = bitrate.min_bitrate_bps; |
1283 mask.start_bitrate_bps = bitrate.current_bitrate_bps; | 1283 mask.start_bitrate_bps = bitrate.current_bitrate_bps; |
1284 mask.max_bitrate_bps = bitrate.max_bitrate_bps; | 1284 mask.max_bitrate_bps = bitrate.max_bitrate_bps; |
1285 | 1285 |
1286 RTC_DCHECK(call_.get()); | 1286 RTC_DCHECK(call_.get()); |
1287 call_->SetBitrateConfigMask(mask); | 1287 call_->SetBitrateConfigMask(mask); |
1288 | 1288 |
1289 return RTCError::OK(); | 1289 return RTCError::OK(); |
1290 } | 1290 } |
1291 | 1291 |
| 1292 RTCError PeerConnection::SetBitrateAllocationStrategy( |
| 1293 rtc::BitrateAllocationStrategy* bitrate_allocation_strategy) { |
| 1294 rtc::Thread* worker_thread = factory_->worker_thread(); |
| 1295 if (!worker_thread->IsCurrent()) { |
| 1296 return worker_thread->Invoke<RTCError>( |
| 1297 RTC_FROM_HERE, rtc::Bind(&PeerConnection::SetBitrateAllocationStrategy, |
| 1298 this, bitrate_allocation_strategy)); |
| 1299 } |
| 1300 RTC_DCHECK(call_.get()); |
| 1301 call_->SetBitrateAllocationStrategy(bitrate_allocation_strategy); |
| 1302 return RTCError::OK(); |
| 1303 } |
| 1304 |
1292 bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file, | 1305 bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file, |
1293 int64_t max_size_bytes) { | 1306 int64_t max_size_bytes) { |
1294 return factory_->worker_thread()->Invoke<bool>( | 1307 return factory_->worker_thread()->Invoke<bool>( |
1295 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StartRtcEventLog_w, this, file, | 1308 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StartRtcEventLog_w, this, file, |
1296 max_size_bytes)); | 1309 max_size_bytes)); |
1297 } | 1310 } |
1298 | 1311 |
1299 void PeerConnection::StopRtcEventLog() { | 1312 void PeerConnection::StopRtcEventLog() { |
1300 factory_->worker_thread()->Invoke<void>( | 1313 factory_->worker_thread()->Invoke<void>( |
1301 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StopRtcEventLog_w, this)); | 1314 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StopRtcEventLog_w, this)); |
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2368 return event_log_->StartLogging(file, max_size_bytes); | 2381 return event_log_->StartLogging(file, max_size_bytes); |
2369 } | 2382 } |
2370 | 2383 |
2371 void PeerConnection::StopRtcEventLog_w() { | 2384 void PeerConnection::StopRtcEventLog_w() { |
2372 if (event_log_) { | 2385 if (event_log_) { |
2373 event_log_->StopLogging(); | 2386 event_log_->StopLogging(); |
2374 } | 2387 } |
2375 } | 2388 } |
2376 | 2389 |
2377 } // namespace webrtc | 2390 } // namespace webrtc |
OLD | NEW |