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