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

Unified Diff: webrtc/modules/congestion_controller/send_side_congestion_controller.cc

Issue 2986563002: Add probing to recover faster from large bitrate drops. (Closed)
Patch Set: Move drop detection to ProbeController. Created 3 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
« no previous file with comments | « webrtc/modules/congestion_controller/probe_controller_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/congestion_controller/send_side_congestion_controller.cc
diff --git a/webrtc/modules/congestion_controller/send_side_congestion_controller.cc b/webrtc/modules/congestion_controller/send_side_congestion_controller.cc
index 5328161e084896a89136f4d69e45bfd559158808..df9d762aa803b32e13d92e2a785c84d16e156022 100644
--- a/webrtc/modules/congestion_controller/send_side_congestion_controller.cc
+++ b/webrtc/modules/congestion_controller/send_side_congestion_controller.cc
@@ -283,8 +283,10 @@ void SendSideCongestionController::OnTransportFeedback(
bool currently_in_alr =
pacer_->GetApplicationLimitedRegionStartTime().has_value();
- if (!currently_in_alr && was_in_alr_) {
- acknowledged_bitrate_estimator_->SetAlrEndedTimeMs(rtc::TimeMillis());
+ if (was_in_alr_ && !currently_in_alr) {
+ int64_t now_ms = rtc::TimeMillis();
+ acknowledged_bitrate_estimator_->SetAlrEndedTimeMs(now_ms);
+ probe_controller_->SetAlrEndedTimeMs(now_ms);
}
was_in_alr_ = currently_in_alr;
@@ -296,8 +298,13 @@ void SendSideCongestionController::OnTransportFeedback(
result = delay_based_bwe_->IncomingPacketFeedbackVector(
feedback_vector, acknowledged_bitrate_estimator_->bitrate_bps());
}
- if (result.updated)
+ if (result.updated) {
bitrate_controller_->OnDelayBasedBweResult(result);
+ // Update the estimate in the ProbeController, in case we want to probe.
+ MaybeTriggerOnNetworkChanged();
+ }
+ if (result.recovered_from_overuse)
+ probe_controller_->RequestProbe();
}
std::vector<PacketFeedback>
« no previous file with comments | « webrtc/modules/congestion_controller/probe_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698