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

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

Issue 2536753002: Relanding "Pass time constant to bwe smoothing filter." (Closed)
Patch Set: rebasing Created 4 years 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/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/probing_interval_estimator.h"
23 #include "webrtc/modules/congestion_controller/trendline_estimator.h" 24 #include "webrtc/modules/congestion_controller/trendline_estimator.h"
24 #include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" 25 #include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h"
25 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat or.h" 26 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat or.h"
26 #include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h" 27 #include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h"
27 #include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h" 28 #include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h"
28 #include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h" 29 #include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h"
29 30
30 namespace webrtc { 31 namespace webrtc {
31 32
32 class DelayBasedBwe { 33 class DelayBasedBwe {
(...skipping 11 matching lines...) Expand all
44 45
45 explicit DelayBasedBwe(Clock* clock); 46 explicit DelayBasedBwe(Clock* clock);
46 virtual ~DelayBasedBwe() {} 47 virtual ~DelayBasedBwe() {}
47 48
48 Result IncomingPacketFeedbackVector( 49 Result IncomingPacketFeedbackVector(
49 const std::vector<PacketInfo>& packet_feedback_vector); 50 const std::vector<PacketInfo>& packet_feedback_vector);
50 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms); 51 void OnRttUpdate(int64_t avg_rtt_ms, int64_t max_rtt_ms);
51 bool LatestEstimate(std::vector<uint32_t>* ssrcs, 52 bool LatestEstimate(std::vector<uint32_t>* ssrcs,
52 uint32_t* bitrate_bps) const; 53 uint32_t* bitrate_bps) const;
53 void SetMinBitrate(int min_bitrate_bps); 54 void SetMinBitrate(int min_bitrate_bps);
55 int64_t GetProbingIntervalMs() const;
54 56
55 private: 57 private:
56 // Computes a bayesian estimate of the throughput given acks containing 58 // Computes a bayesian estimate of the throughput given acks containing
57 // the arrival time and payload size. Samples which are far from the current 59 // the arrival time and payload size. Samples which are far from the current
58 // estimate or are based on few packets are given a smaller weight, as they 60 // estimate or are based on few packets are given a smaller weight, as they
59 // are considered to be more likely to have been caused by, e.g., delay spikes 61 // are considered to be more likely to have been caused by, e.g., delay spikes
60 // unrelated to congestion. 62 // unrelated to congestion.
61 class BitrateEstimator { 63 class BitrateEstimator {
62 public: 64 public:
63 BitrateEstimator(); 65 BitrateEstimator();
(...skipping 28 matching lines...) Expand all
92 BitrateEstimator receiver_incoming_bitrate_; 94 BitrateEstimator receiver_incoming_bitrate_;
93 int64_t last_update_ms_; 95 int64_t last_update_ms_;
94 int64_t last_seen_packet_ms_; 96 int64_t last_seen_packet_ms_;
95 bool uma_recorded_; 97 bool uma_recorded_;
96 AimdRateControl rate_control_; 98 AimdRateControl rate_control_;
97 ProbeBitrateEstimator probe_bitrate_estimator_; 99 ProbeBitrateEstimator probe_bitrate_estimator_;
98 size_t trendline_window_size_; 100 size_t trendline_window_size_;
99 double trendline_smoothing_coeff_; 101 double trendline_smoothing_coeff_;
100 double trendline_threshold_gain_; 102 double trendline_threshold_gain_;
101 const bool in_trendline_experiment_; 103 const bool in_trendline_experiment_;
104 ProbingIntervalEstimator probing_interval_estimator_;
102 105
103 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe); 106 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(DelayBasedBwe);
104 }; 107 };
105 108
106 } // namespace webrtc 109 } // namespace webrtc
107 110
108 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_ 111 #endif // WEBRTC_MODULES_CONGESTION_CONTROLLER_DELAY_BASED_BWE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698