blob: 91f3cd4050b78f0ff72d246f05fb38317f74a2e7 [file] [log] [blame]
stefan64636dd2016-08-03 00:29:03 -07001/*
2 * Copyright (c) 2016 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 */
michaeltf082c2a2016-11-07 04:17:14 -080010
Mirko Bonadei92ea95e2017-09-15 06:47:31 +020011#include "modules/remote_bitrate_estimator/include/bwe_defines.h"
12#include "system_wrappers/include/field_trial.h"
michaeltf082c2a2016-11-07 04:17:14 -080013
stefan64636dd2016-08-03 00:29:03 -070014namespace webrtc {
15
agrieve26622d32017-08-08 10:48:15 -070016const char kBweTypeHistogram[] = "WebRTC.BWE.Types";
michaeltf082c2a2016-11-07 04:17:14 -080017
18namespace congestion_controller {
19int GetMinBitrateBps() {
20 constexpr int kAudioMinBitrateBps = 5000;
21 constexpr int kMinBitrateBps = 10000;
Alex Narest853715c2018-03-15 11:00:44 +010022 if (webrtc::field_trial::IsEnabled("WebRTC-Audio-SendSideBwe") &&
23 !webrtc::field_trial::IsEnabled("WebRTC-Audio-SendSideBwe-For-Video")) {
michaeltf082c2a2016-11-07 04:17:14 -080024 return kAudioMinBitrateBps;
25 }
26 return kMinBitrateBps;
27}
28
Sebastian Jansson7c1744d2018-10-08 11:00:50 +020029DataRate GetMinBitrate() {
30 return DataRate::bps(GetMinBitrateBps());
31}
32
michaeltf082c2a2016-11-07 04:17:14 -080033} // namespace congestion_controller
nisse76e62b02017-05-31 02:24:52 -070034
35RateControlInput::RateControlInput(
36 BandwidthUsage bw_state,
Sebastian Jansson5f009952018-11-19 18:02:20 +010037 const absl::optional<DataRate>& estimated_throughput)
38 : bw_state(bw_state), estimated_throughput(estimated_throughput) {}
nisse76e62b02017-05-31 02:24:52 -070039
40RateControlInput::~RateControlInput() = default;
41
stefan64636dd2016-08-03 00:29:03 -070042} // namespace webrtc