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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
143 RTC_DCHECK(inbound_stats); | 143 RTC_DCHECK(inbound_stats); |
144 inbound_stats->ssrc = rtc::ToString<>(media_receiver_info.ssrc()); | 144 inbound_stats->ssrc = rtc::ToString<>(media_receiver_info.ssrc()); |
145 // TODO(hbos): Support the remote case. crbug.com/657855 | 145 // TODO(hbos): Support the remote case. crbug.com/657855 |
146 inbound_stats->is_remote = false; | 146 inbound_stats->is_remote = false; |
147 // TODO(hbos): Set |codec_id| when we have |RTCCodecStats|. Maybe relevant: | 147 // TODO(hbos): Set |codec_id| when we have |RTCCodecStats|. Maybe relevant: |
148 // |media_receiver_info.codec_name|. crbug.com/657854, 657855, 659117 | 148 // |media_receiver_info.codec_name|. crbug.com/657854, 657855, 659117 |
149 inbound_stats->packets_received = | 149 inbound_stats->packets_received = |
150 static_cast<uint32_t>(media_receiver_info.packets_rcvd); | 150 static_cast<uint32_t>(media_receiver_info.packets_rcvd); |
151 inbound_stats->bytes_received = | 151 inbound_stats->bytes_received = |
152 static_cast<uint64_t>(media_receiver_info.bytes_rcvd); | 152 static_cast<uint64_t>(media_receiver_info.bytes_rcvd); |
153 inbound_stats->packets_lost = | |
154 static_cast<uint32_t>(media_receiver_info.packets_lost); | |
hbos
2016/12/08 15:16:30
This is the same value used by the old getStats fo
| |
153 inbound_stats->fraction_lost = | 155 inbound_stats->fraction_lost = |
154 static_cast<double>(media_receiver_info.fraction_lost); | 156 static_cast<double>(media_receiver_info.fraction_lost); |
155 } | 157 } |
156 | 158 |
157 void SetInboundRTPStreamStatsFromVoiceReceiverInfo( | 159 void SetInboundRTPStreamStatsFromVoiceReceiverInfo( |
158 const cricket::VoiceReceiverInfo& voice_receiver_info, | 160 const cricket::VoiceReceiverInfo& voice_receiver_info, |
159 RTCInboundRTPStreamStats* inbound_audio) { | 161 RTCInboundRTPStreamStats* inbound_audio) { |
160 SetInboundRTPStreamStatsFromMediaReceiverInfo( | 162 SetInboundRTPStreamStatsFromMediaReceiverInfo( |
161 voice_receiver_info, inbound_audio); | 163 voice_receiver_info, inbound_audio); |
162 inbound_audio->media_type = "audio"; | 164 inbound_audio->media_type = "audio"; |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
913 const std::string& type) { | 915 const std::string& type) { |
914 return CandidateTypeToRTCIceCandidateType(type); | 916 return CandidateTypeToRTCIceCandidateType(type); |
915 } | 917 } |
916 | 918 |
917 const char* DataStateToRTCDataChannelStateForTesting( | 919 const char* DataStateToRTCDataChannelStateForTesting( |
918 DataChannelInterface::DataState state) { | 920 DataChannelInterface::DataState state) { |
919 return DataStateToRTCDataChannelState(state); | 921 return DataStateToRTCDataChannelState(state); |
920 } | 922 } |
921 | 923 |
922 } // namespace webrtc | 924 } // namespace webrtc |
OLD | NEW |