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

Side by Side Diff: webrtc/modules/congestion_controller/congestion_controller.cc

Issue 1993113003: Refactor how padding is calculated. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed review comments. 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 (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 } else { 250 } else {
251 return remote_bitrate_estimator_.get(); 251 return remote_bitrate_estimator_.get();
252 } 252 }
253 } 253 }
254 254
255 TransportFeedbackObserver* 255 TransportFeedbackObserver*
256 CongestionController::GetTransportFeedbackObserver() { 256 CongestionController::GetTransportFeedbackObserver() {
257 return &transport_feedback_adapter_; 257 return &transport_feedback_adapter_;
258 } 258 }
259 259
260 void CongestionController::SetAllocatedSendBitrate(int allocated_bitrate_bps, 260 void CongestionController::SetAllocatedSendBitrateLimits(
261 int padding_bitrate_bps) { 261 int min_send_bitrate_bps,
262 pacer_->SetAllocatedSendBitrate(allocated_bitrate_bps, padding_bitrate_bps); 262 int max_padding_bitrate_bps) {
263 pacer_->SetSendBitrateLimits(min_send_bitrate_bps, max_padding_bitrate_bps);
263 } 264 }
264 265
265 int64_t CongestionController::GetPacerQueuingDelayMs() const { 266 int64_t CongestionController::GetPacerQueuingDelayMs() const {
266 return pacer_->QueueInMs(); 267 return pacer_->QueueInMs();
267 } 268 }
268 269
269 void CongestionController::SignalNetworkState(NetworkState state) { 270 void CongestionController::SignalNetworkState(NetworkState state) {
270 if (state == kNetworkUp) { 271 if (state == kNetworkUp) {
271 pacer_->Resume(); 272 pacer_->Resume();
272 } else { 273 } else {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 bool CongestionController::IsSendQueueFull() const { 340 bool CongestionController::IsSendQueueFull() const {
340 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; 341 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs;
341 } 342 }
342 343
343 bool CongestionController::IsNetworkDown() const { 344 bool CongestionController::IsNetworkDown() const {
344 rtc::CritScope cs(&critsect_); 345 rtc::CritScope cs(&critsect_);
345 return network_state_ == kNetworkDown; 346 return network_state_ == kNetworkDown;
346 } 347 }
347 348
348 } // namespace webrtc 349 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/modules/congestion_controller/include/congestion_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698