webrtc/rtc_base/experiments/quality_scaler_settings.h
Åsa Persson 139f4dc7ac QualityScaler: Add option to try fast adapt down at start up based on initial bw estimates.
optional<int> initial_bitrate_interval_ms: time interval since start of call
where fast adapt down is allowed.
optional<double> initial_bitrate_factor: try fast adapt down if bw estimate is
below initial bitrate * factor.

Bug: none
Change-Id: I63e1fdaac6556d8e9a961a42e11c925f9ecb9771
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147725
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28753}
2019-08-05 09:43:19 +00:00

43 lines
1.4 KiB
C++

/*
* Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef RTC_BASE_EXPERIMENTS_QUALITY_SCALER_SETTINGS_H_
#define RTC_BASE_EXPERIMENTS_QUALITY_SCALER_SETTINGS_H_
#include "absl/types/optional.h"
#include "api/transport/webrtc_key_value_config.h"
#include "rtc_base/experiments/field_trial_parser.h"
namespace webrtc {
class QualityScalerSettings final {
public:
static QualityScalerSettings ParseFromFieldTrials();
absl::optional<int> MinFrames() const;
absl::optional<double> InitialScaleFactor() const;
absl::optional<double> ScaleFactor() const;
absl::optional<int> InitialBitrateIntervalMs() const;
absl::optional<double> InitialBitrateFactor() const;
private:
explicit QualityScalerSettings(
const WebRtcKeyValueConfig* const key_value_config);
FieldTrialOptional<int> min_frames_;
FieldTrialOptional<double> initial_scale_factor_;
FieldTrialOptional<double> scale_factor_;
FieldTrialOptional<int> initial_bitrate_interval_ms_;
FieldTrialOptional<double> initial_bitrate_factor_;
};
} // namespace webrtc
#endif // RTC_BASE_EXPERIMENTS_QUALITY_SCALER_SETTINGS_H_