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 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 } | 90 } |
91 | 91 |
92 SendStatisticsProxy::UmaSamplesContainer::UmaSamplesContainer( | 92 SendStatisticsProxy::UmaSamplesContainer::UmaSamplesContainer( |
93 const char* prefix, | 93 const char* prefix, |
94 const VideoSendStream::Stats& stats, | 94 const VideoSendStream::Stats& stats, |
95 Clock* const clock) | 95 Clock* const clock) |
96 : uma_prefix_(prefix), | 96 : uma_prefix_(prefix), |
97 clock_(clock), | 97 clock_(clock), |
98 max_sent_width_per_timestamp_(0), | 98 max_sent_width_per_timestamp_(0), |
99 max_sent_height_per_timestamp_(0), | 99 max_sent_height_per_timestamp_(0), |
100 input_frame_rate_tracker_(100u, 10u), | 100 input_frame_rate_tracker_(100, 10u), |
101 sent_frame_rate_tracker_(100u, 10u), | 101 sent_frame_rate_tracker_(100, 10u), |
102 first_rtcp_stats_time_ms_(-1), | 102 first_rtcp_stats_time_ms_(-1), |
103 first_rtp_stats_time_ms_(-1), | 103 first_rtp_stats_time_ms_(-1), |
104 start_stats_(stats) {} | 104 start_stats_(stats) {} |
105 | 105 |
106 SendStatisticsProxy::UmaSamplesContainer::~UmaSamplesContainer() {} | 106 SendStatisticsProxy::UmaSamplesContainer::~UmaSamplesContainer() {} |
107 | 107 |
108 void AccumulateRtpStats(const VideoSendStream::Stats& stats, | 108 void AccumulateRtpStats(const VideoSendStream::Stats& stats, |
109 const VideoSendStream::Config& config, | 109 const VideoSendStream::Config& config, |
110 StreamDataCounters* total_rtp_stats, | 110 StreamDataCounters* total_rtp_stats, |
111 StreamDataCounters* rtx_stats) { | 111 StreamDataCounters* rtx_stats) { |
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 return Fraction(min_required_samples, 1000.0f); | 624 return Fraction(min_required_samples, 1000.0f); |
625 } | 625 } |
626 | 626 |
627 int SendStatisticsProxy::BoolSampleCounter::Fraction( | 627 int SendStatisticsProxy::BoolSampleCounter::Fraction( |
628 int min_required_samples, float multiplier) const { | 628 int min_required_samples, float multiplier) const { |
629 if (num_samples < min_required_samples || num_samples == 0) | 629 if (num_samples < min_required_samples || num_samples == 0) |
630 return -1; | 630 return -1; |
631 return static_cast<int>((sum * multiplier / num_samples) + 0.5f); | 631 return static_cast<int>((sum * multiplier / num_samples) + 0.5f); |
632 } | 632 } |
633 } // namespace webrtc | 633 } // namespace webrtc |
OLD | NEW |