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

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: Remove unused include. 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 void SendSideCongestionController::RegisterPacketFeedbackObserver( 86 void SendSideCongestionController::RegisterPacketFeedbackObserver(
87 PacketFeedbackObserver* observer) { 87 PacketFeedbackObserver* observer) {
88 transport_feedback_adapter_.RegisterPacketFeedbackObserver(observer); 88 transport_feedback_adapter_.RegisterPacketFeedbackObserver(observer);
89 } 89 }
90 90
91 void SendSideCongestionController::DeRegisterPacketFeedbackObserver( 91 void SendSideCongestionController::DeRegisterPacketFeedbackObserver(
92 PacketFeedbackObserver* observer) { 92 PacketFeedbackObserver* observer) {
93 transport_feedback_adapter_.DeRegisterPacketFeedbackObserver(observer); 93 transport_feedback_adapter_.DeRegisterPacketFeedbackObserver(observer);
94 } 94 }
95 95
96 void SendSideCongestionController::RegisterNetworkObserver(Observer* observer) { 96 void SendSideCongestionController::RegisterNetworkObserver(Observer* observer) {
michaelt 2017/04/05 07:06:02 This change seams unrelated with the topic of the
terelius 2017/04/05 10:58:03 Huh? There is no change in SendSideCongestionContr
michaelt 2017/04/06 11:35:13 Hmm this is probably shown to me because you rebas
terelius 2017/04/07 11:55:03 Does this really show up as modified in codereview
97 rtc::CritScope cs(&observer_lock_); 97 rtc::CritScope cs(&observer_lock_);
98 RTC_DCHECK(observer_ == nullptr); 98 RTC_DCHECK(observer_ == nullptr);
99 observer_ = observer; 99 observer_ = observer;
100 } 100 }
101 101
102 void SendSideCongestionController::DeRegisterNetworkObserver( 102 void SendSideCongestionController::DeRegisterNetworkObserver(
103 Observer* observer) { 103 Observer* observer) {
104 rtc::CritScope cs(&observer_lock_); 104 rtc::CritScope cs(&observer_lock_);
105 RTC_DCHECK_EQ(observer_, observer); 105 RTC_DCHECK_EQ(observer_, observer);
106 observer_ = nullptr; 106 observer_ = nullptr;
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698