Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: webrtc/modules/congestion_controller/delay_based_bwe.h

Issue 2789233005: Move BWE period calculation from ProbingIntervalEstimator to AimdRateControl. (Closed)
Patch Set: Nits Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/thread_checker.h" 20 #include "webrtc/base/thread_checker.h"
21 #include "webrtc/modules/congestion_controller/median_slope_estimator.h" 21 #include "webrtc/modules/congestion_controller/median_slope_estimator.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/probing_interval_estimator.h"
24 #include "webrtc/modules/congestion_controller/trendline_estimator.h" 23 #include "webrtc/modules/congestion_controller/trendline_estimator.h"
25 #include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" 24 #include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h"
26 #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"
27 #include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h" 26 #include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h"
28 #include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h" 27 #include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h"
29 #include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h" 28 #include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h"
30 29
31 namespace webrtc { 30 namespace webrtc {
32 31
33 class RtcEventLog; 32 class RtcEventLog;
(...skipping 14 matching lines...) Expand all
48 DelayBasedBwe(RtcEventLog* event_log, const Clock* clock); 47 DelayBasedBwe(RtcEventLog* event_log, const Clock* clock);
49 virtual ~DelayBasedBwe() {} 48 virtual ~DelayBasedBwe() {}
50 49
51 Result IncomingPacketFeedbackVector( 50 Result IncomingPacketFeedbackVector(
52 const std::vector<PacketFeedback>& packet_feedback_vector); 51 const std::vector<PacketFeedback>& packet_feedback_vector);
53 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms); 52 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms);
54 bool LatestEstimate(std::vector<uint32_t>* ssrcs, 53 bool LatestEstimate(std::vector<uint32_t>* ssrcs,
55 uint32_t* bitrate_bps) const; 54 uint32_t* bitrate_bps) const;
56 void SetStartBitrate(int start_bitrate_bps); 55 void SetStartBitrate(int start_bitrate_bps);
57 void SetMinBitrate(int min_bitrate_bps); 56 void SetMinBitrate(int min_bitrate_bps);
58 int64_t GetProbingIntervalMs() const; 57 int64_t GetExpectedBwePeriodMs() const;
59 58
60 private: 59 private:
61 // Computes a bayesian estimate of the throughput given acks containing 60 // Computes a bayesian estimate of the throughput given acks containing
62 // the arrival time and payload size. Samples which are far from the current 61 // the arrival time and payload size. Samples which are far from the current
63 // estimate or are based on few packets are given a smaller weight, as they 62 // estimate or are based on few packets are given a smaller weight, as they
64 // are considered to be more likely to have been caused by, e.g., delay spikes 63 // are considered to be more likely to have been caused by, e.g., delay spikes
65 // unrelated to congestion. 64 // unrelated to congestion.
66 class BitrateEstimator { 65 class BitrateEstimator {
67 public: 66 public:
68 BitrateEstimator(); 67 BitrateEstimator();
(...skipping 26 matching lines...) Expand all
95 OveruseDetector detector_; 94 OveruseDetector detector_;
96 BitrateEstimator receiver_incoming_bitrate_; 95 BitrateEstimator receiver_incoming_bitrate_;
97 int64_t last_update_ms_; 96 int64_t last_update_ms_;
98 int64_t last_seen_packet_ms_; 97 int64_t last_seen_packet_ms_;
99 bool uma_recorded_; 98 bool uma_recorded_;
100 AimdRateControl rate_control_; 99 AimdRateControl rate_control_;
101 ProbeBitrateEstimator probe_bitrate_estimator_; 100 ProbeBitrateEstimator probe_bitrate_estimator_;
102 size_t trendline_window_size_; 101 size_t trendline_window_size_;
103 double trendline_smoothing_coeff_; 102 double trendline_smoothing_coeff_;
104 double trendline_threshold_gain_; 103 double trendline_threshold_gain_;
105 ProbingIntervalEstimator probing_interval_estimator_;
106 int consecutive_delayed_feedbacks_; 104 int consecutive_delayed_feedbacks_;
107 uint32_t last_logged_bitrate_; 105 uint32_t last_logged_bitrate_;
108 BandwidthUsage last_logged_state_; 106 BandwidthUsage last_logged_state_;
109 107
110 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe); 108 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe);
111 }; 109 };
112 110
113 } // namespace webrtc 111 } // namespace webrtc
114 112
115 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ 113 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_
OLDNEW
« no previous file with comments | « webrtc/modules/congestion_controller/BUILD.gn ('k') | webrtc/modules/congestion_controller/delay_based_bwe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698