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 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_MEDIAN_SLOPE_ESTIMATOR_H_ | 10 #ifndef WEBRTC_MODULES_CONGESTION_CONTROLLER_MEDIAN_SLOPE_ESTIMATOR_H_ |
11 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_MEDIAN_SLOPE_ESTIMATOR_H_ | 11 #define WEBRTC_MODULES_CONGESTION_CONTROLLER_MEDIAN_SLOPE_ESTIMATOR_H_ |
12 | 12 |
13 #include <stddef.h> | 13 #include <stddef.h> |
14 #include <stdint.h> | 14 #include <stdint.h> |
15 | 15 |
16 #include <list> | 16 #include <list> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
19 #include "webrtc/base/analytics/percentile_filter.h" | |
20 #include "webrtc/base/constructormagic.h" | 19 #include "webrtc/base/constructormagic.h" |
| 20 #include "webrtc/base/numerics/percentile_filter.h" |
21 | 21 |
22 namespace webrtc { | 22 namespace webrtc { |
23 | 23 |
24 class MedianSlopeEstimator { | 24 class MedianSlopeEstimator { |
25 public: | 25 public: |
26 // |window_size| is the number of points required to compute a trend line. | 26 // |window_size| is the number of points required to compute a trend line. |
27 // |threshold_gain| is used to scale the trendline slope for comparison to | 27 // |threshold_gain| is used to scale the trendline slope for comparison to |
28 // the old threshold. Once the old estimator has been removed (or the | 28 // the old threshold. Once the old estimator has been removed (or the |
29 // thresholds been merged into the estimators), we can just set the | 29 // thresholds been merged into the estimators), we can just set the |
30 // threshold instead of setting a gain. | 30 // threshold instead of setting a gain. |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 double accumulated_delay_; | 65 double accumulated_delay_; |
66 std::list<DelayInfo> delay_hist_; | 66 std::list<DelayInfo> delay_hist_; |
67 PercentileFilter<double> median_filter_; | 67 PercentileFilter<double> median_filter_; |
68 double trendline_; | 68 double trendline_; |
69 | 69 |
70 RTC_DISALLOW_COPY_AND_ASSIGN(MedianSlopeEstimator); | 70 RTC_DISALLOW_COPY_AND_ASSIGN(MedianSlopeEstimator); |
71 }; | 71 }; |
72 } // namespace webrtc | 72 } // namespace webrtc |
73 | 73 |
74 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_MEDIAN_SLOPE_ESTIMATOR_H_ | 74 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_MEDIAN_SLOPE_ESTIMATOR_H_ |
OLD | NEW |