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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 1000)); | 124 1000)); |
125 RTC_HISTOGRAM_COUNTS_10000( | 125 RTC_HISTOGRAM_COUNTS_10000( |
126 "WebRTC.Video.RetransmittedBitrateReceivedInKbps", | 126 "WebRTC.Video.RetransmittedBitrateReceivedInKbps", |
127 static_cast<int>(rtp_rtx.retransmitted.TotalBytes() * 8 / elapsed_sec / | 127 static_cast<int>(rtp_rtx.retransmitted.TotalBytes() * 8 / elapsed_sec / |
128 1000)); | 128 1000)); |
129 if (!rtx_stats_.empty()) { | 129 if (!rtx_stats_.empty()) { |
130 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.RtxBitrateReceivedInKbps", | 130 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.RtxBitrateReceivedInKbps", |
131 static_cast<int>(rtx.transmitted.TotalBytes() * | 131 static_cast<int>(rtx.transmitted.TotalBytes() * |
132 8 / elapsed_sec / 1000)); | 132 8 / elapsed_sec / 1000)); |
133 } | 133 } |
134 if (config_.rtp.fec.ulpfec_payload_type != -1) { | 134 if (config_.rtp.ulpfec.ulpfec_payload_type != -1) { |
135 RTC_HISTOGRAM_COUNTS_10000( | 135 RTC_HISTOGRAM_COUNTS_10000( |
136 "WebRTC.Video.FecBitrateReceivedInKbps", | 136 "WebRTC.Video.FecBitrateReceivedInKbps", |
137 static_cast<int>(rtp_rtx.fec.TotalBytes() * 8 / elapsed_sec / 1000)); | 137 static_cast<int>(rtp_rtx.fec.TotalBytes() * 8 / elapsed_sec / 1000)); |
138 } | 138 } |
139 const RtcpPacketTypeCounter& counters = stats_.rtcp_packet_type_counts; | 139 const RtcpPacketTypeCounter& counters = stats_.rtcp_packet_type_counts; |
140 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.NackPacketsSentPerMinute", | 140 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.NackPacketsSentPerMinute", |
141 counters.nack_packets * 60 / elapsed_sec); | 141 counters.nack_packets * 60 / elapsed_sec); |
142 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FirPacketsSentPerMinute", | 142 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.FirPacketsSentPerMinute", |
143 counters.fir_packets * 60 / elapsed_sec); | 143 counters.fir_packets * 60 / elapsed_sec); |
144 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.PliPacketsSentPerMinute", | 144 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.PliPacketsSentPerMinute", |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 ++num_samples; | 312 ++num_samples; |
313 } | 313 } |
314 | 314 |
315 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const { | 315 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const { |
316 if (num_samples < min_required_samples || num_samples == 0) | 316 if (num_samples < min_required_samples || num_samples == 0) |
317 return -1; | 317 return -1; |
318 return sum / num_samples; | 318 return sum / num_samples; |
319 } | 319 } |
320 | 320 |
321 } // namespace webrtc | 321 } // namespace webrtc |
OLD | NEW |