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..688b9453ce101028d084d29aaee13c45fa0c5abc 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; |
+ static constexpr int kDefaultAlrStopBudgetLevelPercent = 50; |
static const char* kScreenshareProbingBweExperimentName; |
void UpdateBudgetWithElapsedTime(int64_t delta_time_ms); |
@@ -70,9 +69,26 @@ 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 { |
philipel
2017/07/14 13:56:23
Do we really need a class to keep track of whether
tschumi
2017/07/14 15:36:51
Removed AlrState
|
+ public: |
+ enum class State { |
+ kInAlr, |
+ kNotInAlr, |
+ }; |
+ AlrState(); |
+ |
+ void Update(rtc::Optional<int64_t> alr_start_time_ms); |
+ bool HasChangedTo(State state); |
+ |
+ private: |
+ bool was_in_alr_; |
+ rtc::Optional<State> alr_state_changed_to_; |
+}; |
+ |
} // namespace webrtc |
#endif // WEBRTC_MODULES_PACING_ALR_DETECTOR_H_ |