OLD | NEW |
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/codecs/interface/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" | 18 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" |
19 #include "webrtc/system_wrappers/include/metrics.h" | 19 #include "webrtc/system_wrappers/include/metrics.h" |
20 | 20 |
21 namespace webrtc { | 21 namespace webrtc { |
22 | 22 |
23 ReceiveStatisticsProxy::ReceiveStatisticsProxy(uint32_t ssrc, Clock* clock) | 23 ReceiveStatisticsProxy::ReceiveStatisticsProxy(uint32_t ssrc, Clock* clock) |
24 : clock_(clock), | 24 : clock_(clock), |
25 // 1000ms window, scale 1000 for ms to s. | 25 // 1000ms window, scale 1000 for ms to s. |
26 decode_fps_estimator_(1000, 1000), | 26 decode_fps_estimator_(1000, 1000), |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 ++num_samples; | 201 ++num_samples; |
202 } | 202 } |
203 | 203 |
204 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const { | 204 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const { |
205 if (num_samples < min_required_samples || num_samples == 0) | 205 if (num_samples < min_required_samples || num_samples == 0) |
206 return -1; | 206 return -1; |
207 return sum / num_samples; | 207 return sum / num_samples; |
208 } | 208 } |
209 | 209 |
210 } // namespace webrtc | 210 } // namespace webrtc |
OLD | NEW |