| 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 // TODO(honghaiz): Recreate this object once the bitrate controller is | 240 // TODO(honghaiz): Recreate this object once the bitrate controller is |
| 241 // no longer exposed outside CongestionController. | 241 // no longer exposed outside CongestionController. |
| 242 bitrate_controller_->ResetBitrates(bitrate_bps, min_bitrate_bps, | 242 bitrate_controller_->ResetBitrates(bitrate_bps, min_bitrate_bps, |
| 243 max_bitrate_bps); | 243 max_bitrate_bps); |
| 244 min_bitrate_bps_ = min_bitrate_bps; | 244 min_bitrate_bps_ = min_bitrate_bps; |
| 245 // TODO(honghaiz): Recreate this object once the remote bitrate estimator is | 245 // TODO(honghaiz): Recreate this object once the remote bitrate estimator is |
| 246 // no longer exposed outside CongestionController. | 246 // no longer exposed outside CongestionController. |
| 247 if (remote_bitrate_estimator_) | 247 if (remote_bitrate_estimator_) |
| 248 remote_bitrate_estimator_->SetMinBitrate(min_bitrate_bps); | 248 remote_bitrate_estimator_->SetMinBitrate(min_bitrate_bps); |
| 249 | 249 |
| 250 RemoteBitrateEstimator* rbe = new RemoteBitrateEstimatorAbsSendTime( | 250 RemoteBitrateEstimator* rbe = new DelayBasedBwe( |
| 251 &transport_feedback_adapter_, clock_); | 251 &transport_feedback_adapter_, clock_); |
| 252 transport_feedback_adapter_.SetBitrateEstimator(rbe); | 252 transport_feedback_adapter_.SetBitrateEstimator(rbe); |
| 253 rbe->SetMinBitrate(min_bitrate_bps); | 253 rbe->SetMinBitrate(min_bitrate_bps); |
| 254 // TODO(holmer): Trigger a new probe once mid-call probing is implemented. | 254 // TODO(holmer): Trigger a new probe once mid-call probing is implemented. |
| 255 MaybeTriggerOnNetworkChanged(); | 255 MaybeTriggerOnNetworkChanged(); |
| 256 } | 256 } |
| 257 | 257 |
| 258 BitrateController* CongestionController::GetBitrateController() const { | 258 BitrateController* CongestionController::GetBitrateController() const { |
| 259 return bitrate_controller_.get(); | 259 return bitrate_controller_.get(); |
| 260 } | 260 } |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 bool CongestionController::IsSendQueueFull() const { | 376 bool CongestionController::IsSendQueueFull() const { |
| 377 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; | 377 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; |
| 378 } | 378 } |
| 379 | 379 |
| 380 bool CongestionController::IsNetworkDown() const { | 380 bool CongestionController::IsNetworkDown() const { |
| 381 rtc::CritScope cs(&critsect_); | 381 rtc::CritScope cs(&critsect_); |
| 382 return network_state_ == kNetworkDown; | 382 return network_state_ == kNetworkDown; |
| 383 } | 383 } |
| 384 | 384 |
| 385 } // namespace webrtc | 385 } // namespace webrtc |
| OLD | NEW |