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

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 88bc9071364ea8f169f957cc9e9d38aa35f3f59e..e6f54b20d724283822065f8ae168621bdcc0d10a 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),
last_reported_bitrate_bps_(0),
last_reported_fraction_loss_(0),
@@ -198,7 +198,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),
last_reported_bitrate_bps_(0),
last_reported_fraction_loss_(0),
@@ -211,7 +211,7 @@ 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_);
}
@@ -246,8 +246,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.
@@ -306,6 +305,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