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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 if (estimate_changed) { | 340 if (estimate_changed) { |
341 pacer_->SetEstimatedBitrate(bitrate_bps); | 341 pacer_->SetEstimatedBitrate(bitrate_bps); |
342 probe_controller_->SetEstimatedBitrate(bitrate_bps); | 342 probe_controller_->SetEstimatedBitrate(bitrate_bps); |
343 retransmission_rate_limiter_->SetMaxRate(bitrate_bps); | 343 retransmission_rate_limiter_->SetMaxRate(bitrate_bps); |
344 } | 344 } |
345 | 345 |
346 bitrate_bps = IsNetworkDown() || IsSendQueueFull() ? 0 : bitrate_bps; | 346 bitrate_bps = IsNetworkDown() || IsSendQueueFull() ? 0 : bitrate_bps; |
347 | 347 |
348 if (HasNetworkParametersToReportChanged(bitrate_bps, fraction_loss, rtt)) { | 348 if (HasNetworkParametersToReportChanged(bitrate_bps, fraction_loss, rtt)) { |
349 observer_->OnNetworkChanged(bitrate_bps, fraction_loss, rtt); | 349 observer_->OnNetworkChanged(bitrate_bps, fraction_loss, rtt); |
| 350 remote_estimator_proxy_.OnBitrateChanged(bitrate_bps); |
350 } | 351 } |
351 } | 352 } |
352 | 353 |
353 bool CongestionController::HasNetworkParametersToReportChanged( | 354 bool CongestionController::HasNetworkParametersToReportChanged( |
354 uint32_t bitrate_bps, | 355 uint32_t bitrate_bps, |
355 uint8_t fraction_loss, | 356 uint8_t fraction_loss, |
356 int64_t rtt) { | 357 int64_t rtt) { |
357 rtc::CritScope cs(&critsect_); | 358 rtc::CritScope cs(&critsect_); |
358 bool changed = | 359 bool changed = |
359 last_reported_bitrate_bps_ != bitrate_bps || | 360 last_reported_bitrate_bps_ != bitrate_bps || |
(...skipping 12 matching lines...) Expand all Loading... |
372 bool CongestionController::IsSendQueueFull() const { | 373 bool CongestionController::IsSendQueueFull() const { |
373 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; | 374 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; |
374 } | 375 } |
375 | 376 |
376 bool CongestionController::IsNetworkDown() const { | 377 bool CongestionController::IsNetworkDown() const { |
377 rtc::CritScope cs(&critsect_); | 378 rtc::CritScope cs(&critsect_); |
378 return network_state_ == kNetworkDown; | 379 return network_state_ == kNetworkDown; |
379 } | 380 } |
380 | 381 |
381 } // namespace webrtc | 382 } // namespace webrtc |
OLD | NEW |