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 |
11 #include "webrtc/modules/congestion_controller/probe_bitrate_estimator.h" | 11 #include "webrtc/modules/congestion_controller/probe_bitrate_estimator.h" |
12 | 12 |
13 #include <algorithm> | 13 #include <algorithm> |
14 | 14 |
15 #include "webrtc/base/checks.h" | |
16 #include "webrtc/base/logging.h" | |
17 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" | 15 #include "webrtc/logging/rtc_event_log/rtc_event_log.h" |
| 16 #include "webrtc/rtc_base/checks.h" |
| 17 #include "webrtc/rtc_base/logging.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 // The minumum number of probes we need to receive feedback about in percent | 20 // The minumum number of probes we need to receive feedback about in percent |
21 // in order to have a valid estimate. | 21 // in order to have a valid estimate. |
22 constexpr int kMinReceivedProbesPercent = 80; | 22 constexpr int kMinReceivedProbesPercent = 80; |
23 | 23 |
24 // The minumum number of bytes we need to receive feedback about in percent | 24 // The minumum number of bytes we need to receive feedback about in percent |
25 // in order to have a valid estimate. | 25 // in order to have a valid estimate. |
26 constexpr int kMinReceivedBytesPercent = 80; | 26 constexpr int kMinReceivedBytesPercent = 80; |
27 | 27 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 void ProbeBitrateEstimator::EraseOldClusters(int64_t timestamp_ms) { | 170 void ProbeBitrateEstimator::EraseOldClusters(int64_t timestamp_ms) { |
171 for (auto it = clusters_.begin(); it != clusters_.end();) { | 171 for (auto it = clusters_.begin(); it != clusters_.end();) { |
172 if (it->second.last_receive_ms < timestamp_ms) { | 172 if (it->second.last_receive_ms < timestamp_ms) { |
173 it = clusters_.erase(it); | 173 it = clusters_.erase(it); |
174 } else { | 174 } else { |
175 ++it; | 175 ++it; |
176 } | 176 } |
177 } | 177 } |
178 } | 178 } |
179 } // namespace webrtc | 179 } // namespace webrtc |
OLD | NEW |