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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/inter_arrival.cc

Issue 2685783014: Replace NULL with nullptr in all C++ files. (Closed)
Patch Set: Fixing android. Created 3 years, 10 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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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
(...skipping 19 matching lines...) Expand all
30 burst_grouping_(enable_burst_grouping), 30 burst_grouping_(enable_burst_grouping),
31 num_consecutive_reordered_packets_(0) {} 31 num_consecutive_reordered_packets_(0) {}
32 32
33 bool InterArrival::ComputeDeltas(uint32_t timestamp, 33 bool InterArrival::ComputeDeltas(uint32_t timestamp,
34 int64_t arrival_time_ms, 34 int64_t arrival_time_ms,
35 int64_t system_time_ms, 35 int64_t system_time_ms,
36 size_t packet_size, 36 size_t packet_size,
37 uint32_t* timestamp_delta, 37 uint32_t* timestamp_delta,
38 int64_t* arrival_time_delta_ms, 38 int64_t* arrival_time_delta_ms,
39 int* packet_size_delta) { 39 int* packet_size_delta) {
40 assert(timestamp_delta != NULL); 40 assert(timestamp_delta != nullptr);
41 assert(arrival_time_delta_ms != NULL); 41 assert(arrival_time_delta_ms != nullptr);
42 assert(packet_size_delta != NULL); 42 assert(packet_size_delta != nullptr);
43 bool calculated_deltas = false; 43 bool calculated_deltas = false;
44 if (current_timestamp_group_.IsFirstPacket()) { 44 if (current_timestamp_group_.IsFirstPacket()) {
45 // We don't have enough data to update the filter, so we store it until we 45 // We don't have enough data to update the filter, so we store it until we
46 // have two frames of data to process. 46 // have two frames of data to process.
47 current_timestamp_group_.timestamp = timestamp; 47 current_timestamp_group_.timestamp = timestamp;
48 current_timestamp_group_.first_timestamp = timestamp; 48 current_timestamp_group_.first_timestamp = timestamp;
49 } else if (!PacketInOrder(timestamp)) { 49 } else if (!PacketInOrder(timestamp)) {
50 return false; 50 return false;
51 } else if (NewTimestampGroup(arrival_time_ms, timestamp)) { 51 } else if (NewTimestampGroup(arrival_time_ms, timestamp)) {
52 // First packet of a later frame, the previous frame sample is ready. 52 // First packet of a later frame, the previous frame sample is ready.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 return propagation_delta_ms < 0 && 148 return propagation_delta_ms < 0 &&
149 arrival_time_delta_ms <= kBurstDeltaThresholdMs; 149 arrival_time_delta_ms <= kBurstDeltaThresholdMs;
150 } 150 }
151 151
152 void InterArrival::Reset() { 152 void InterArrival::Reset() {
153 num_consecutive_reordered_packets_ = 0; 153 num_consecutive_reordered_packets_ = 0;
154 current_timestamp_group_ = TimestampGroup(); 154 current_timestamp_group_ = TimestampGroup();
155 prev_timestamp_group_ = TimestampGroup(); 155 prev_timestamp_group_ = TimestampGroup();
156 } 156 }
157 } // namespace webrtc 157 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698