OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2016 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2016 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
174 RTCInboundRTPStreamStats* inbound_video) { | 174 RTCInboundRTPStreamStats* inbound_video) { |
175 SetInboundRTPStreamStatsFromMediaReceiverInfo( | 175 SetInboundRTPStreamStatsFromMediaReceiverInfo( |
176 video_receiver_info, inbound_video); | 176 video_receiver_info, inbound_video); |
177 inbound_video->media_type = "video"; | 177 inbound_video->media_type = "video"; |
178 inbound_video->fir_count = | 178 inbound_video->fir_count = |
179 static_cast<uint32_t>(video_receiver_info.firs_sent); | 179 static_cast<uint32_t>(video_receiver_info.firs_sent); |
180 inbound_video->pli_count = | 180 inbound_video->pli_count = |
181 static_cast<uint32_t>(video_receiver_info.plis_sent); | 181 static_cast<uint32_t>(video_receiver_info.plis_sent); |
182 inbound_video->nack_count = | 182 inbound_video->nack_count = |
183 static_cast<uint32_t>(video_receiver_info.nacks_sent); | 183 static_cast<uint32_t>(video_receiver_info.nacks_sent); |
184 inbound_video->frames_decoded = video_receiver_info.frames_decoded; | |
184 } | 185 } |
185 | 186 |
186 // Provides the media independent counters (both audio and video). | 187 // Provides the media independent counters (both audio and video). |
187 void SetOutboundRTPStreamStatsFromMediaSenderInfo( | 188 void SetOutboundRTPStreamStatsFromMediaSenderInfo( |
188 const cricket::MediaSenderInfo& media_sender_info, | 189 const cricket::MediaSenderInfo& media_sender_info, |
189 RTCOutboundRTPStreamStats* outbound_stats) { | 190 RTCOutboundRTPStreamStats* outbound_stats) { |
190 RTC_DCHECK(outbound_stats); | 191 RTC_DCHECK(outbound_stats); |
191 outbound_stats->ssrc = rtc::ToString<>(media_sender_info.ssrc()); | 192 outbound_stats->ssrc = rtc::ToString<>(media_sender_info.ssrc()); |
192 // TODO(hbos): Support the remote case. crbug.com/657856 | 193 // TODO(hbos): Support the remote case. crbug.com/657856 |
193 outbound_stats->is_remote = false; | 194 outbound_stats->is_remote = false; |
(...skipping 24 matching lines...) Expand all Loading... | |
218 RTCOutboundRTPStreamStats* outbound_video) { | 219 RTCOutboundRTPStreamStats* outbound_video) { |
219 SetOutboundRTPStreamStatsFromMediaSenderInfo( | 220 SetOutboundRTPStreamStatsFromMediaSenderInfo( |
220 video_sender_info, outbound_video); | 221 video_sender_info, outbound_video); |
221 outbound_video->media_type = "video"; | 222 outbound_video->media_type = "video"; |
222 outbound_video->fir_count = | 223 outbound_video->fir_count = |
223 static_cast<uint32_t>(video_sender_info.firs_rcvd); | 224 static_cast<uint32_t>(video_sender_info.firs_rcvd); |
224 outbound_video->pli_count = | 225 outbound_video->pli_count = |
225 static_cast<uint32_t>(video_sender_info.plis_rcvd); | 226 static_cast<uint32_t>(video_sender_info.plis_rcvd); |
226 outbound_video->nack_count = | 227 outbound_video->nack_count = |
227 static_cast<uint32_t>(video_sender_info.nacks_rcvd); | 228 static_cast<uint32_t>(video_sender_info.nacks_rcvd); |
229 if (video_sender_info.qp_sum) | |
hta-webrtc
2017/01/02 14:29:12
This means that we have two cases to test: qp_sum
| |
230 outbound_video->qp_sum = *video_sender_info.qp_sum; | |
231 outbound_video->frames_encoded = video_sender_info.frames_encoded; | |
228 } | 232 } |
229 | 233 |
230 void ProduceCertificateStatsFromSSLCertificateStats( | 234 void ProduceCertificateStatsFromSSLCertificateStats( |
231 int64_t timestamp_us, const rtc::SSLCertificateStats& certificate_stats, | 235 int64_t timestamp_us, const rtc::SSLCertificateStats& certificate_stats, |
232 RTCStatsReport* report) { | 236 RTCStatsReport* report) { |
233 RTCCertificateStats* prev_certificate_stats = nullptr; | 237 RTCCertificateStats* prev_certificate_stats = nullptr; |
234 for (const rtc::SSLCertificateStats* s = &certificate_stats; s; | 238 for (const rtc::SSLCertificateStats* s = &certificate_stats; s; |
235 s = s->issuer.get()) { | 239 s = s->issuer.get()) { |
236 std::string certificate_stats_id = | 240 std::string certificate_stats_id = |
237 RTCCertificateIDFromFingerprint(s->fingerprint); | 241 RTCCertificateIDFromFingerprint(s->fingerprint); |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
965 const std::string& type) { | 969 const std::string& type) { |
966 return CandidateTypeToRTCIceCandidateType(type); | 970 return CandidateTypeToRTCIceCandidateType(type); |
967 } | 971 } |
968 | 972 |
969 const char* DataStateToRTCDataChannelStateForTesting( | 973 const char* DataStateToRTCDataChannelStateForTesting( |
970 DataChannelInterface::DataState state) { | 974 DataChannelInterface::DataState state) { |
971 return DataStateToRTCDataChannelState(state); | 975 return DataStateToRTCDataChannelState(state); |
972 } | 976 } |
973 | 977 |
974 } // namespace webrtc | 978 } // namespace webrtc |
OLD | NEW |