2012-06-05 12:25:35 +00:00
|
|
|
/*
|
2012-06-07 08:10:14 +00:00
|
|
|
* Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
|
2012-06-05 12:25:35 +00:00
|
|
|
*
|
|
|
|
|
* 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.
|
|
|
|
|
*/
|
|
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#ifndef MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_BWE_DEFINES_H_
|
|
|
|
|
#define MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_BWE_DEFINES_H_
|
2012-06-05 12:25:35 +00:00
|
|
|
|
2018-06-18 10:48:16 +02:00
|
|
|
#include "absl/types/optional.h"
|
2012-06-05 12:25:35 +00:00
|
|
|
|
2015-12-15 00:51:54 -08:00
|
|
|
#define BWE_MAX(a, b) ((a) > (b) ? (a) : (b))
|
|
|
|
|
#define BWE_MIN(a, b) ((a) < (b) ? (a) : (b))
|
2013-04-18 20:26:28 +00:00
|
|
|
|
2012-06-05 12:25:35 +00:00
|
|
|
namespace webrtc {
|
2015-07-09 17:27:48 +02:00
|
|
|
|
2016-11-07 04:17:14 -08:00
|
|
|
namespace congestion_controller {
|
|
|
|
|
int GetMinBitrateBps();
|
|
|
|
|
} // namespace congestion_controller
|
|
|
|
|
|
2015-07-09 17:27:48 +02:00
|
|
|
static const int64_t kBitrateWindowMs = 1000;
|
|
|
|
|
|
2017-08-08 10:48:15 -07:00
|
|
|
extern const char kBweTypeHistogram[];
|
2016-08-03 00:29:03 -07:00
|
|
|
|
|
|
|
|
enum BweNames {
|
|
|
|
|
kReceiverNoExtension = 0,
|
|
|
|
|
kReceiverTOffset = 1,
|
|
|
|
|
kReceiverAbsSendTime = 2,
|
|
|
|
|
kSendSideTransportSeqNum = 3,
|
|
|
|
|
kBweNamesMax = 4
|
|
|
|
|
};
|
|
|
|
|
|
2017-04-11 00:49:44 -07:00
|
|
|
enum class BandwidthUsage {
|
2015-12-15 00:51:54 -08:00
|
|
|
kBwNormal = 0,
|
|
|
|
|
kBwUnderusing = 1,
|
|
|
|
|
kBwOverusing = 2,
|
2017-10-03 15:01:03 +02:00
|
|
|
kLast
|
2012-06-05 12:25:35 +00:00
|
|
|
};
|
|
|
|
|
|
2015-12-15 00:51:54 -08:00
|
|
|
enum RateControlState { kRcHold, kRcIncrease, kRcDecrease };
|
2012-06-05 12:25:35 +00:00
|
|
|
|
2015-12-15 00:51:54 -08:00
|
|
|
enum RateControlRegion { kRcNearMax, kRcAboveMax, kRcMaxUnknown };
|
|
|
|
|
|
|
|
|
|
struct RateControlInput {
|
|
|
|
|
RateControlInput(BandwidthUsage bw_state,
|
2018-06-28 16:38:05 +02:00
|
|
|
const absl::optional<uint32_t>& estimated_throughput_bps);
|
2017-05-31 02:24:52 -07:00
|
|
|
~RateControlInput();
|
2012-06-05 12:25:35 +00:00
|
|
|
|
2015-12-15 00:51:54 -08:00
|
|
|
BandwidthUsage bw_state;
|
2018-06-28 16:38:05 +02:00
|
|
|
absl::optional<uint32_t> estimated_throughput_bps;
|
2012-06-05 12:25:35 +00:00
|
|
|
};
|
2013-07-03 15:12:26 +00:00
|
|
|
} // namespace webrtc
|
2012-06-05 12:25:35 +00:00
|
|
|
|
2017-09-15 06:47:31 +02:00
|
|
|
#endif // MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_BWE_DEFINES_H_
|