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

Side by Side Diff: webrtc/modules/video_coding/nack_module.cc

Issue 1814753002: Moved sequence number specific operations from mod_ops.h (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 4 years, 9 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 #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" 16 #include "webrtc/base/checks.h"
17 #include "webrtc/base/logging.h" 17 #include "webrtc/base/logging.h"
18 #include "webrtc/base/mod_ops.h"
19 #include "webrtc/modules/utility/include/process_thread.h" 18 #include "webrtc/modules/utility/include/process_thread.h"
20 19
21 namespace webrtc { 20 namespace webrtc {
22 21
23 namespace { 22 namespace {
24 const int kMaxPacketAge = 10000; 23 const int kMaxPacketAge = 10000;
25 const int kMaxNackPackets = 1000; 24 const int kMaxNackPackets = 1000;
26 const int kDefaultRttMs = 100; 25 const int kDefaultRttMs = 100;
27 const int kMaxNackRetries = 10; 26 const int kMaxNackRetries = 10;
28 const int kProcessFrequency = 50; 27 const int kProcessFrequency = 50;
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 reordering_histogram_.Add(diff); 253 reordering_histogram_.Add(diff);
255 } 254 }
256 255
257 int NackModule::WaitNumberOfPackets(float probability) const { 256 int NackModule::WaitNumberOfPackets(float probability) const {
258 if (reordering_histogram_.NumValues() == 0) 257 if (reordering_histogram_.NumValues() == 0)
259 return 0; 258 return 0;
260 return reordering_histogram_.InverseCdf(probability); 259 return reordering_histogram_.InverseCdf(probability);
261 } 260 }
262 261
263 } // namespace webrtc 262 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/nack_module.h ('k') | webrtc/modules/video_coding/nack_module_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698