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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 probe_controller_->SetEstimatedBitrate(bitrate_bps); | 268 probe_controller_->SetEstimatedBitrate(bitrate_bps); |
269 retransmission_rate_limiter_->SetMaxRate(bitrate_bps); | 269 retransmission_rate_limiter_->SetMaxRate(bitrate_bps); |
270 } | 270 } |
271 | 271 |
272 bitrate_bps = IsNetworkDown() || IsSendQueueFull() ? 0 : bitrate_bps; | 272 bitrate_bps = IsNetworkDown() || IsSendQueueFull() ? 0 : bitrate_bps; |
273 | 273 |
274 if (HasNetworkParametersToReportChanged(bitrate_bps, fraction_loss, rtt)) { | 274 if (HasNetworkParametersToReportChanged(bitrate_bps, fraction_loss, rtt)) { |
275 int64_t probing_interval_ms; | 275 int64_t probing_interval_ms; |
276 { | 276 { |
277 rtc::CritScope cs(&bwe_lock_); | 277 rtc::CritScope cs(&bwe_lock_); |
278 probing_interval_ms = delay_based_bwe_->GetProbingIntervalMs(); | 278 probing_interval_ms = delay_based_bwe_->GetExpectedBwePeriodMs(); |
279 } | 279 } |
280 { | 280 { |
281 rtc::CritScope cs(&observer_lock_); | 281 rtc::CritScope cs(&observer_lock_); |
282 if (observer_) { | 282 if (observer_) { |
283 observer_->OnNetworkChanged(bitrate_bps, fraction_loss, rtt, | 283 observer_->OnNetworkChanged(bitrate_bps, fraction_loss, rtt, |
284 probing_interval_ms); | 284 probing_interval_ms); |
285 } | 285 } |
286 } | 286 } |
287 } | 287 } |
288 } | 288 } |
(...skipping 20 matching lines...) Expand all Loading... |
309 bool SendSideCongestionController::IsSendQueueFull() const { | 309 bool SendSideCongestionController::IsSendQueueFull() const { |
310 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; | 310 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; |
311 } | 311 } |
312 | 312 |
313 bool SendSideCongestionController::IsNetworkDown() const { | 313 bool SendSideCongestionController::IsNetworkDown() const { |
314 rtc::CritScope cs(&network_state_lock_); | 314 rtc::CritScope cs(&network_state_lock_); |
315 return network_state_ == kNetworkDown; | 315 return network_state_ == kNetworkDown; |
316 } | 316 } |
317 | 317 |
318 } // namespace webrtc | 318 } // namespace webrtc |
OLD | NEW |