Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: webrtc/modules/congestion_controller/send_side_congestion_controller.cc

Issue 2789233005: Move BWE period calculation from ProbingIntervalEstimator to AimdRateControl. (Closed)
Patch Set: Nits Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 probe_controller_->SetEstimatedBitrate(bitrate_bps); 266 probe_controller_->SetEstimatedBitrate(bitrate_bps);
267 retransmission_rate_limiter_->SetMaxRate(bitrate_bps); 267 retransmission_rate_limiter_->SetMaxRate(bitrate_bps);
268 } 268 }
269 269
270 bitrate_bps = IsNetworkDown() || IsSendQueueFull() ? 0 : bitrate_bps; 270 bitrate_bps = IsNetworkDown() || IsSendQueueFull() ? 0 : bitrate_bps;
271 271
272 if (HasNetworkParametersToReportChanged(bitrate_bps, fraction_loss, rtt)) { 272 if (HasNetworkParametersToReportChanged(bitrate_bps, fraction_loss, rtt)) {
273 int64_t probing_interval_ms; 273 int64_t probing_interval_ms;
274 { 274 {
275 rtc::CritScope cs(&bwe_lock_); 275 rtc::CritScope cs(&bwe_lock_);
276 probing_interval_ms = delay_based_bwe_->GetProbingIntervalMs(); 276 probing_interval_ms = delay_based_bwe_->GetExpectedBwePeriodMs();
277 } 277 }
278 { 278 {
279 rtc::CritScope cs(&observer_lock_); 279 rtc::CritScope cs(&observer_lock_);
280 if (observer_) { 280 if (observer_) {
281 observer_->OnNetworkChanged(bitrate_bps, fraction_loss, rtt, 281 observer_->OnNetworkChanged(bitrate_bps, fraction_loss, rtt,
282 probing_interval_ms); 282 probing_interval_ms);
283 } 283 }
284 } 284 }
285 } 285 }
286 } 286 }
(...skipping 20 matching lines...) Expand all
307 bool SendSideCongestionController::IsSendQueueFull() const { 307 bool SendSideCongestionController::IsSendQueueFull() const {
308 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs; 308 return pacer_->ExpectedQueueTimeMs() > PacedSender::kMaxQueueLengthMs;
309 } 309 }
310 310
311 bool SendSideCongestionController::IsNetworkDown() const { 311 bool SendSideCongestionController::IsNetworkDown() const {
312 rtc::CritScope cs(&network_state_lock_); 312 rtc::CritScope cs(&network_state_lock_);
313 return network_state_ == kNetworkDown; 313 return network_state_ == kNetworkDown;
314 } 314 }
315 315
316 } // namespace webrtc 316 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698