| 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/median_slope_estimator.h" |
| 22 #include "webrtc/modules/congestion_controller/probe_bitrate_estimator.h" | 23 #include "webrtc/modules/congestion_controller/probe_bitrate_estimator.h" |
| 23 #include "webrtc/modules/congestion_controller/probing_interval_estimator.h" | 24 #include "webrtc/modules/congestion_controller/probing_interval_estimator.h" |
| 24 #include "webrtc/modules/congestion_controller/trendline_estimator.h" | 25 #include "webrtc/modules/congestion_controller/trendline_estimator.h" |
| 25 #include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" | 26 #include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" |
| 26 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat
or.h" | 27 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat
or.h" |
| 27 #include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h" | 28 #include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h" |
| 28 #include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h" | 29 #include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h" |
| 29 #include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h" | 30 #include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h" |
| 30 | 31 |
| 31 namespace webrtc { | 32 namespace webrtc { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 const bool in_experiment_; | 78 const bool in_experiment_; |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 Result IncomingPacketInfo(const PacketInfo& info); | 81 Result IncomingPacketInfo(const PacketInfo& info); |
| 81 // Updates the current remote rate estimate and returns true if a valid | 82 // Updates the current remote rate estimate and returns true if a valid |
| 82 // estimate exists. | 83 // estimate exists. |
| 83 bool UpdateEstimate(int64_t packet_arrival_time_ms, | 84 bool UpdateEstimate(int64_t packet_arrival_time_ms, |
| 84 int64_t now_ms, | 85 int64_t now_ms, |
| 85 rtc::Optional<uint32_t> acked_bitrate_bps, | 86 rtc::Optional<uint32_t> acked_bitrate_bps, |
| 86 uint32_t* target_bitrate_bps); | 87 uint32_t* target_bitrate_bps); |
| 88 const bool in_trendline_experiment_; |
| 89 const bool in_median_slope_experiment_; |
| 87 | 90 |
| 88 rtc::ThreadChecker network_thread_; | 91 rtc::ThreadChecker network_thread_; |
| 89 Clock* const clock_; | 92 Clock* const clock_; |
| 90 std::unique_ptr<InterArrival> inter_arrival_; | 93 std::unique_ptr<InterArrival> inter_arrival_; |
| 91 std::unique_ptr<OveruseEstimator> kalman_estimator_; | 94 std::unique_ptr<OveruseEstimator> kalman_estimator_; |
| 92 std::unique_ptr<TrendlineEstimator> trendline_estimator_; | 95 std::unique_ptr<TrendlineEstimator> trendline_estimator_; |
| 96 std::unique_ptr<MedianSlopeEstimator> median_slope_estimator_; |
| 93 OveruseDetector detector_; | 97 OveruseDetector detector_; |
| 94 BitrateEstimator receiver_incoming_bitrate_; | 98 BitrateEstimator receiver_incoming_bitrate_; |
| 95 int64_t last_update_ms_; | 99 int64_t last_update_ms_; |
| 96 int64_t last_seen_packet_ms_; | 100 int64_t last_seen_packet_ms_; |
| 97 bool uma_recorded_; | 101 bool uma_recorded_; |
| 98 AimdRateControl rate_control_; | 102 AimdRateControl rate_control_; |
| 99 ProbeBitrateEstimator probe_bitrate_estimator_; | 103 ProbeBitrateEstimator probe_bitrate_estimator_; |
| 100 size_t trendline_window_size_; | 104 size_t trendline_window_size_; |
| 101 double trendline_smoothing_coeff_; | 105 double trendline_smoothing_coeff_; |
| 102 double trendline_threshold_gain_; | 106 double trendline_threshold_gain_; |
| 103 const bool in_trendline_experiment_; | |
| 104 ProbingIntervalEstimator probing_interval_estimator_; | 107 ProbingIntervalEstimator probing_interval_estimator_; |
| 108 size_t median_slope_window_size_; |
| 109 double median_slope_threshold_gain_; |
| 105 | 110 |
| 106 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe); | 111 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe); |
| 107 }; | 112 }; |
| 108 | 113 |
| 109 } // namespace webrtc | 114 } // namespace webrtc |
| 110 | 115 |
| 111 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ | 116 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ |
| OLD | NEW |