Sebastian Jansson | cabe383 | 2018-01-12 10:54:18 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 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 |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef RTC_BASE_EXPERIMENTS_ALR_EXPERIMENT_H_ |
| 12 | #define RTC_BASE_EXPERIMENTS_ALR_EXPERIMENT_H_ |
| 13 | |
Danil Chapovalov | 0a1d189 | 2018-06-21 11:48:25 +0200 | [diff] [blame^] | 14 | #include "absl/types/optional.h" |
Sebastian Jansson | cabe383 | 2018-01-12 10:54:18 +0100 | [diff] [blame] | 15 | |
| 16 | namespace webrtc { |
| 17 | struct AlrExperimentSettings { |
| 18 | public: |
| 19 | float pacing_factor; |
| 20 | int64_t max_paced_queue_time; |
| 21 | int alr_bandwidth_usage_percent; |
| 22 | int alr_start_budget_level_percent; |
| 23 | int alr_stop_budget_level_percent; |
| 24 | // Will be sent to the receive side for stats slicing. |
| 25 | // Can be 0..6, because it's sent as a 3 bits value and there's also |
| 26 | // reserved value to indicate absence of experiment. |
| 27 | int group_id; |
| 28 | |
| 29 | static const char kScreenshareProbingBweExperimentName[]; |
| 30 | static const char kStrictPacingAndProbingExperimentName[]; |
Danil Chapovalov | 0a1d189 | 2018-06-21 11:48:25 +0200 | [diff] [blame^] | 31 | static absl::optional<AlrExperimentSettings> CreateFromFieldTrial( |
Sebastian Jansson | cabe383 | 2018-01-12 10:54:18 +0100 | [diff] [blame] | 32 | const char* experiment_name); |
| 33 | static bool MaxOneFieldTrialEnabled(); |
| 34 | |
| 35 | private: |
| 36 | AlrExperimentSettings() = default; |
| 37 | }; |
| 38 | } // namespace webrtc |
| 39 | |
| 40 | #endif // RTC_BASE_EXPERIMENTS_ALR_EXPERIMENT_H_ |