OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_MODULES_RTP_RTCP_SOURCE_BWE_DEFINES_H_ | 11 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_BWE_DEFINES_H_ |
12 #define WEBRTC_MODULES_RTP_RTCP_SOURCE_BWE_DEFINES_H_ | 12 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_BWE_DEFINES_H_ |
13 | 13 |
14 #include "webrtc/typedefs.h" | 14 #include "webrtc/typedefs.h" |
15 | 15 |
16 #define BWE_MAX(a,b) ((a)>(b)?(a):(b)) | 16 #define BWE_MAX(a, b) ((a) > (b) ? (a) : (b)) |
17 #define BWE_MIN(a,b) ((a)<(b)?(a):(b)) | 17 #define BWE_MIN(a, b) ((a) < (b) ? (a) : (b)) |
18 | 18 |
19 namespace webrtc { | 19 namespace webrtc { |
20 | 20 |
21 static const int64_t kBitrateWindowMs = 1000; | 21 static const int64_t kBitrateWindowMs = 1000; |
22 | 22 |
23 enum BandwidthUsage | 23 enum BandwidthUsage { |
24 { | |
25 kBwNormal = 0, | 24 kBwNormal = 0, |
26 kBwUnderusing = 1, | 25 kBwUnderusing = 1, |
27 kBwOverusing = 2, | 26 kBwOverusing = 2, |
28 }; | 27 }; |
29 | 28 |
30 enum RateControlState | 29 enum RateControlState { |
31 { | |
32 kRcHold, | 30 kRcHold, |
33 kRcIncrease, | 31 kRcIncrease, |
34 kRcDecrease | 32 kRcDecrease |
35 }; | 33 }; |
36 | 34 |
37 enum RateControlRegion | 35 enum RateControlRegion { |
38 { | |
39 kRcNearMax, | 36 kRcNearMax, |
40 kRcAboveMax, | 37 kRcAboveMax, |
41 kRcMaxUnknown | 38 kRcMaxUnknown |
42 }; | 39 }; |
43 | 40 |
44 class RateControlInput | 41 class RateControlInput { |
45 { | 42 public: |
46 public: | 43 RateControlInput(BandwidthUsage bwState, |
47 RateControlInput(BandwidthUsage bwState, | 44 uint32_t incomingBitRate, |
48 uint32_t incomingBitRate, | 45 double noiseVar) |
49 double noiseVar) | 46 : _bwState(bwState), |
50 : _bwState(bwState), | 47 _incomingBitRate(incomingBitRate), |
51 _incomingBitRate(incomingBitRate), | 48 _noiseVar(noiseVar) {} |
52 _noiseVar(noiseVar) {} | |
53 | 49 |
54 BandwidthUsage _bwState; | 50 BandwidthUsage _bwState; |
55 uint32_t _incomingBitRate; | 51 uint32_t _incomingBitRate; |
56 double _noiseVar; | 52 double _noiseVar; |
stefan-webrtc
2015/12/11 11:08:50
Could you fix these too so that they match bw_stat
terelius
2015/12/11 13:06:09
Done.
| |
57 }; | 53 }; |
58 } // namespace webrtc | 54 } // namespace webrtc |
59 | 55 |
60 #endif // WEBRTC_MODULES_RTP_RTCP_SOURCE_BWE_DEFINES_H_ | 56 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_INCLUDE_BWE_DEFINES_H_ |
OLD | NEW |