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

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

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.h
diff --git a/webrtc/modules/pacing/alr_detector.h b/webrtc/modules/pacing/alr_detector.h
index 11eeceaa988a65bdff24308e294902f1eaa23567..0a58c7fbad76f20aee1550b35c0322fbc707142a 100644
--- a/webrtc/modules/pacing/alr_detector.h
+++ b/webrtc/modules/pacing/alr_detector.h
@@ -27,7 +27,6 @@ namespace webrtc {
// AlrDetector provides a signal that can be utilized to adjust
// estimate bandwidth.
// Note: This class is not thread-safe.
-
class AlrDetector {
public:
AlrDetector();
@@ -57,8 +56,8 @@ class AlrDetector {
// kAlrEndUsagePercent. NOTE: This is intentionally conservative at the moment
// until BW adjustments of application limited region is fine tuned.
static constexpr int kDefaultAlrBandwidthUsagePercent = 65;
- static constexpr int kDefaultAlrStartBudgetLevelPercent = 20;
- static constexpr int kDefaultAlrStopBudgetLevelPercent = -20;
+ static constexpr int kDefaultAlrStartBudgetLevelPercent = 80;
terelius 2017/07/13 10:46:01 These numbers have changed a lot. How certain are
tschumi 2017/07/13 11:54:35 The detector was to slow in reporting the leafing
+ static constexpr int kDefaultAlrStopBudgetLevelPercent = 50;
static const char* kScreenshareProbingBweExperimentName;
void UpdateBudgetWithElapsedTime(int64_t delta_time_ms);
@@ -70,9 +69,24 @@ class AlrDetector {
int alr_stop_budget_level_percent_;
IntervalBudget alr_budget_;
+ int estimated_bitrate_bps_;
rtc::Optional<int64_t> alr_started_time_ms_;
};
+class AlrState {
+ public:
+ enum class Change {
+ kEnded,
+ kStarted,
+ kNoChange,
+ };
+
+ Change ChangeWhenAlrStartTimeIs(rtc::Optional<int64_t> alr_start_time_ms);
+
+ private:
+ bool was_in_alr_;
+};
+
} // namespace webrtc
#endif // WEBRTC_MODULES_PACING_ALR_DETECTOR_H_

Powered by Google App Engine
This is Rietveld 408576698