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

Side by Side Diff: webrtc/pc/peerconnection.cc

Issue 2996643002: BWE allocation strategy
Patch Set: Comments handling Created 3 years, 3 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
« no previous file with comments | « webrtc/pc/peerconnection.h ('k') | webrtc/rtc_base/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::BitrateAllocationStrategy* bitrate_allocation_strategy) {
1290 rtc::Thread* worker_thread = factory_->worker_thread();
1291 if (!worker_thread->IsCurrent()) {
1292 return worker_thread->Invoke<RTCError>(
1293 RTC_FROM_HERE, rtc::Bind(&PeerConnection::SetBitrateAllocationStrategy,
1294 this, bitrate_allocation_strategy));
1295 }
1296 RTC_DCHECK(call_.get());
1297 call_->SetBitrateAllocationStrategy(bitrate_allocation_strategy);
1298 return RTCError::OK();
1299 }
1300
1288 bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file, 1301 bool PeerConnection::StartRtcEventLog(rtc::PlatformFile file,
1289 int64_t max_size_bytes) { 1302 int64_t max_size_bytes) {
1290 return factory_->worker_thread()->Invoke<bool>( 1303 return factory_->worker_thread()->Invoke<bool>(
1291 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StartRtcEventLog_w, this, file, 1304 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StartRtcEventLog_w, this, file,
1292 max_size_bytes)); 1305 max_size_bytes));
1293 } 1306 }
1294 1307
1295 void PeerConnection::StopRtcEventLog() { 1308 void PeerConnection::StopRtcEventLog() {
1296 factory_->worker_thread()->Invoke<void>( 1309 factory_->worker_thread()->Invoke<void>(
1297 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StopRtcEventLog_w, this)); 1310 RTC_FROM_HERE, rtc::Bind(&PeerConnection::StopRtcEventLog_w, this));
(...skipping 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
2523 return event_log_->StartLogging(file, max_size_bytes); 2536 return event_log_->StartLogging(file, max_size_bytes);
2524 } 2537 }
2525 2538
2526 void PeerConnection::StopRtcEventLog_w() { 2539 void PeerConnection::StopRtcEventLog_w() {
2527 if (event_log_) { 2540 if (event_log_) {
2528 event_log_->StopLogging(); 2541 event_log_->StopLogging();
2529 } 2542 }
2530 } 2543 }
2531 2544
2532 } // namespace webrtc 2545 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/pc/peerconnection.h ('k') | webrtc/rtc_base/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698