OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (c) 2012 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 | |
11 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_RATE_CONTROL_H_ | |
12 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_RATE_CONTROL_H_ | |
13 | |
14 #include "webrtc/modules/remote_bitrate_estimator/include/bwe_defines.h" | |
15 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat or.h" | |
16 | |
17 namespace webrtc { | |
18 | |
19 class RemoteRateControl { | |
20 public: | |
21 static RemoteRateControl* Create(RateControlType control_type, | |
22 uint32_t min_bitrate_bps); | |
23 | |
24 virtual ~RemoteRateControl() {} | |
25 | |
26 // Returns true if there is a valid estimate of the incoming bitrate, false | |
27 // otherwise. | |
28 virtual bool ValidEstimate() const = 0; | |
29 virtual RateControlType GetControlType() const = 0; | |
30 virtual uint32_t GetMinBitrate() const = 0; | |
31 virtual int64_t GetFeedbackInterval() const = 0; | |
32 | |
33 // Returns true if the bitrate estimate hasn't been changed for more than | |
34 // an RTT, or if the incoming_bitrate is more than 5% above the current | |
35 // estimate. Should be used to decide if we should reduce the rate further | |
36 // when over-using. | |
stefan-webrtc
2015/06/30 11:38:18
Can you verify that this comment isn't getting los
sprang_webrtc
2015/07/06 07:54:29
Comment was already in aimd_rate_control.h, but fi
| |
37 virtual bool TimeToReduceFurther(int64_t time_now, | |
38 uint32_t incoming_bitrate_bps) const = 0; | |
39 virtual uint32_t LatestEstimate() const = 0; | |
40 virtual uint32_t UpdateBandwidthEstimate(int64_t now_ms) = 0; | |
41 virtual void SetRtt(int64_t rtt) = 0; | |
42 virtual RateControlRegion Update(const RateControlInput* input, | |
43 int64_t now_ms) = 0; | |
44 virtual void SetEstimate(int bitrate_bps, int64_t time_now_ms) = 0; | |
45 | |
46 protected: | |
47 static const int64_t kMaxFeedbackIntervalMs; | |
48 }; | |
49 } // namespace webrtc | |
50 | |
51 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_RATE_CONTROL_H_ | |
OLD | NEW |