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

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

Issue 2269993002: Now probe for x3 and x6 the initial start bitrate. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/include/congestion_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 68c306ce10077a93bbbf8e6c792b8dd20121970d..7757dfcb5240e3cf5b6776fdf47ad77e81cdb7f3 100644
--- a/webrtc/modules/congestion_controller/congestion_controller.cc
+++ b/webrtc/modules/congestion_controller/congestion_controller.cc
@@ -172,6 +172,7 @@ CongestionController::CongestionController(
transport_feedback_adapter_(bitrate_controller_.get(), clock_),
min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps),
max_bitrate_bps_(0),
+ initial_probing_triggered_(false),
last_reported_bitrate_bps_(0),
last_reported_fraction_loss_(0),
last_reported_rtt_(0),
@@ -202,6 +203,7 @@ CongestionController::CongestionController(
transport_feedback_adapter_(bitrate_controller_.get(), clock_),
min_bitrate_bps_(RemoteBitrateEstimator::kDefaultMinBitrateBps),
max_bitrate_bps_(0),
+ initial_probing_triggered_(false),
last_reported_bitrate_bps_(0),
last_reported_fraction_loss_(0),
last_reported_rtt_(0),
@@ -216,8 +218,6 @@ void CongestionController::Init() {
new DelayBasedBwe(&transport_feedback_adapter_, clock_));
transport_feedback_adapter_.GetBitrateEstimator()->SetMinBitrate(
min_bitrate_bps_);
- pacer_->CreateProbeCluster(900000, 6);
- pacer_->CreateProbeCluster(1800000, 5);
}
void CongestionController::SetBweBitrates(int min_bitrate_bps,
@@ -229,12 +229,18 @@ void CongestionController::SetBweBitrates(int min_bitrate_bps,
max_bitrate_bps);
{
+ rtc::CritScope cs(&critsect_);
+ if (!initial_probing_triggered_ && start_bitrate_bps > 0) {
stefan-webrtc 2016/08/23 14:54:27 Can start_bitrate_bps be zero? That sounds strange
philipel 2016/08/23 15:49:17 It can't, fixed.
+ pacer_->CreateProbeCluster(start_bitrate_bps * 3, 6);
+ pacer_->CreateProbeCluster(start_bitrate_bps * 6, 5);
+ initial_probing_triggered_ = true;
+ }
stefan-webrtc 2016/08/23 14:54:27 Should we add a test to ensure this doesn't regres
philipel 2016/08/23 15:49:17 There are perf tests that react to these changes a
+
// Only do probing if:
// - we are mid-call, which we consider to be if
// |last_reported_bitrate_bps_| != 0, and
// - the current bitrate is lower than the new |max_bitrate_bps|, and
// - we actually want to increase the |max_bitrate_bps_|.
- rtc::CritScope cs(&critsect_);
if (last_reported_bitrate_bps_ != 0 &&
last_reported_bitrate_bps_ < static_cast<uint32_t>(max_bitrate_bps) &&
max_bitrate_bps > max_bitrate_bps_) {
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/include/congestion_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698