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

Side by Side Diff: webrtc/video/receive_statistics_proxy.cc

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 years, 3 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
« no previous file with comments | « webrtc/video/rampup_tests.cc ('k') | webrtc/video/replay.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 rtc::CritScope lock(&crit_); 96 rtc::CritScope lock(&crit_);
97 if (stats_.ssrc != ssrc) 97 if (stats_.ssrc != ssrc)
98 return; 98 return;
99 stats_.rtcp_packet_type_counts = packet_counter; 99 stats_.rtcp_packet_type_counts = packet_counter;
100 } 100 }
101 101
102 void ReceiveStatisticsProxy::StatisticsUpdated( 102 void ReceiveStatisticsProxy::StatisticsUpdated(
103 const webrtc::RtcpStatistics& statistics, 103 const webrtc::RtcpStatistics& statistics,
104 uint32_t ssrc) { 104 uint32_t ssrc) {
105 rtc::CritScope lock(&crit_); 105 rtc::CritScope lock(&crit_);
106 // TODO(pbos): Handle both local and remote ssrcs here and DCHECK that we 106 // TODO(pbos): Handle both local and remote ssrcs here and RTC_DCHECK that we
107 // receive stats from one of them. 107 // receive stats from one of them.
108 if (stats_.ssrc != ssrc) 108 if (stats_.ssrc != ssrc)
109 return; 109 return;
110 stats_.rtcp_stats = statistics; 110 stats_.rtcp_stats = statistics;
111 report_block_stats_.Store(statistics, ssrc, 0); 111 report_block_stats_.Store(statistics, ssrc, 0);
112 } 112 }
113 113
114 void ReceiveStatisticsProxy::CNameChanged(const char* cname, uint32_t ssrc) { 114 void ReceiveStatisticsProxy::CNameChanged(const char* cname, uint32_t ssrc) {
115 rtc::CritScope lock(&crit_); 115 rtc::CritScope lock(&crit_);
116 // TODO(pbos): Handle both local and remote ssrcs here and DCHECK that we 116 // TODO(pbos): Handle both local and remote ssrcs here and RTC_DCHECK that we
117 // receive stats from one of them. 117 // receive stats from one of them.
118 if (stats_.ssrc != ssrc) 118 if (stats_.ssrc != ssrc)
119 return; 119 return;
120 stats_.c_name = cname; 120 stats_.c_name = cname;
121 } 121 }
122 122
123 void ReceiveStatisticsProxy::DataCountersUpdated( 123 void ReceiveStatisticsProxy::DataCountersUpdated(
124 const webrtc::StreamDataCounters& counters, 124 const webrtc::StreamDataCounters& counters,
125 uint32_t ssrc) { 125 uint32_t ssrc) {
126 rtc::CritScope lock(&crit_); 126 rtc::CritScope lock(&crit_);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 ++num_samples; 168 ++num_samples;
169 } 169 }
170 170
171 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const { 171 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const {
172 if (num_samples < min_required_samples || num_samples == 0) 172 if (num_samples < min_required_samples || num_samples == 0)
173 return -1; 173 return -1;
174 return sum / num_samples; 174 return sum / num_samples;
175 } 175 }
176 176
177 } // namespace webrtc 177 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/rampup_tests.cc ('k') | webrtc/video/replay.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698