Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(671)

Unified Diff: webrtc/api/rtcstatscollector.cc

Issue 2515293002: RTCInboundRTPStreamStats's [fir/pli/nack]_count are collected for video. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/api/rtcstatscollector_unittest.cc » ('j') | webrtc/api/rtcstatscollector_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | webrtc/api/rtcstatscollector_unittest.cc » ('j') | webrtc/api/rtcstatscollector_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698