From 1c1b1ea137cef7b40e569eb79ff21849ddbdc3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Spr=C3=A5ng?= Date: Wed, 3 Apr 2019 20:20:42 +0200 Subject: [PATCH] Allow setting ALR values for screen content again MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When ALR was made default-on we removed the ability to use field trials to configure alternative ALR detector values. This CL just restores the ability to force them, defaults are unaffected. Bug: webrtc:10509 Change-Id: Ibc09e27f1f7b72513de1482d280683802e962497 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/131145 Reviewed-by: Ilya Nikolaevskiy Commit-Queue: Erik Språng Cr-Commit-Position: refs/heads/master@{#27442} --- rtc_base/experiments/alr_experiment.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/rtc_base/experiments/alr_experiment.cc b/rtc_base/experiments/alr_experiment.cc index 25e948d98a..15a3438361 100644 --- a/rtc_base/experiments/alr_experiment.cc +++ b/rtc_base/experiments/alr_experiment.cc @@ -44,17 +44,16 @@ AlrExperimentSettings::CreateFromFieldTrial(const char* experiment_name) { group_name.resize(group_name.length() - kIgnoredSuffix.length()); } - if (experiment_name == kScreenshareProbingBweExperimentName) { - // This experiment is now default-on with fixed settings. - // TODO(sprang): Remove this kill-switch and clean up experiment code. - if (group_name != "Disabled") { + if (group_name.empty()) { + if (experiment_name == kScreenshareProbingBweExperimentName) { + // This experiment is now default-on with fixed settings. + // TODO(sprang): Remove this kill-switch and clean up experiment code. group_name = kDefaultProbingScreenshareBweSettings; + } else { + return ret; } } - if (group_name.empty()) - return ret; - AlrExperimentSettings settings; if (sscanf(group_name.c_str(), "%f,%" PRId64 ",%d,%d,%d,%d", &settings.pacing_factor, &settings.max_paced_queue_time,