| OLD | NEW |
| 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 } | 256 } |
| 257 | 257 |
| 258 RateLimiter* CongestionController::GetRetransmissionRateLimiter() { | 258 RateLimiter* CongestionController::GetRetransmissionRateLimiter() { |
| 259 return retransmission_rate_limiter_.get(); | 259 return retransmission_rate_limiter_.get(); |
| 260 } | 260 } |
| 261 | 261 |
| 262 void CongestionController::EnablePeriodicAlrProbing(bool enable) { | 262 void CongestionController::EnablePeriodicAlrProbing(bool enable) { |
| 263 probe_controller_->EnablePeriodicAlrProbing(enable); | 263 probe_controller_->EnablePeriodicAlrProbing(enable); |
| 264 } | 264 } |
| 265 | 265 |
| 266 bool CongestionController::UseSendSideBwe( |
| 267 bool transport_cc, |
| 268 const RtpHeaderExtensionMap& rtp_header_extensions) { |
| 269 // Has the RTCP feedback message been negotiated? |
| 270 if (!transport_cc) |
| 271 return false; |
| 272 // Has the RTP header extension been negotiated? |
| 273 return rtp_header_extensions.IsRegistered( |
| 274 kRtpExtensionTransportSequenceNumber); |
| 275 } |
| 276 |
| 266 void CongestionController::SetAllocatedSendBitrateLimits( | 277 void CongestionController::SetAllocatedSendBitrateLimits( |
| 267 int min_send_bitrate_bps, | 278 int min_send_bitrate_bps, |
| 268 int max_padding_bitrate_bps) { | 279 int max_padding_bitrate_bps) { |
| 269 pacer_->SetSendBitrateLimits(min_send_bitrate_bps, max_padding_bitrate_bps); | 280 pacer_->SetSendBitrateLimits(min_send_bitrate_bps, max_padding_bitrate_bps); |
| 270 } | 281 } |
| 271 | 282 |
| 272 int64_t CongestionController::GetPacerQueuingDelayMs() const { | 283 int64_t CongestionController::GetPacerQueuingDelayMs() const { |
| 273 return IsNetworkDown() ? 0 : pacer_->QueueInMs(); | 284 return IsNetworkDown() ? 0 : pacer_->QueueInMs(); |
| 274 } | 285 } |
| 275 | 286 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 bool CongestionController::IsSendQueueFull() const { | 371 bool CongestionController::IsSendQueueFull() const { |
| 361 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; | 372 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; |
| 362 } | 373 } |
| 363 | 374 |
| 364 bool CongestionController::IsNetworkDown() const { | 375 bool CongestionController::IsNetworkDown() const { |
| 365 rtc::CritScope cs(&critsect_); | 376 rtc::CritScope cs(&critsect_); |
| 366 return network_state_ == kNetworkDown; | 377 return network_state_ == kNetworkDown; |
| 367 } | 378 } |
| 368 | 379 |
| 369 } // namespace webrtc | 380 } // namespace webrtc |
| OLD | NEW |