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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 // TODO(honghaiz): Recreate this object once the bitrate controller is | 223 // TODO(honghaiz): Recreate this object once the bitrate controller is |
224 // no longer exposed outside CongestionController. | 224 // no longer exposed outside CongestionController. |
225 bitrate_controller_->ResetBitrates(bitrate_bps, min_bitrate_bps, | 225 bitrate_controller_->ResetBitrates(bitrate_bps, min_bitrate_bps, |
226 max_bitrate_bps); | 226 max_bitrate_bps); |
227 min_bitrate_bps_ = min_bitrate_bps; | 227 min_bitrate_bps_ = min_bitrate_bps; |
228 max_bitrate_bps_ = max_bitrate_bps; | 228 max_bitrate_bps_ = max_bitrate_bps; |
229 // TODO(honghaiz): Recreate this object once the remote bitrate estimator is | 229 // TODO(honghaiz): Recreate this object once the remote bitrate estimator is |
230 // no longer exposed outside CongestionController. | 230 // no longer exposed outside CongestionController. |
231 remote_bitrate_estimator_.SetMinBitrate(min_bitrate_bps); | 231 remote_bitrate_estimator_.SetMinBitrate(min_bitrate_bps); |
232 | 232 |
| 233 transport_feedback_adapter_.ClearSendTimeHistory(); |
233 transport_feedback_adapter_.InitBwe(); | 234 transport_feedback_adapter_.InitBwe(); |
234 transport_feedback_adapter_.SetStartBitrate(bitrate_bps); | 235 transport_feedback_adapter_.SetStartBitrate(bitrate_bps); |
235 transport_feedback_adapter_.SetMinBitrate(min_bitrate_bps); | 236 transport_feedback_adapter_.SetMinBitrate(min_bitrate_bps); |
236 // TODO(holmer): Trigger a new probe once mid-call probing is implemented. | 237 |
| 238 probe_controller_->Reset(); |
| 239 probe_controller_->SetBitrates(min_bitrate_bps, bitrate_bps, max_bitrate_bps); |
| 240 |
237 MaybeTriggerOnNetworkChanged(); | 241 MaybeTriggerOnNetworkChanged(); |
238 } | 242 } |
239 | 243 |
240 BitrateController* CongestionController::GetBitrateController() const { | 244 BitrateController* CongestionController::GetBitrateController() const { |
241 return bitrate_controller_.get(); | 245 return bitrate_controller_.get(); |
242 } | 246 } |
243 | 247 |
244 RemoteBitrateEstimator* CongestionController::GetRemoteBitrateEstimator( | 248 RemoteBitrateEstimator* CongestionController::GetRemoteBitrateEstimator( |
245 bool send_side_bwe) { | 249 bool send_side_bwe) { |
246 if (send_side_bwe) { | 250 if (send_side_bwe) { |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 bool CongestionController::IsSendQueueFull() const { | 374 bool CongestionController::IsSendQueueFull() const { |
371 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; | 375 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; |
372 } | 376 } |
373 | 377 |
374 bool CongestionController::IsNetworkDown() const { | 378 bool CongestionController::IsNetworkDown() const { |
375 rtc::CritScope cs(&critsect_); | 379 rtc::CritScope cs(&critsect_); |
376 return network_state_ == kNetworkDown; | 380 return network_state_ == kNetworkDown; |
377 } | 381 } |
378 | 382 |
379 } // namespace webrtc | 383 } // namespace webrtc |
OLD | NEW |