stefan | 64636dd | 2016-08-03 00:29:03 -0700 | [diff] [blame] | 1 | /* |
| 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 | */ |
michaelt | f082c2a | 2016-11-07 04:17:14 -0800 | [diff] [blame] | 10 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #include "modules/remote_bitrate_estimator/include/bwe_defines.h" |
Jonas Olsson | a4d8737 | 2019-07-05 19:08:33 +0200 | [diff] [blame] | 12 | |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 13 | #include "system_wrappers/include/field_trial.h" |
michaelt | f082c2a | 2016-11-07 04:17:14 -0800 | [diff] [blame] | 14 | |
stefan | 64636dd | 2016-08-03 00:29:03 -0700 | [diff] [blame] | 15 | namespace webrtc { |
| 16 | |
agrieve | 26622d3 | 2017-08-08 10:48:15 -0700 | [diff] [blame] | 17 | const char kBweTypeHistogram[] = "WebRTC.BWE.Types"; |
michaelt | f082c2a | 2016-11-07 04:17:14 -0800 | [diff] [blame] | 18 | |
| 19 | namespace congestion_controller { |
| 20 | int GetMinBitrateBps() { |
Sebastian Jansson | 470a5ea | 2019-01-23 12:37:49 +0100 | [diff] [blame] | 21 | constexpr int kMinBitrateBps = 5000; |
michaelt | f082c2a | 2016-11-07 04:17:14 -0800 | [diff] [blame] | 22 | return kMinBitrateBps; |
| 23 | } |
| 24 | |
Sebastian Jansson | 7c1744d | 2018-10-08 11:00:50 +0200 | [diff] [blame] | 25 | DataRate GetMinBitrate() { |
| 26 | return DataRate::bps(GetMinBitrateBps()); |
| 27 | } |
| 28 | |
michaelt | f082c2a | 2016-11-07 04:17:14 -0800 | [diff] [blame] | 29 | } // namespace congestion_controller |
nisse | 76e62b0 | 2017-05-31 02:24:52 -0700 | [diff] [blame] | 30 | |
| 31 | RateControlInput::RateControlInput( |
| 32 | BandwidthUsage bw_state, |
Sebastian Jansson | 5f00995 | 2018-11-19 18:02:20 +0100 | [diff] [blame] | 33 | const absl::optional<DataRate>& estimated_throughput) |
| 34 | : bw_state(bw_state), estimated_throughput(estimated_throughput) {} |
nisse | 76e62b0 | 2017-05-31 02:24:52 -0700 | [diff] [blame] | 35 | |
| 36 | RateControlInput::~RateControlInput() = default; |
| 37 | |
stefan | 64636dd | 2016-08-03 00:29:03 -0700 | [diff] [blame] | 38 | } // namespace webrtc |