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

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

Issue 1520513003: Fixed lint warnings in webrtc/modules/remote_bitrate_estimator (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Include in alphabetic order Created 5 years 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 assert(*arrival_time_delta_ms >= 0); 64 assert(*arrival_time_delta_ms >= 0);
65 *packet_size_delta = static_cast<int>(current_timestamp_group_.size) - 65 *packet_size_delta = static_cast<int>(current_timestamp_group_.size) -
66 static_cast<int>(prev_timestamp_group_.size); 66 static_cast<int>(prev_timestamp_group_.size);
67 calculated_deltas = true; 67 calculated_deltas = true;
68 } 68 }
69 prev_timestamp_group_ = current_timestamp_group_; 69 prev_timestamp_group_ = current_timestamp_group_;
70 // The new timestamp is now the current frame. 70 // The new timestamp is now the current frame.
71 current_timestamp_group_.first_timestamp = timestamp; 71 current_timestamp_group_.first_timestamp = timestamp;
72 current_timestamp_group_.timestamp = timestamp; 72 current_timestamp_group_.timestamp = timestamp;
73 current_timestamp_group_.size = 0; 73 current_timestamp_group_.size = 0;
74 } 74 } else {
75 else {
76 current_timestamp_group_.timestamp = LatestTimestamp( 75 current_timestamp_group_.timestamp = LatestTimestamp(
77 current_timestamp_group_.timestamp, timestamp); 76 current_timestamp_group_.timestamp, timestamp);
78 } 77 }
79 // Accumulate the frame size. 78 // Accumulate the frame size.
80 current_timestamp_group_.size += packet_size; 79 current_timestamp_group_.size += packet_size;
81 current_timestamp_group_.complete_time_ms = arrival_time_ms; 80 current_timestamp_group_.complete_time_ms = arrival_time_ms;
82 81
83 return calculated_deltas; 82 return calculated_deltas;
84 } 83 }
85 84
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 current_timestamp_group_.complete_time_ms; 120 current_timestamp_group_.complete_time_ms;
122 uint32_t timestamp_diff = timestamp - current_timestamp_group_.timestamp; 121 uint32_t timestamp_diff = timestamp - current_timestamp_group_.timestamp;
123 int64_t ts_delta_ms = timestamp_to_ms_coeff_ * timestamp_diff + 0.5; 122 int64_t ts_delta_ms = timestamp_to_ms_coeff_ * timestamp_diff + 0.5;
124 if (ts_delta_ms == 0) 123 if (ts_delta_ms == 0)
125 return true; 124 return true;
126 int propagation_delta_ms = arrival_time_delta_ms - ts_delta_ms; 125 int propagation_delta_ms = arrival_time_delta_ms - ts_delta_ms;
127 return propagation_delta_ms < 0 && 126 return propagation_delta_ms < 0 &&
128 arrival_time_delta_ms <= kBurstDeltaThresholdMs; 127 arrival_time_delta_ms <= kBurstDeltaThresholdMs;
129 } 128 }
130 } // namespace webrtc 129 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698