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

Side by Side Diff: webrtc/modules/congestion_controller/delay_based_bwe.cc

Issue 2717973005: Test field trial group with startswith rather than equals. (Closed)
Patch Set: const char*, two more IsEnabled Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 constexpr size_t kDefaultMedianSlopeWindowSize = 20; 50 constexpr size_t kDefaultMedianSlopeWindowSize = 20;
51 constexpr double kDefaultMedianSlopeThresholdGain = 4.0; 51 constexpr double kDefaultMedianSlopeThresholdGain = 4.0;
52 52
53 constexpr int kMaxConsecutiveFailedLookups = 5; 53 constexpr int kMaxConsecutiveFailedLookups = 5;
54 54
55 const char kBitrateEstimateExperiment[] = "WebRTC-ImprovedBitrateEstimate"; 55 const char kBitrateEstimateExperiment[] = "WebRTC-ImprovedBitrateEstimate";
56 const char kBweTrendlineFilterExperiment[] = "WebRTC-BweTrendlineFilter"; 56 const char kBweTrendlineFilterExperiment[] = "WebRTC-BweTrendlineFilter";
57 const char kBweMedianSlopeFilterExperiment[] = "WebRTC-BweMedianSlopeFilter"; 57 const char kBweMedianSlopeFilterExperiment[] = "WebRTC-BweMedianSlopeFilter";
58 58
59 bool BitrateEstimateExperimentIsEnabled() { 59 bool BitrateEstimateExperimentIsEnabled() {
60 return webrtc::field_trial::FindFullName(kBitrateEstimateExperiment) == 60 return webrtc::field_trial::IsEnabled(kBitrateEstimateExperiment);
61 "Enabled";
62 } 61 }
63 62
64 bool TrendlineFilterExperimentIsEnabled() { 63 bool TrendlineFilterExperimentIsEnabled() {
65 std::string experiment_string = 64 std::string experiment_string =
66 webrtc::field_trial::FindFullName(kBweTrendlineFilterExperiment); 65 webrtc::field_trial::FindFullName(kBweTrendlineFilterExperiment);
67 // The experiment is enabled iff the field trial string begins with "Enabled". 66 // The experiment is enabled iff the field trial string begins with "Enabled".
68 return experiment_string.find("Enabled") == 0; 67 return experiment_string.find("Enabled") == 0;
69 } 68 }
70 69
71 bool MedianSlopeFilterExperimentIsEnabled() { 70 bool MedianSlopeFilterExperimentIsEnabled() {
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 void DelayBasedBwe::SetMinBitrate(int min_bitrate_bps) { 444 void DelayBasedBwe::SetMinBitrate(int min_bitrate_bps) {
446 // Called from both the configuration thread and the network thread. Shouldn't 445 // Called from both the configuration thread and the network thread. Shouldn't
447 // be called from the network thread in the future. 446 // be called from the network thread in the future.
448 rate_control_.SetMinBitrate(min_bitrate_bps); 447 rate_control_.SetMinBitrate(min_bitrate_bps);
449 } 448 }
450 449
451 int64_t DelayBasedBwe::GetProbingIntervalMs() const { 450 int64_t DelayBasedBwe::GetProbingIntervalMs() const {
452 return probing_interval_estimator_.GetIntervalMs(); 451 return probing_interval_estimator_.GetIntervalMs();
453 } 452 }
454 } // namespace webrtc 453 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698