Add jitterBufferDelay and jitterBufferEmittedCount stats for video
jitterBufferDelay and jitterBufferEmittedCount are defined
in RTCMediaStreamStats for both audio and video.
But for video, they were not populated in RTCInboundRtpStreamStats.
Bug: webrtc:12910
Change-Id: I135d473f055ecfb2c39b078ccf18c1bb9bc4f210
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/224280
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34398}
diff --git a/pc/rtc_stats_collector.cc b/pc/rtc_stats_collector.cc
index 2049d83..1fa731b 100644
--- a/pc/rtc_stats_collector.cc
+++ b/pc/rtc_stats_collector.cc
@@ -333,6 +333,10 @@
static_cast<uint64_t>(media_receiver_info.header_and_padding_bytes_rcvd);
inbound_stats->packets_lost =
static_cast<int32_t>(media_receiver_info.packets_lost);
+ inbound_stats->jitter_buffer_delay =
+ media_receiver_info.jitter_buffer_delay_seconds;
+ inbound_stats->jitter_buffer_emitted_count =
+ media_receiver_info.jitter_buffer_emitted_count;
}
std::unique_ptr<RTCInboundRTPStreamStats> CreateInboundAudioStreamStats(
@@ -353,10 +357,6 @@
}
inbound_audio->jitter = static_cast<double>(voice_receiver_info.jitter_ms) /
rtc::kNumMillisecsPerSec;
- inbound_audio->jitter_buffer_delay =
- voice_receiver_info.jitter_buffer_delay_seconds;
- inbound_audio->jitter_buffer_emitted_count =
- voice_receiver_info.jitter_buffer_emitted_count;
inbound_audio->total_samples_received =
voice_receiver_info.total_samples_received;
inbound_audio->concealed_samples = voice_receiver_info.concealed_samples;