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