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

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

Issue 2235373004: Probing: Add support for exponential startup probing (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@fix_probing2
Patch Set: Addressed comments Created 4 years, 4 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/congestion_controller/congestion_controller.cc
diff --git a/webrtc/modules/congestion_controller/congestion_controller.cc b/webrtc/modules/congestion_controller/congestion_controller.cc
index 5def7154e1bacfaa05d20eea9484e405e20d779d..fc0883cc9387a3f5fe6652c3b41ffb6e2178e37b 100644
--- a/webrtc/modules/congestion_controller/congestion_controller.cc
+++ b/webrtc/modules/congestion_controller/congestion_controller.cc
@@ -169,7 +169,7 @@ CongestionController::CongestionController(
retransmission_rate_limiter_(
new RateLimiter(clock, kRetransmitWindowSizeMs)),
remote_estimator_proxy_(clock_, packet_router_.get()),
- transport_feedback_adapter_(bitrate_controller_.get(), clock_),
+ transport_feedback_adapter_(clock_),
min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps),
max_bitrate_bps_(0),
last_reported_bitrate_bps_(0),
@@ -199,7 +199,7 @@ CongestionController::CongestionController(
retransmission_rate_limiter_(
new RateLimiter(clock, kRetransmitWindowSizeMs)),
remote_estimator_proxy_(clock_, packet_router_.get()),
- transport_feedback_adapter_(bitrate_controller_.get(), clock_),
+ transport_feedback_adapter_(clock_),
min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps),
max_bitrate_bps_(0),
last_reported_bitrate_bps_(0),
@@ -213,11 +213,9 @@ CongestionController::~CongestionController() {}
void CongestionController::Init() {
transport_feedback_adapter_.SetBitrateEstimator(
- new DelayBasedBwe(&transport_feedback_adapter_, clock_));
+ new DelayBasedBwe(this, clock_));
transport_feedback_adapter_.GetBitrateEstimator()->SetMinBitrate(
min_bitrate_bps_);
- pacer_->CreateProbeCluster(900000, 6);
- pacer_->CreateProbeCluster(1800000, 5);
}
void CongestionController::SetBweBitrates(int min_bitrate_bps,
@@ -266,8 +264,7 @@ void CongestionController::ResetBweAndBitrates(int bitrate_bps,
if (remote_bitrate_estimator_)
remote_bitrate_estimator_->SetMinBitrate(min_bitrate_bps);
- RemoteBitrateEstimator* rbe = new DelayBasedBwe(
- &transport_feedback_adapter_, clock_);
+ RemoteBitrateEstimator* rbe = new DelayBasedBwe(this, clock_);
transport_feedback_adapter_.SetBitrateEstimator(rbe);
rbe->SetMinBitrate(min_bitrate_bps);
// TODO(holmer): Trigger a new probe once mid-call probing is implemented.
@@ -326,6 +323,14 @@ void CongestionController::OnSentPacket(const rtc::SentPacket& sent_packet) {
sent_packet.send_time_ms);
}
+void CongestionController::OnDelayBasedBweChanged(int bitrate_bps) {
+ bitrate_controller_->UpdateDelayBasedEstimate(bitrate_bps);
+}
+
+bool CongestionController::IsExpectingProbingResults() {
+ return pacer_->IsExpectingProbingResults();
+}
+
void CongestionController::OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms) {
remote_bitrate_estimator_->OnRttUpdate(avg_rtt_ms, max_rtt_ms);
transport_feedback_adapter_.OnRttUpdate(avg_rtt_ms, max_rtt_ms);

Powered by Google App Engine
This is Rietveld 408576698