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_KEYFRAME_INTERVAL_SETTINGS_H_ 12 #define RTC_BASE_EXPERIMENTS_KEYFRAME_INTERVAL_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 // TODO(bugs.webrtc.org/10427): Remove and replace with proper configuration 21 // parameter, or move to using FIR if intent is to avoid triggering multiple 22 // times to PLIs corresponding to the same request when RTT is large. 23 class KeyframeIntervalSettings final { 24 public: 25 static KeyframeIntervalSettings ParseFromFieldTrials(); 26 27 // Sender side. 28 // The encoded keyframe send rate is <= 1/MinKeyframeSendIntervalMs(). 29 absl::optional<int> MinKeyframeSendIntervalMs() const; 30 31 private: 32 explicit KeyframeIntervalSettings(const FieldTrialsView* key_value_config); 33 34 FieldTrialOptional<int> min_keyframe_send_interval_ms_; 35 }; 36 37 } // namespace webrtc 38 39 #endif // RTC_BASE_EXPERIMENTS_KEYFRAME_INTERVAL_SETTINGS_H_ 40