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

Unified Diff: webrtc/modules/pacing/alr_detector.cc

Issue 2970653004: Reimplemeted "Test and fix for huge bwe drop after alr state" (Closed)
Patch Set: Response to comments Created 3 years, 5 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/pacing/alr_detector.cc
diff --git a/webrtc/modules/pacing/alr_detector.cc b/webrtc/modules/pacing/alr_detector.cc
index 93752cf751395d99db60e146ef87f4b0558e4dcb..226be4823b0e2e3f00b3dfff5205b70ad0c6205e 100644
--- a/webrtc/modules/pacing/alr_detector.cc
+++ b/webrtc/modules/pacing/alr_detector.cc
@@ -103,4 +103,19 @@ AlrDetector::ParseAlrSettingsFromFieldTrial() {
return ret;
}
+AlrState::Change AlrState::ChangeWhenAlrStartTimeIs(
+ rtc::Optional<int64_t> alr_start_time_ms) {
+ AlrState::Change state_change = AlrState::Change::kNoChange;
+
+ if (was_in_alr_ && !alr_start_time_ms)
+ state_change = AlrState::Change::kEnded;
+
+ if (!was_in_alr_ && alr_start_time_ms)
+ state_change = AlrState::Change::kStarted;
+
+ was_in_alr_ = alr_start_time_ms.has_value();
+
+ return state_change;
+}
+
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698