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