blob: e3b12c54e352fda10fd17e4c78db34392a1576a5 [file] [log] [blame]
Åsa Persson517678c2019-05-06 14:17:35 +02001/*
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_QUALITY_SCALER_SETTINGS_H_
12#define RTC_BASE_EXPERIMENTS_QUALITY_SCALER_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
18namespace webrtc {
19
20class QualityScalerSettings final {
21 public:
22 static QualityScalerSettings ParseFromFieldTrials();
23
24 absl::optional<int> MinFrames() const;
25 absl::optional<double> InitialScaleFactor() const;
26 absl::optional<double> ScaleFactor() const;
Åsa Persson139f4dc2019-08-02 09:29:58 +020027 absl::optional<int> InitialBitrateIntervalMs() const;
28 absl::optional<double> InitialBitrateFactor() const;
Åsa Persson517678c2019-05-06 14:17:35 +020029
30 private:
31 explicit QualityScalerSettings(
32 const WebRtcKeyValueConfig* const key_value_config);
33
34 FieldTrialOptional<int> min_frames_;
35 FieldTrialOptional<double> initial_scale_factor_;
36 FieldTrialOptional<double> scale_factor_;
Åsa Persson139f4dc2019-08-02 09:29:58 +020037 FieldTrialOptional<int> initial_bitrate_interval_ms_;
38 FieldTrialOptional<double> initial_bitrate_factor_;
Åsa Persson517678c2019-05-06 14:17:35 +020039};
40
41} // namespace webrtc
42
43#endif // RTC_BASE_EXPERIMENTS_QUALITY_SCALER_SETTINGS_H_