blob: 0b26d82332982c0d83246a9453b1f26003a513ef [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;
27
28 private:
29 explicit QualityScalerSettings(
30 const WebRtcKeyValueConfig* const key_value_config);
31
32 FieldTrialOptional<int> min_frames_;
33 FieldTrialOptional<double> initial_scale_factor_;
34 FieldTrialOptional<double> scale_factor_;
35};
36
37} // namespace webrtc
38
39#endif // RTC_BASE_EXPERIMENTS_QUALITY_SCALER_SETTINGS_H_