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

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

Issue 1613053003: Swap use of CriticalSectionWrapper for rtc::CriticalSection in webrtc/video. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase? Created 4 years, 11 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/payload_router.cc ('k') | webrtc/video/send_statistics_proxy.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
11 #include "webrtc/video/receive_statistics_proxy.h" 11 #include "webrtc/video/receive_statistics_proxy.h"
12 12
13 #include <cmath> 13 #include <cmath>
14 14
15 #include "webrtc/base/checks.h" 15 #include "webrtc/base/checks.h"
16 #include "webrtc/modules/video_coding/include/video_codec_interface.h" 16 #include "webrtc/modules/video_coding/include/video_codec_interface.h"
17 #include "webrtc/system_wrappers/include/clock.h" 17 #include "webrtc/system_wrappers/include/clock.h"
18 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
19 #include "webrtc/system_wrappers/include/metrics.h" 18 #include "webrtc/system_wrappers/include/metrics.h"
20 19
21 namespace webrtc { 20 namespace webrtc {
22 21
23 ReceiveStatisticsProxy::ReceiveStatisticsProxy(uint32_t ssrc, Clock* clock) 22 ReceiveStatisticsProxy::ReceiveStatisticsProxy(uint32_t ssrc, Clock* clock)
24 : clock_(clock), 23 : clock_(clock),
25 // 1000ms window, scale 1000 for ms to s. 24 // 1000ms window, scale 1000 for ms to s.
26 decode_fps_estimator_(1000, 1000), 25 decode_fps_estimator_(1000, 1000),
27 renders_fps_estimator_(1000, 1000), 26 renders_fps_estimator_(1000, 1000),
28 render_fps_tracker_(100u, 10u), 27 render_fps_tracker_(100u, 10u),
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 ++num_samples; 207 ++num_samples;
209 } 208 }
210 209
211 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const { 210 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const {
212 if (num_samples < min_required_samples || num_samples == 0) 211 if (num_samples < min_required_samples || num_samples == 0)
213 return -1; 212 return -1;
214 return sum / num_samples; 213 return sum / num_samples;
215 } 214 }
216 215
217 } // namespace webrtc 216 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/payload_router.cc ('k') | webrtc/video/send_statistics_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698