| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  268  |  268  | 
|  269 TransportFeedbackObserver* |  269 TransportFeedbackObserver* | 
|  270 CongestionController::GetTransportFeedbackObserver() { |  270 CongestionController::GetTransportFeedbackObserver() { | 
|  271   return &transport_feedback_adapter_; |  271   return &transport_feedback_adapter_; | 
|  272 } |  272 } | 
|  273  |  273  | 
|  274 RateLimiter* CongestionController::GetRetransmissionRateLimiter() { |  274 RateLimiter* CongestionController::GetRetransmissionRateLimiter() { | 
|  275   return retransmission_rate_limiter_.get(); |  275   return retransmission_rate_limiter_.get(); | 
|  276 } |  276 } | 
|  277  |  277  | 
 |  278 void CongestionController::EnablePeriodicProbing(bool enable) { | 
 |  279   probe_controller_->EnablePeriodicProbing(enable); | 
 |  280 } | 
 |  281  | 
|  278 void CongestionController::SetAllocatedSendBitrateLimits( |  282 void CongestionController::SetAllocatedSendBitrateLimits( | 
|  279     int min_send_bitrate_bps, |  283     int min_send_bitrate_bps, | 
|  280     int max_padding_bitrate_bps) { |  284     int max_padding_bitrate_bps) { | 
|  281   pacer_->SetSendBitrateLimits(min_send_bitrate_bps, max_padding_bitrate_bps); |  285   pacer_->SetSendBitrateLimits(min_send_bitrate_bps, max_padding_bitrate_bps); | 
|  282 } |  286 } | 
|  283  |  287  | 
|  284 int64_t CongestionController::GetPacerQueuingDelayMs() const { |  288 int64_t CongestionController::GetPacerQueuingDelayMs() const { | 
|  285   return IsNetworkDown() ? 0 : pacer_->QueueInMs(); |  289   return IsNetworkDown() ? 0 : pacer_->QueueInMs(); | 
|  286 } |  290 } | 
|  287  |  291  | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
|  312 } |  316 } | 
|  313  |  317  | 
|  314 int64_t CongestionController::TimeUntilNextProcess() { |  318 int64_t CongestionController::TimeUntilNextProcess() { | 
|  315   return std::min(bitrate_controller_->TimeUntilNextProcess(), |  319   return std::min(bitrate_controller_->TimeUntilNextProcess(), | 
|  316                   remote_bitrate_estimator_->TimeUntilNextProcess()); |  320                   remote_bitrate_estimator_->TimeUntilNextProcess()); | 
|  317 } |  321 } | 
|  318  |  322  | 
|  319 void CongestionController::Process() { |  323 void CongestionController::Process() { | 
|  320   bitrate_controller_->Process(); |  324   bitrate_controller_->Process(); | 
|  321   remote_bitrate_estimator_->Process(); |  325   remote_bitrate_estimator_->Process(); | 
 |  326   probe_controller_->Process(); | 
|  322   MaybeTriggerOnNetworkChanged(); |  327   MaybeTriggerOnNetworkChanged(); | 
|  323 } |  328 } | 
|  324  |  329  | 
|  325 void CongestionController::MaybeTriggerOnNetworkChanged() { |  330 void CongestionController::MaybeTriggerOnNetworkChanged() { | 
|  326   // TODO(perkj): |observer_| can be nullptr if the ctor that accepts a |  331   // TODO(perkj): |observer_| can be nullptr if the ctor that accepts a | 
|  327   // BitrateObserver is used. Remove this check once the ctor is removed. |  332   // BitrateObserver is used. Remove this check once the ctor is removed. | 
|  328   if (!observer_) |  333   if (!observer_) | 
|  329     return; |  334     return; | 
|  330  |  335  | 
|  331   uint32_t bitrate_bps; |  336   uint32_t bitrate_bps; | 
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  369 bool CongestionController::IsSendQueueFull() const { |  374 bool CongestionController::IsSendQueueFull() const { | 
|  370   return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; |  375   return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; | 
|  371 } |  376 } | 
|  372  |  377  | 
|  373 bool CongestionController::IsNetworkDown() const { |  378 bool CongestionController::IsNetworkDown() const { | 
|  374   rtc::CritScope cs(&critsect_); |  379   rtc::CritScope cs(&critsect_); | 
|  375   return network_state_ == kNetworkDown; |  380   return network_state_ == kNetworkDown; | 
|  376 } |  381 } | 
|  377  |  382  | 
|  378 }  // namespace webrtc |  383 }  // namespace webrtc | 
| OLD | NEW |