OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_ABS_SEN D_TIME_H_ | 11 #ifndef WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_ABS_SEN D_TIME_H_ |
12 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_ABS_SEN D_TIME_H_ | 12 #define WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_ABS_SEN D_TIME_H_ |
13 | 13 |
14 #include <list> | 14 #include <list> |
15 #include <map> | 15 #include <map> |
16 #include <memory> | 16 #include <memory> |
17 #include <vector> | 17 #include <vector> |
18 | 18 |
19 #include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" | 19 #include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" |
20 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat or.h" | 20 #include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimat or.h" |
21 #include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h" | 21 #include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h" |
22 #include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h" | 22 #include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h" |
23 #include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h" | 23 #include "webrtc/modules/remote_bitrate_estimator/overuse_estimator.h" |
24 #include "webrtc/rtc_base/checks.h" | 24 #include "webrtc/rtc_base/checks.h" |
25 #include "webrtc/rtc_base/constructormagic.h" | 25 #include "webrtc/rtc_base/constructormagic.h" |
26 #include "webrtc/rtc_base/criticalsection.h" | 26 #include "webrtc/rtc_base/criticalsection.h" |
27 #include "webrtc/rtc_base/rate_statistics.h" | 27 #include "webrtc/rtc_base/rate_statistics.h" |
28 #include "webrtc/rtc_base/thread_checker.h" | 28 #include "webrtc/rtc_base/race_checker.h" |
danilchap
2017/09/06 15:15:44
move one line up (or run git cl format)
erikvarga1
2017/09/06 15:21:28
Done.
| |
29 | 29 |
30 namespace webrtc { | 30 namespace webrtc { |
31 | 31 |
32 struct Probe { | 32 struct Probe { |
33 Probe(int64_t send_time_ms, int64_t recv_time_ms, size_t payload_size) | 33 Probe(int64_t send_time_ms, int64_t recv_time_ms, size_t payload_size) |
34 : send_time_ms(send_time_ms), | 34 : send_time_ms(send_time_ms), |
35 recv_time_ms(recv_time_ms), | 35 recv_time_ms(recv_time_ms), |
36 payload_size(payload_size) {} | 36 payload_size(payload_size) {} |
37 int64_t send_time_ms; | 37 int64_t send_time_ms; |
38 int64_t recv_time_ms; | 38 int64_t recv_time_ms; |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 const std::list<Cluster>& clusters) const; | 106 const std::list<Cluster>& clusters) const; |
107 | 107 |
108 // Returns true if a probe which changed the estimate was detected. | 108 // Returns true if a probe which changed the estimate was detected. |
109 ProbeResult ProcessClusters(int64_t now_ms) EXCLUSIVE_LOCKS_REQUIRED(&crit_); | 109 ProbeResult ProcessClusters(int64_t now_ms) EXCLUSIVE_LOCKS_REQUIRED(&crit_); |
110 | 110 |
111 bool IsBitrateImproving(int probe_bitrate_bps) const | 111 bool IsBitrateImproving(int probe_bitrate_bps) const |
112 EXCLUSIVE_LOCKS_REQUIRED(&crit_); | 112 EXCLUSIVE_LOCKS_REQUIRED(&crit_); |
113 | 113 |
114 void TimeoutStreams(int64_t now_ms) EXCLUSIVE_LOCKS_REQUIRED(&crit_); | 114 void TimeoutStreams(int64_t now_ms) EXCLUSIVE_LOCKS_REQUIRED(&crit_); |
115 | 115 |
116 rtc::ThreadChecker network_thread_; | 116 rtc::RaceChecker network_race_; |
117 const Clock* const clock_; | 117 const Clock* const clock_; |
118 RemoteBitrateObserver* const observer_; | 118 RemoteBitrateObserver* const observer_; |
119 std::unique_ptr<InterArrival> inter_arrival_; | 119 std::unique_ptr<InterArrival> inter_arrival_; |
120 std::unique_ptr<OveruseEstimator> estimator_; | 120 std::unique_ptr<OveruseEstimator> estimator_; |
121 OveruseDetector detector_; | 121 OveruseDetector detector_; |
122 RateStatistics incoming_bitrate_; | 122 RateStatistics incoming_bitrate_; |
123 bool incoming_bitrate_initialized_; | 123 bool incoming_bitrate_initialized_; |
124 std::vector<int> recent_propagation_delta_ms_; | 124 std::vector<int> recent_propagation_delta_ms_; |
125 std::vector<int64_t> recent_update_time_ms_; | 125 std::vector<int64_t> recent_update_time_ms_; |
126 std::list<Probe> probes_; | 126 std::list<Probe> probes_; |
127 size_t total_probes_received_; | 127 size_t total_probes_received_; |
128 int64_t first_packet_time_ms_; | 128 int64_t first_packet_time_ms_; |
129 int64_t last_update_ms_; | 129 int64_t last_update_ms_; |
130 bool uma_recorded_; | 130 bool uma_recorded_; |
131 | 131 |
132 rtc::CriticalSection crit_; | 132 rtc::CriticalSection crit_; |
133 Ssrcs ssrcs_ GUARDED_BY(&crit_); | 133 Ssrcs ssrcs_ GUARDED_BY(&crit_); |
134 AimdRateControl remote_rate_ GUARDED_BY(&crit_); | 134 AimdRateControl remote_rate_ GUARDED_BY(&crit_); |
135 | 135 |
136 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RemoteBitrateEstimatorAbsSendTime); | 136 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RemoteBitrateEstimatorAbsSendTime); |
137 }; | 137 }; |
138 | 138 |
139 } // namespace webrtc | 139 } // namespace webrtc |
140 | 140 |
141 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_ABS_ SEND_TIME_H_ | 141 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_REMOTE_BITRATE_ESTIMATOR_ABS_ SEND_TIME_H_ |
OLD | NEW |