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

Unified Diff: webrtc/api/rtcstatscollector.cc

Issue 2515293002: RTCInboundRTPStreamStats's [fir/pli/nack]_count are collected for video. (Closed)
Patch Set: Added comments 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') | no next file with comments »
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..b866b68b168636c91625d2d3ed4f20d87ae6e28f 100644
--- a/webrtc/api/rtcstatscollector.cc
+++ b/webrtc/api/rtcstatscollector.cc
@@ -107,6 +107,7 @@ void SetMediaStreamTrackStatsFromMediaStreamTrackInterface(
track_stats->ended = (track.state() == MediaStreamTrackInterface::kEnded);
}
+// Provides the media independent counters (both audio and video).
void SetInboundRTPStreamStatsFromMediaReceiverInfo(
const cricket::MediaReceiverInfo& media_receiver_info,
RTCInboundRTPStreamStats* inbound_stats) {
@@ -126,23 +127,32 @@ 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);
}
+// Provides the media independent counters (both audio and video).
void SetOutboundRTPStreamStatsFromMediaSenderInfo(
const cricket::MediaSenderInfo& media_sender_info,
RTCOutboundRTPStreamStats* outbound_stats) {
« no previous file with comments | « no previous file | webrtc/api/rtcstatscollector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698