Index: webrtc/modules/remote_bitrate_estimator/overuse_detector.h |
diff --git a/webrtc/modules/remote_bitrate_estimator/overuse_detector.h b/webrtc/modules/remote_bitrate_estimator/overuse_detector.h |
index 8269368ae04e6f387b897730edea3cc3e59833db..c31922236cd849afcf21e8f4cf2371aba2f41cdf 100644 |
--- a/webrtc/modules/remote_bitrate_estimator/overuse_detector.h |
+++ b/webrtc/modules/remote_bitrate_estimator/overuse_detector.h |
@@ -20,10 +20,12 @@ |
namespace webrtc { |
enum RateControlRegion; |
+bool AdaptiveThresholdExperimentIsEnabled(); |
+ |
class OveruseDetector { |
public: |
explicit OveruseDetector(const OverUseDetectorOptions& options); |
- ~OveruseDetector(); |
+ virtual ~OveruseDetector(); |
// Update the detection state based on the estimated inter-arrival time delta |
// offset. |timestamp_delta| is the delta between the last timestamp which the |
@@ -39,15 +41,24 @@ class OveruseDetector { |
// Returns the current detector state. |
BandwidthUsage State() const; |
- // Sets the current rate-control region as decided by RemoteRateControl. This |
- // affects the sensitivity of the detector. |
- void SetRateControlRegion(webrtc::RateControlRegion region); |
+ virtual void InitializeExperiment(); |
pbos-webrtc
2015/07/06 10:01:40
Don't like this being virtual, pref. checking in_e
stefan-webrtc
2015/07/06 10:54:26
Done.
pbos-webrtc
2015/07/06 11:13:26
This is still virtual, does it even have to be ext
stefan-webrtc
2015/07/06 12:16:13
Done.
|
+ |
+ protected: |
+ double threshold_; |
+ double k_up_; |
+ double k_down_; |
+ bool experiment_set_; |
+ bool in_experiment_; |
private: |
+ void UpdateThreshold(double modified_offset, int64_t now_ms); |
+ bool AdaptiveThresholdExperimentIsEnabled(); |
+ bool ReadExperimentConstants(double* k_up, double* k_down) const; |
+ |
// Must be first member variable. Cannot be const because we need to be |
// copyable. |
webrtc::OverUseDetectorOptions options_; |
- double threshold_; |
+ int64_t last_update_ms_; |
double prev_offset_; |
double time_over_using_; |
int overuse_counter_; |