OLD | NEW |
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 |
11 #include "webrtc/modules/pacing/alr_detector.h" | 11 #include "webrtc/modules/pacing/alr_detector.h" |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "webrtc/rtc_base/checks.h" | 15 #include "webrtc/rtc_base/checks.h" |
16 #include "webrtc/rtc_base/format_macros.h" | 16 #include "webrtc/rtc_base/format_macros.h" |
17 #include "webrtc/rtc_base/logging.h" | 17 #include "webrtc/rtc_base/logging.h" |
18 #include "webrtc/rtc_base/timeutils.h" | 18 #include "webrtc/rtc_base/timeutils.h" |
19 #include "webrtc/system_wrappers/include/field_trial.h" | 19 #include "webrtc/system_wrappers/include/field_trial.h" |
20 | 20 |
21 namespace webrtc { | 21 namespace webrtc { |
22 | 22 |
23 const char* AlrDetector::kScreenshareProbingBweExperimentName = | 23 const char AlrDetector::kScreenshareProbingBweExperimentName[] = |
24 "WebRTC-ProbingScreenshareBwe"; | 24 "WebRTC-ProbingScreenshareBwe"; |
25 const char* AlrDetector::kStrictPacingAndProbingExperimentName = | 25 const char AlrDetector::kStrictPacingAndProbingExperimentName[] = |
26 "WebRTC-StrictPacingAndProbing"; | 26 "WebRTC-StrictPacingAndProbing"; |
27 | 27 |
28 AlrDetector::AlrDetector() | 28 AlrDetector::AlrDetector() |
29 : bandwidth_usage_percent_(kDefaultAlrBandwidthUsagePercent), | 29 : bandwidth_usage_percent_(kDefaultAlrBandwidthUsagePercent), |
30 alr_start_budget_level_percent_(kDefaultAlrStartBudgetLevelPercent), | 30 alr_start_budget_level_percent_(kDefaultAlrStartBudgetLevelPercent), |
31 alr_stop_budget_level_percent_(kDefaultAlrStopBudgetLevelPercent), | 31 alr_stop_budget_level_percent_(kDefaultAlrStopBudgetLevelPercent), |
32 alr_budget_(0, true) { | 32 alr_budget_(0, true) { |
33 RTC_CHECK( | 33 RTC_CHECK( |
34 field_trial::FindFullName(kStrictPacingAndProbingExperimentName) | 34 field_trial::FindFullName(kStrictPacingAndProbingExperimentName) |
35 .empty() || | 35 .empty() || |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 << ", ALR end budget level percent: " | 108 << ", ALR end budget level percent: " |
109 << settings.alr_stop_budget_level_percent; | 109 << settings.alr_stop_budget_level_percent; |
110 } else { | 110 } else { |
111 LOG(LS_INFO) << "Failed to parse ALR experiment: " << experiment_name; | 111 LOG(LS_INFO) << "Failed to parse ALR experiment: " << experiment_name; |
112 } | 112 } |
113 | 113 |
114 return ret; | 114 return ret; |
115 } | 115 } |
116 | 116 |
117 } // namespace webrtc | 117 } // namespace webrtc |
OLD | NEW |