OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 void Update(int64_t now_ms, int bytes); | 70 void Update(int64_t now_ms, int bytes); |
71 rtc::Optional<uint32_t> bitrate_bps() const; | 71 rtc::Optional<uint32_t> bitrate_bps() const; |
72 | 72 |
73 private: | 73 private: |
74 float UpdateWindow(int64_t now_ms, int bytes, int rate_window_ms); | 74 float UpdateWindow(int64_t now_ms, int bytes, int rate_window_ms); |
75 int sum_; | 75 int sum_; |
76 int64_t current_win_ms_; | 76 int64_t current_win_ms_; |
77 int64_t prev_time_ms_; | 77 int64_t prev_time_ms_; |
78 float bitrate_estimate_; | 78 float bitrate_estimate_; |
79 float bitrate_estimate_var_; | 79 float bitrate_estimate_var_; |
80 RateStatistics old_estimator_; | |
81 const bool in_experiment_; | |
82 }; | 80 }; |
83 | 81 |
84 Result IncomingPacketFeedback(const PacketFeedback& packet_feedback); | 82 Result IncomingPacketFeedback(const PacketFeedback& packet_feedback); |
85 Result OnLongFeedbackDelay(int64_t arrival_time_ms); | 83 Result OnLongFeedbackDelay(int64_t arrival_time_ms); |
86 // Updates the current remote rate estimate and returns true if a valid | 84 // Updates the current remote rate estimate and returns true if a valid |
87 // estimate exists. | 85 // estimate exists. |
88 bool UpdateEstimate(int64_t packet_arrival_time_ms, | 86 bool UpdateEstimate(int64_t packet_arrival_time_ms, |
89 int64_t now_ms, | 87 int64_t now_ms, |
90 rtc::Optional<uint32_t> acked_bitrate_bps, | 88 rtc::Optional<uint32_t> acked_bitrate_bps, |
91 uint32_t* target_bitrate_bps); | 89 uint32_t* target_bitrate_bps); |
(...skipping 23 matching lines...) Expand all Loading... |
115 int consecutive_delayed_feedbacks_; | 113 int consecutive_delayed_feedbacks_; |
116 uint32_t last_logged_bitrate_; | 114 uint32_t last_logged_bitrate_; |
117 BandwidthUsage last_logged_state_; | 115 BandwidthUsage last_logged_state_; |
118 | 116 |
119 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe); | 117 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe); |
120 }; | 118 }; |
121 | 119 |
122 } // namespace webrtc | 120 } // namespace webrtc |
123 | 121 |
124 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ | 122 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ |
OLD | NEW |