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/rate_statistics.h" | 20 #include "webrtc/base/rate_statistics.h" |
21 #include "webrtc/base/thread_checker.h" | 21 #include "webrtc/base/thread_checker.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/theil_sen_estimator.h" | |
23 #include "webrtc/modules/congestion_controller/trendline_estimator.h" | 24 #include "webrtc/modules/congestion_controller/trendline_estimator.h" |
24 #include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" | 25 #include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" |
25 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat or.h" | 26 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat or.h" |
26 #include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h" | 27 #include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h" |
27 #include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h" | 28 #include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h" |
28 #include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h" | 29 #include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h" |
29 | 30 |
30 namespace webrtc { | 31 namespace webrtc { |
31 | 32 |
32 class DelayBasedBwe { | 33 class DelayBasedBwe { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 const bool in_experiment_; | 76 const bool in_experiment_; |
76 }; | 77 }; |
77 | 78 |
78 Result IncomingPacketInfo(const PacketInfo& info); | 79 Result IncomingPacketInfo(const PacketInfo& info); |
79 // Updates the current remote rate estimate and returns true if a valid | 80 // Updates the current remote rate estimate and returns true if a valid |
80 // estimate exists. | 81 // estimate exists. |
81 bool UpdateEstimate(int64_t packet_arrival_time_ms, | 82 bool UpdateEstimate(int64_t packet_arrival_time_ms, |
82 int64_t now_ms, | 83 int64_t now_ms, |
83 rtc::Optional<uint32_t> acked_bitrate_bps, | 84 rtc::Optional<uint32_t> acked_bitrate_bps, |
84 uint32_t* target_bitrate_bps); | 85 uint32_t* target_bitrate_bps); |
86 const bool in_trendline_experiment_; | |
brandtr
2016/11/28 16:27:19
You might want to rename this in the future, as th
terelius
2016/12/02 16:45:52
Agreed. The variable name made more sense when the
brandtr
2016/12/05 12:34:44
Acknowledged.
| |
87 const bool in_theil_sen_experiment_; | |
85 | 88 |
86 rtc::ThreadChecker network_thread_; | 89 rtc::ThreadChecker network_thread_; |
87 Clock* const clock_; | 90 Clock* const clock_; |
88 std::unique_ptr<InterArrival> inter_arrival_; | 91 std::unique_ptr<InterArrival> inter_arrival_; |
89 std::unique_ptr<OveruseEstimator> kalman_estimator_; | 92 std::unique_ptr<OveruseEstimator> kalman_estimator_; |
90 std::unique_ptr<TrendlineEstimator> trendline_estimator_; | 93 std::unique_ptr<TrendlineEstimator> trendline_estimator_; |
94 std::unique_ptr<TheilSenEstimator> theil_sen_estimator_; | |
91 OveruseDetector detector_; | 95 OveruseDetector detector_; |
92 BitrateEstimator receiver_incoming_bitrate_; | 96 BitrateEstimator receiver_incoming_bitrate_; |
93 int64_t last_update_ms_; | 97 int64_t last_update_ms_; |
94 int64_t last_seen_packet_ms_; | 98 int64_t last_seen_packet_ms_; |
95 bool uma_recorded_; | 99 bool uma_recorded_; |
96 AimdRateControl rate_control_; | 100 AimdRateControl rate_control_; |
97 ProbeBitrateEstimator probe_bitrate_estimator_; | 101 ProbeBitrateEstimator probe_bitrate_estimator_; |
98 size_t trendline_window_size_; | 102 size_t trendline_window_size_; |
99 double trendline_smoothing_coeff_; | 103 double trendline_smoothing_coeff_; |
100 double trendline_threshold_gain_; | 104 double trendline_threshold_gain_; |
101 const bool in_trendline_experiment_; | 105 size_t theil_sen_window_size_; |
106 double theil_sen_threshold_gain_; | |
102 | 107 |
103 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe); | 108 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe); |
104 }; | 109 }; |
105 | 110 |
106 } // namespace webrtc | 111 } // namespace webrtc |
107 | 112 |
108 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ | 113 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ |
OLD | NEW |