OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 |
(...skipping 14 matching lines...) Expand all Loading... |
25 public: | 25 public: |
26 AimdRateControl(); | 26 AimdRateControl(); |
27 virtual ~AimdRateControl() {} | 27 virtual ~AimdRateControl() {} |
28 | 28 |
29 // Returns true if there is a valid estimate of the incoming bitrate, false | 29 // Returns true if there is a valid estimate of the incoming bitrate, false |
30 // otherwise. | 30 // otherwise. |
31 bool ValidEstimate() const; | 31 bool ValidEstimate() const; |
32 void SetMinBitrate(int min_bitrate_bps); | 32 void SetMinBitrate(int min_bitrate_bps); |
33 int64_t GetFeedbackInterval() const; | 33 int64_t GetFeedbackInterval() const; |
34 // Returns true if the bitrate estimate hasn't been changed for more than | 34 // Returns true if the bitrate estimate hasn't been changed for more than |
35 // an RTT, or if the incoming_bitrate is more than 5% above the current | 35 // an RTT, or if the incoming_bitrate is less than half of the current |
36 // estimate. Should be used to decide if we should reduce the rate further | 36 // estimate. Should be used to decide if we should reduce the rate further |
37 // when over-using. | 37 // when over-using. |
38 bool TimeToReduceFurther(int64_t time_now, | 38 bool TimeToReduceFurther(int64_t time_now, |
39 uint32_t incoming_bitrate_bps) const; | 39 uint32_t incoming_bitrate_bps) const; |
40 uint32_t LatestEstimate() const; | 40 uint32_t LatestEstimate() const; |
41 uint32_t UpdateBandwidthEstimate(int64_t now_ms); | 41 uint32_t UpdateBandwidthEstimate(int64_t now_ms); |
42 void SetRtt(int64_t rtt); | 42 void SetRtt(int64_t rtt); |
43 void Update(const RateControlInput* input, int64_t now_ms); | 43 void Update(const RateControlInput* input, int64_t now_ms); |
44 void SetEstimate(int bitrate_bps, int64_t now_ms); | 44 void SetEstimate(int bitrate_bps, int64_t now_ms); |
45 | 45 |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 int64_t time_first_incoming_estimate_; | 82 int64_t time_first_incoming_estimate_; |
83 bool bitrate_is_initialized_; | 83 bool bitrate_is_initialized_; |
84 float beta_; | 84 float beta_; |
85 int64_t rtt_; | 85 int64_t rtt_; |
86 bool in_experiment_; | 86 bool in_experiment_; |
87 rtc::Optional<int> last_decrease_; | 87 rtc::Optional<int> last_decrease_; |
88 }; | 88 }; |
89 } // namespace webrtc | 89 } // namespace webrtc |
90 | 90 |
91 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_AIMD_RATE_CONTROL_H_ | 91 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_AIMD_RATE_CONTROL_H_ |
OLD | NEW |