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

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

Issue 2861673006: Don't initiate perodic probing if we don't have a bandwidth estimate. (Closed)
Patch Set: Feedback Created 3 years, 7 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/probe_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/congestion_controller/probe_controller.cc
diff --git a/webrtc/modules/congestion_controller/probe_controller.cc b/webrtc/modules/congestion_controller/probe_controller.cc
index 52897eef369066460455130f06e9c3c88ef097d9..91340aa430acbe883f9aa671977287b45ac92329 100644
--- a/webrtc/modules/congestion_controller/probe_controller.cc
+++ b/webrtc/modules/congestion_controller/probe_controller.cc
@@ -59,6 +59,7 @@ void ProbeController::SetBitrates(int64_t min_bitrate_bps,
if (start_bitrate_bps > 0) {
start_bitrate_bps_ = start_bitrate_bps;
+ estimated_bitrate_bps_ = start_bitrate_bps;
} else if (start_bitrate_bps_ == 0) {
start_bitrate_bps_ = min_bitrate_bps;
}
@@ -212,7 +213,7 @@ void ProbeController::Process() {
// Probe bandwidth periodically when in ALR state.
rtc::Optional<int64_t> alr_start_time =
pacer_->GetApplicationLimitedRegionStartTime();
- if (alr_start_time) {
+ if (alr_start_time && estimated_bitrate_bps_ > 0) {
int64_t next_probe_time_ms =
std::max(*alr_start_time, time_last_probing_initiated_ms_) +
kAlrPeriodicProbingIntervalMs;
@@ -227,6 +228,7 @@ void ProbeController::InitiateProbing(
std::initializer_list<int64_t> bitrates_to_probe,
bool probe_further) {
for (int64_t bitrate : bitrates_to_probe) {
+ RTC_DCHECK_GT(bitrate, 0);
int64_t max_probe_bitrate_bps =
max_bitrate_bps_ > 0 ? max_bitrate_bps_ : kDefaultMaxProbingBitrateBps;
if (bitrate > max_probe_bitrate_bps) {
« no previous file with comments | « no previous file | webrtc/modules/congestion_controller/probe_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698