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

Unified Diff: webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc

Issue 2800633004: Resolve dependency between rtc_event_log_api and remote_bitrate_estimator (Closed)
Patch Set: Rebased 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc
diff --git a/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc b/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc
index 5b0ba5a22b27be88a8e7d803f5092b95ddcad3c5..2428ddffa4289d30ce34e578f3e96308f959c213 100644
--- a/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc
+++ b/webrtc/modules/remote_bitrate_estimator/aimd_rate_control.cc
@@ -147,7 +147,8 @@ uint32_t AimdRateControl::ChangeBitrate(uint32_t new_bitrate_bps,
// An over-use should always trigger us to reduce the bitrate, even though
// we have not yet established our first estimate. By acting on the over-use,
// we will end up with a valid estimate.
- if (!bitrate_is_initialized_ && input.bw_state != kBwOverusing)
+ if (!bitrate_is_initialized_ &&
+ input.bw_state != BandwidthUsage::kBwOverusing)
return current_bitrate_bps_;
ChangeState(input, now_ms);
@@ -279,18 +280,18 @@ void AimdRateControl::UpdateMaxBitRateEstimate(float incoming_bitrate_kbps) {
void AimdRateControl::ChangeState(const RateControlInput& input,
int64_t now_ms) {
switch (input.bw_state) {
- case kBwNormal:
+ case BandwidthUsage::kBwNormal:
if (rate_control_state_ == kRcHold) {
time_last_bitrate_change_ = now_ms;
rate_control_state_ = kRcIncrease;
}
break;
- case kBwOverusing:
+ case BandwidthUsage::kBwOverusing:
if (rate_control_state_ != kRcDecrease) {
rate_control_state_ = kRcDecrease;
}
break;
- case kBwUnderusing:
+ case BandwidthUsage::kBwUnderusing:
rate_control_state_ = kRcHold;
break;
default:

Powered by Google App Engine
This is Rietveld 408576698