Expose video freeze metrics in GetStats.

This adds the following non-standardized metrics to video receiver
stats:
- freezeCount
- pauseCount
- totalFreezesDuration
- totalPausesDuration
- totalFramesDuration
- sumOfSquaredFrameDurations

For description of these metrics see
https://henbos.github.io/webrtc-provisional-stats/#RTCVideoReceiverStats-dict*

Bug: webrtc:10145
Change-Id: I4c76d5651102e73b1592ffed561e6224f2badeb6
Reviewed-on: https://webrtc-review.googlesource.com/c/114840
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26523}
This commit is contained in:
Sergey Silkin
2019-01-31 16:45:42 +01:00
committed by Commit Bot
parent 1266487631
commit 0237106559
15 changed files with 425 additions and 98 deletions

View File

@ -381,7 +381,13 @@ WEBRTC_RTCSTATS_IMPL(RTCMediaStreamTrackStats, RTCStats, "track",
&concealed_samples,
&concealment_events,
&jitter_buffer_flushes,
&delayed_packet_outage_samples);
&delayed_packet_outage_samples,
&freeze_count,
&pause_count,
&total_freezes_duration,
&total_pauses_duration,
&total_frames_duration,
&sum_squared_frame_durations);
// clang-format on
RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(const std::string& id,
@ -420,7 +426,13 @@ RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(std::string&& id,
concealed_samples("concealedSamples"),
concealment_events("concealmentEvents"),
jitter_buffer_flushes("jitterBufferFlushes"),
delayed_packet_outage_samples("delayedPacketOutageSamples") {
delayed_packet_outage_samples("delayedPacketOutageSamples"),
freeze_count("freezeCount"),
pause_count("pauseCount"),
total_freezes_duration("totalFreezesDuration"),
total_pauses_duration("totalPausesDuration"),
total_frames_duration("totalFramesDuration"),
sum_squared_frame_durations("sumOfSquaredFramesDuration") {
RTC_DCHECK(kind == RTCMediaStreamTrackKind::kAudio ||
kind == RTCMediaStreamTrackKind::kVideo);
}
@ -455,7 +467,13 @@ RTCMediaStreamTrackStats::RTCMediaStreamTrackStats(
concealed_samples(other.concealed_samples),
concealment_events(other.concealment_events),
jitter_buffer_flushes(other.jitter_buffer_flushes),
delayed_packet_outage_samples(other.delayed_packet_outage_samples) {}
delayed_packet_outage_samples(other.delayed_packet_outage_samples),
freeze_count(other.freeze_count),
pause_count(other.pause_count),
total_freezes_duration(other.total_freezes_duration),
total_pauses_duration(other.total_pauses_duration),
total_frames_duration(other.total_frames_duration),
sum_squared_frame_durations(other.sum_squared_frame_durations) {}
RTCMediaStreamTrackStats::~RTCMediaStreamTrackStats() {}