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

Unified Diff: webrtc/modules/remote_bitrate_estimator/overuse_detector.h

Issue 1151603008: Make the BWE threshold adaptive. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Improve self-fairness. Created 5 years, 6 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/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);
};

Powered by Google App Engine
This is Rietveld 408576698