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

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: Fix string length issue. Created 5 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/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..5a07b4e19a6339079f654c4ffac0e376feaffe8f 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,19 @@ 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);
-
private:
+ void UpdateThreshold(double modified_offset, int64_t now_ms);
+ void InitializeExperiment();
+
+ const bool in_experiment_;
+ double k_up_;
+ double k_down_;
+ double overusing_time_threshold_;
// 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_;

Powered by Google App Engine
This is Rietveld 408576698