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 |
11 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ | 11 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ |
12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ | 12 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 #include <utility> | 15 #include <utility> |
16 #include <vector> | 16 #include <vector> |
17 | 17 |
18 #include "webrtc/base/checks.h" | 18 #include "webrtc/base/checks.h" |
19 #include "webrtc/base/constructormagic.h" | 19 #include "webrtc/base/constructormagic.h" |
20 #include "webrtc/base/thread_checker.h" | 20 #include "webrtc/base/race_checker.h" |
21 #include "webrtc/modules/congestion_controller/median_slope_estimator.h" | 21 #include "webrtc/modules/congestion_controller/median_slope_estimator.h" |
22 #include "webrtc/modules/congestion_controller/probe_bitrate_estimator.h" | 22 #include "webrtc/modules/congestion_controller/probe_bitrate_estimator.h" |
23 #include "webrtc/modules/congestion_controller/trendline_estimator.h" | 23 #include "webrtc/modules/congestion_controller/trendline_estimator.h" |
24 #include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" | 24 #include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" |
25 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat
or.h" | 25 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat
or.h" |
26 #include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h" | 26 #include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h" |
27 #include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h" | 27 #include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h" |
28 #include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h" | 28 #include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h" |
29 | 29 |
30 namespace webrtc { | 30 namespace webrtc { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 Result MaybeUpdateEstimate(bool overusing, | 64 Result MaybeUpdateEstimate(bool overusing, |
65 rtc::Optional<uint32_t> acked_bitrate_bps); | 65 rtc::Optional<uint32_t> acked_bitrate_bps); |
66 // Updates the current remote rate estimate and returns true if a valid | 66 // Updates the current remote rate estimate and returns true if a valid |
67 // estimate exists. | 67 // estimate exists. |
68 bool UpdateEstimate(int64_t now_ms, | 68 bool UpdateEstimate(int64_t now_ms, |
69 rtc::Optional<uint32_t> acked_bitrate_bps, | 69 rtc::Optional<uint32_t> acked_bitrate_bps, |
70 bool overusing, | 70 bool overusing, |
71 uint32_t* target_bitrate_bps); | 71 uint32_t* target_bitrate_bps); |
72 | 72 |
73 rtc::ThreadChecker network_thread_; | 73 rtc::RaceChecker race_checker_; |
74 RtcEventLog* const event_log_; | 74 RtcEventLog* const event_log_; |
75 const Clock* const clock_; | 75 const Clock* const clock_; |
76 std::unique_ptr<InterArrival> inter_arrival_; | 76 std::unique_ptr<InterArrival> inter_arrival_; |
77 std::unique_ptr<TrendlineEstimator> trendline_estimator_; | 77 std::unique_ptr<TrendlineEstimator> trendline_estimator_; |
78 OveruseDetector detector_; | 78 OveruseDetector detector_; |
79 int64_t last_seen_packet_ms_; | 79 int64_t last_seen_packet_ms_; |
80 bool uma_recorded_; | 80 bool uma_recorded_; |
81 AimdRateControl rate_control_; | 81 AimdRateControl rate_control_; |
82 ProbeBitrateEstimator probe_bitrate_estimator_; | 82 ProbeBitrateEstimator probe_bitrate_estimator_; |
83 size_t trendline_window_size_; | 83 size_t trendline_window_size_; |
84 double trendline_smoothing_coeff_; | 84 double trendline_smoothing_coeff_; |
85 double trendline_threshold_gain_; | 85 double trendline_threshold_gain_; |
86 int consecutive_delayed_feedbacks_; | 86 int consecutive_delayed_feedbacks_; |
87 uint32_t last_logged_bitrate_; | 87 uint32_t last_logged_bitrate_; |
88 BandwidthUsage last_logged_state_; | 88 BandwidthUsage last_logged_state_; |
89 bool in_sparse_update_experiment_; | 89 bool in_sparse_update_experiment_; |
90 | 90 |
91 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe); | 91 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe); |
92 }; | 92 }; |
93 | 93 |
94 } // namespace webrtc | 94 } // namespace webrtc |
95 | 95 |
96 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ | 96 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ |
OLD | NEW |