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 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 static rtc::Optional<AlrExperimentSettings> ParseAlrSettingsFromFieldTrial(); | 51 static rtc::Optional<AlrExperimentSettings> ParseAlrSettingsFromFieldTrial(); |
52 | 52 |
53 // Sent traffic percentage as a function of network capacity used to determine | 53 // Sent traffic percentage as a function of network capacity used to determine |
54 // application-limited region. ALR region start when bandwidth usage drops | 54 // application-limited region. ALR region start when bandwidth usage drops |
55 // below kAlrStartUsagePercent and ends when it raises above | 55 // below kAlrStartUsagePercent and ends when it raises above |
56 // kAlrEndUsagePercent. NOTE: This is intentionally conservative at the moment | 56 // kAlrEndUsagePercent. NOTE: This is intentionally conservative at the moment |
57 // until BW adjustments of application limited region is fine tuned. | 57 // until BW adjustments of application limited region is fine tuned. |
58 static constexpr int kDefaultAlrBandwidthUsagePercent = 65; | 58 static constexpr int kDefaultAlrBandwidthUsagePercent = 65; |
59 static constexpr int kDefaultAlrStartBudgetLevelPercent = 80; | 59 static constexpr int kDefaultAlrStartBudgetLevelPercent = 80; |
60 static constexpr int kDefaultAlrStopBudgetLevelPercent = 50; | 60 static constexpr int kDefaultAlrStopBudgetLevelPercent = 50; |
61 static const char* kScreenshareProbingBweExperimentName; | 61 static const char kScreenshareProbingBweExperimentName[]; |
62 | 62 |
63 void UpdateBudgetWithElapsedTime(int64_t delta_time_ms); | 63 void UpdateBudgetWithElapsedTime(int64_t delta_time_ms); |
64 void UpdateBudgetWithBytesSent(size_t bytes_sent); | 64 void UpdateBudgetWithBytesSent(size_t bytes_sent); |
65 | 65 |
66 private: | 66 private: |
67 int bandwidth_usage_percent_; | 67 int bandwidth_usage_percent_; |
68 int alr_start_budget_level_percent_; | 68 int alr_start_budget_level_percent_; |
69 int alr_stop_budget_level_percent_; | 69 int alr_stop_budget_level_percent_; |
70 | 70 |
71 IntervalBudget alr_budget_; | 71 IntervalBudget alr_budget_; |
72 rtc::Optional<int64_t> alr_started_time_ms_; | 72 rtc::Optional<int64_t> alr_started_time_ms_; |
73 }; | 73 }; |
74 | 74 |
75 } // namespace webrtc | 75 } // namespace webrtc |
76 | 76 |
77 #endif // WEBRTC_MODULES_PACING_ALR_DETECTOR_H_ | 77 #endif // WEBRTC_MODULES_PACING_ALR_DETECTOR_H_ |
OLD | NEW |