Add probing to recover faster from large bitrate drops. A single probe at 85% of the original bitrate is sent when transitioning from underusing back to normal state. The actual sending of the probes is disabled by default, and enabled by the field trial string WebRTC-BweRapidRecoveryExperiment/Enabled/. Existing code that did probing after large drops in ALR have been restructured so that it also delays the probe until we are no longer overusing.
BUG=webrtc:8015
Review-Url: https://codereview.webrtc.org/2986563002
Cr-Commit-Position: refs/heads/master@{#19187}
diff --git a/webrtc/modules/congestion_controller/probe_controller.h b/webrtc/modules/congestion_controller/probe_controller.h
index 4a3071c..f47bdb0 100644
--- a/webrtc/modules/congestion_controller/probe_controller.h
+++ b/webrtc/modules/congestion_controller/probe_controller.h
@@ -38,6 +38,10 @@
void EnablePeriodicAlrProbing(bool enable);
+ void SetAlrEndedTimeMs(int64_t alr_end_time);
+
+ void RequestProbe();
+
// Resets the ProbeController to a state equivalent to as if it was just
// created EXCEPT for |enable_periodic_alr_probing_|.
void Reset();
@@ -69,9 +73,13 @@
int64_t estimated_bitrate_bps_ GUARDED_BY(critsect_);
int64_t start_bitrate_bps_ GUARDED_BY(critsect_);
int64_t max_bitrate_bps_ GUARDED_BY(critsect_);
- int64_t last_alr_probing_time_ GUARDED_BY(critsect_);
+ int64_t last_bwe_drop_probing_time_ms_ GUARDED_BY(critsect_);
+ rtc::Optional<int64_t> alr_end_time_ms_ GUARDED_BY(critsect_);
bool enable_periodic_alr_probing_ GUARDED_BY(critsect_);
+ int64_t time_of_last_large_drop_ms_ GUARDED_BY(critsect_);
+ int64_t bitrate_before_last_large_drop_bps_ GUARDED_BY(critsect_);
+ bool in_rapid_recovery_experiment_ GUARDED_BY(critsect_);
// For WebRTC.BWE.MidCallProbing.* metric.
bool mid_call_probing_waiting_for_result_ GUARDED_BY(&critsect_);
int64_t mid_call_probing_bitrate_bps_ GUARDED_BY(&critsect_);