xref: /aosp_15_r20/external/webrtc/rtc_base/experiments/bandwidth_quality_scaler_settings.h (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1 /*
2  *  Copyright (c) 2021 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_BANDWIDTH_QUALITY_SCALER_SETTINGS_H_
12 #define RTC_BASE_EXPERIMENTS_BANDWIDTH_QUALITY_SCALER_SETTINGS_H_
13 
14 #include "absl/types/optional.h"
15 #include "api/field_trials_view.h"
16 #include "rtc_base/experiments/field_trial_parser.h"
17 
18 namespace webrtc {
19 
20 class BandwidthQualityScalerSettings final {
21  public:
22   static BandwidthQualityScalerSettings ParseFromFieldTrials();
23 
24   absl::optional<uint32_t> BitrateStateUpdateInterval() const;
25 
26  private:
27   explicit BandwidthQualityScalerSettings(
28       const FieldTrialsView* const key_value_config);
29 
30   FieldTrialOptional<uint32_t> bitrate_state_update_interval_s_;
31 };
32 
33 }  // namespace webrtc
34 
35 #endif  // RTC_BASE_EXPERIMENTS_BANDWIDTH_QUALITY_SCALER_SETTINGS_H_
36