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 <algorithm> | 11 #include <algorithm> |
12 #include <limits> | 12 #include <limits> |
13 | 13 |
14 #include "webrtc/modules/video_coding/nack_module.h" | 14 #include "webrtc/modules/video_coding/nack_module.h" |
15 | 15 |
16 #include "webrtc/base/checks.h" | |
17 #include "webrtc/base/logging.h" | |
18 #include "webrtc/modules/utility/include/process_thread.h" | 16 #include "webrtc/modules/utility/include/process_thread.h" |
| 17 #include "webrtc/rtc_base/checks.h" |
| 18 #include "webrtc/rtc_base/logging.h" |
19 | 19 |
20 namespace webrtc { | 20 namespace webrtc { |
21 | 21 |
22 namespace { | 22 namespace { |
23 const int kMaxPacketAge = 10000; | 23 const int kMaxPacketAge = 10000; |
24 const int kMaxNackPackets = 1000; | 24 const int kMaxNackPackets = 1000; |
25 const int kDefaultRttMs = 100; | 25 const int kDefaultRttMs = 100; |
26 const int kMaxNackRetries = 10; | 26 const int kMaxNackRetries = 10; |
27 const int kProcessFrequency = 50; | 27 const int kProcessFrequency = 50; |
28 const int kProcessIntervalMs = 1000 / kProcessFrequency; | 28 const int kProcessIntervalMs = 1000 / kProcessFrequency; |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 reordering_histogram_.Add(diff); | 256 reordering_histogram_.Add(diff); |
257 } | 257 } |
258 | 258 |
259 int NackModule::WaitNumberOfPackets(float probability) const { | 259 int NackModule::WaitNumberOfPackets(float probability) const { |
260 if (reordering_histogram_.NumValues() == 0) | 260 if (reordering_histogram_.NumValues() == 0) |
261 return 0; | 261 return 0; |
262 return reordering_histogram_.InverseCdf(probability); | 262 return reordering_histogram_.InverseCdf(probability); |
263 } | 263 } |
264 | 264 |
265 } // namespace webrtc | 265 } // namespace webrtc |
OLD | NEW |