Chromium Code Reviews| Index: webrtc/api/rtcstatscollector.cc |
| diff --git a/webrtc/api/rtcstatscollector.cc b/webrtc/api/rtcstatscollector.cc |
| index fbc6dbc5d3be86ce60aec2fa44beb579f318159c..2fd8138122aa658d97b662411a609628df50d781 100644 |
| --- a/webrtc/api/rtcstatscollector.cc |
| +++ b/webrtc/api/rtcstatscollector.cc |
| @@ -126,21 +126,29 @@ void SetInboundRTPStreamStatsFromMediaReceiverInfo( |
| void SetInboundRTPStreamStatsFromVoiceReceiverInfo( |
| const cricket::VoiceReceiverInfo& voice_receiver_info, |
| - RTCInboundRTPStreamStats* inbound_stats) { |
| + RTCInboundRTPStreamStats* inbound_audio) { |
| SetInboundRTPStreamStatsFromMediaReceiverInfo( |
| - voice_receiver_info, inbound_stats); |
| - inbound_stats->media_type = "audio"; |
| - inbound_stats->jitter = |
| + voice_receiver_info, inbound_audio); |
| + inbound_audio->media_type = "audio"; |
| + inbound_audio->jitter = |
| static_cast<double>(voice_receiver_info.jitter_ms) / |
| rtc::kNumMillisecsPerSec; |
| + // |fir_count|, |pli_count| and |sli_count| are only valid for video and are |
| + // purposefully left undefined for audio. |
| } |
| void SetInboundRTPStreamStatsFromVideoReceiverInfo( |
| const cricket::VideoReceiverInfo& video_receiver_info, |
| - RTCInboundRTPStreamStats* inbound_stats) { |
| + RTCInboundRTPStreamStats* inbound_video) { |
| SetInboundRTPStreamStatsFromMediaReceiverInfo( |
| - video_receiver_info, inbound_stats); |
| - inbound_stats->media_type = "video"; |
| + video_receiver_info, inbound_video); |
| + inbound_video->media_type = "video"; |
| + inbound_video->fir_count = |
| + static_cast<uint32_t>(video_receiver_info.firs_sent); |
| + inbound_video->pli_count = |
| + static_cast<uint32_t>(video_receiver_info.plis_sent); |
| + inbound_video->nack_count = |
| + static_cast<uint32_t>(video_receiver_info.nacks_sent); |
|
hta-webrtc
2016/11/22 09:51:29
Are we sure these are actually counted (ie never -
hbos
2016/11/22 11:02:45
Looks like it, they start at 0 and there is code f
|
| } |
| void SetOutboundRTPStreamStatsFromMediaSenderInfo( |