1 /*
2  *  Copyright 2018 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 #ifndef RTC_BASE_EXPERIMENTS_RTT_MULT_EXPERIMENT_H_
11 #define RTC_BASE_EXPERIMENTS_RTT_MULT_EXPERIMENT_H_
12 
13 #include "absl/types/optional.h"
14 
15 namespace webrtc {
16 
17 class RttMultExperiment {
18  public:
19   struct Settings {
20     float rtt_mult_setting;  // Jitter buffer size is increased by this factor
21                              // times the estimated RTT.
22     float rtt_mult_add_cap_ms;  // Jitter buffer size increase is capped by this
23                                 // value.
24   };
25 
26   // Returns true if the experiment is enabled.
27   static bool RttMultEnabled();
28 
29   // Returns rtt_mult value and rtt_mult addition cap value from field trial.
30   static absl::optional<RttMultExperiment::Settings> GetRttMultValue();
31 };
32 
33 }  // namespace webrtc
34 
35 #endif  // RTC_BASE_EXPERIMENTS_RTT_MULT_EXPERIMENT_H_
36