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 |
(...skipping 28 matching lines...) Expand all Loading... |
39 | 39 |
40 struct Result { | 40 struct Result { |
41 Result() : updated(false), probe(false), target_bitrate_bps(0) {} | 41 Result() : updated(false), probe(false), target_bitrate_bps(0) {} |
42 Result(bool probe, uint32_t target_bitrate_bps) | 42 Result(bool probe, uint32_t target_bitrate_bps) |
43 : updated(true), probe(probe), target_bitrate_bps(target_bitrate_bps) {} | 43 : updated(true), probe(probe), target_bitrate_bps(target_bitrate_bps) {} |
44 bool updated; | 44 bool updated; |
45 bool probe; | 45 bool probe; |
46 uint32_t target_bitrate_bps; | 46 uint32_t target_bitrate_bps; |
47 }; | 47 }; |
48 | 48 |
49 DelayBasedBwe(RtcEventLog* event_log, Clock* clock); | 49 DelayBasedBwe(RtcEventLog* event_log, const Clock* clock); |
50 virtual ~DelayBasedBwe() {} | 50 virtual ~DelayBasedBwe() {} |
51 | 51 |
52 Result IncomingPacketFeedbackVector( | 52 Result IncomingPacketFeedbackVector( |
53 const std::vector<PacketFeedback>& packet_feedback_vector); | 53 const std::vector<PacketFeedback>& packet_feedback_vector); |
54 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms); | 54 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms); |
55 bool LatestEstimate(std::vector<uint32_t>* ssrcs, | 55 bool LatestEstimate(std::vector<uint32_t>* ssrcs, |
56 uint32_t* bitrate_bps) const; | 56 uint32_t* bitrate_bps) const; |
57 void SetStartBitrate(int start_bitrate_bps); | 57 void SetStartBitrate(int start_bitrate_bps); |
58 void SetMinBitrate(int min_bitrate_bps); | 58 void SetMinBitrate(int min_bitrate_bps); |
59 int64_t GetProbingIntervalMs() const; | 59 int64_t GetProbingIntervalMs() const; |
(...skipping 27 matching lines...) Expand all Loading... |
87 // estimate exists. | 87 // estimate exists. |
88 bool UpdateEstimate(int64_t packet_arrival_time_ms, | 88 bool UpdateEstimate(int64_t packet_arrival_time_ms, |
89 int64_t now_ms, | 89 int64_t now_ms, |
90 rtc::Optional<uint32_t> acked_bitrate_bps, | 90 rtc::Optional<uint32_t> acked_bitrate_bps, |
91 uint32_t* target_bitrate_bps); | 91 uint32_t* target_bitrate_bps); |
92 const bool in_trendline_experiment_; | 92 const bool in_trendline_experiment_; |
93 const bool in_median_slope_experiment_; | 93 const bool in_median_slope_experiment_; |
94 | 94 |
95 rtc::ThreadChecker network_thread_; | 95 rtc::ThreadChecker network_thread_; |
96 RtcEventLog* const event_log_; | 96 RtcEventLog* const event_log_; |
97 Clock* const clock_; | 97 const Clock* const clock_; |
98 std::unique_ptr<InterArrival> inter_arrival_; | 98 std::unique_ptr<InterArrival> inter_arrival_; |
99 std::unique_ptr<OveruseEstimator> kalman_estimator_; | 99 std::unique_ptr<OveruseEstimator> kalman_estimator_; |
100 std::unique_ptr<TrendlineEstimator> trendline_estimator_; | 100 std::unique_ptr<TrendlineEstimator> trendline_estimator_; |
101 std::unique_ptr<MedianSlopeEstimator> median_slope_estimator_; | 101 std::unique_ptr<MedianSlopeEstimator> median_slope_estimator_; |
102 OveruseDetector detector_; | 102 OveruseDetector detector_; |
103 BitrateEstimator receiver_incoming_bitrate_; | 103 BitrateEstimator receiver_incoming_bitrate_; |
104 int64_t last_update_ms_; | 104 int64_t last_update_ms_; |
105 int64_t last_seen_packet_ms_; | 105 int64_t last_seen_packet_ms_; |
106 bool uma_recorded_; | 106 bool uma_recorded_; |
107 AimdRateControl rate_control_; | 107 AimdRateControl rate_control_; |
108 ProbeBitrateEstimator probe_bitrate_estimator_; | 108 ProbeBitrateEstimator probe_bitrate_estimator_; |
109 size_t trendline_window_size_; | 109 size_t trendline_window_size_; |
110 double trendline_smoothing_coeff_; | 110 double trendline_smoothing_coeff_; |
111 double trendline_threshold_gain_; | 111 double trendline_threshold_gain_; |
112 ProbingIntervalEstimator probing_interval_estimator_; | 112 ProbingIntervalEstimator probing_interval_estimator_; |
113 size_t median_slope_window_size_; | 113 size_t median_slope_window_size_; |
114 double median_slope_threshold_gain_; | 114 double median_slope_threshold_gain_; |
115 int consecutive_delayed_feedbacks_; | 115 int consecutive_delayed_feedbacks_; |
116 uint32_t last_logged_bitrate_; | 116 uint32_t last_logged_bitrate_; |
117 BandwidthUsage last_logged_state_; | 117 BandwidthUsage last_logged_state_; |
118 | 118 |
119 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe); | 119 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe); |
120 }; | 120 }; |
121 | 121 |
122 } // namespace webrtc | 122 } // namespace webrtc |
123 | 123 |
124 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ | 124 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ |
OLD | NEW |