Erik Språng | d7ee76c | 2019-08-02 16:32:24 +0200 | [diff] [blame^] | 1 | /* |
| 2 | * Copyright (c) 2019 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_EXPERIMENTAL_SCREENSHARE_SETTINGS_H_ |
| 12 | #define RTC_BASE_EXPERIMENTS_EXPERIMENTAL_SCREENSHARE_SETTINGS_H_ |
| 13 | |
| 14 | #include "absl/types/optional.h" |
| 15 | #include "api/transport/webrtc_key_value_config.h" |
| 16 | #include "rtc_base/experiments/field_trial_parser.h" |
| 17 | |
| 18 | namespace webrtc { |
| 19 | |
| 20 | class ExperimentalScreenshareSettings { |
| 21 | public: |
| 22 | static ExperimentalScreenshareSettings ParseFromFieldTrials(); |
| 23 | explicit ExperimentalScreenshareSettings( |
| 24 | const WebRtcKeyValueConfig* key_value_config); |
| 25 | |
| 26 | absl::optional<int> MaxQp() const; |
| 27 | absl::optional<bool> DefaultTlInBaseLayer() const; |
| 28 | absl::optional<int> BaseLayerMaxBitrate() const; |
| 29 | absl::optional<int> TopLayerMaxBitrate() const; |
| 30 | |
| 31 | private: |
| 32 | FieldTrialOptional<int> max_qp_; |
| 33 | FieldTrialOptional<bool> default_tl_in_base_layer_; |
| 34 | FieldTrialOptional<int> base_layer_max_bitrate_; |
| 35 | FieldTrialOptional<int> top_layer_max_bitrate; |
| 36 | }; |
| 37 | |
| 38 | } // namespace webrtc |
| 39 | |
| 40 | #endif // RTC_BASE_EXPERIMENTS_EXPERIMENTAL_SCREENSHARE_SETTINGS_H_ |