Chromium Code Reviews| 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..307d4b6678e51a0db8419ee471b91eca0556bac1 100644 |
| --- a/webrtc/modules/remote_bitrate_estimator/overuse_detector.h |
| +++ b/webrtc/modules/remote_bitrate_estimator/overuse_detector.h |
| @@ -23,7 +23,7 @@ enum RateControlRegion; |
| 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 |
| @@ -34,24 +34,32 @@ class OveruseDetector { |
| BandwidthUsage Detect(double offset, |
| double timestamp_delta, |
| int num_of_deltas, |
| - int64_t now_ms); |
| + int64_t now_ms, |
| + int incoming_bitrate); |
| // 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 bool AdaptiveThresholdExperimentIsEnabled() const; |
| + virtual bool ExperimentVariationIsEnabled(const char* variation) const; |
| private: |
| + void UpdateThreshold(double modified_offset, |
| + int64_t now_ms, |
| + int incoming_bitrate); |
|
Gaetano Carlucci
2015/06/25 11:58:36
we can remove the input incoming_bitrate
stefan-webrtc
2015/06/25 12:37:13
Done.
|
| + bool GetExperimentThresholds(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_; |
| BandwidthUsage hypothesis_; |
| + double k_up_; |
| + double k_down_; |
| DISALLOW_COPY_AND_ASSIGN(OveruseDetector); |
| }; |