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}
diff --git a/stats/rtcstats_objects.cc b/stats/rtcstats_objects.cc
index 2451e12..473a3f3 100644
--- a/stats/rtcstats_objects.cc
+++ b/stats/rtcstats_objects.cc
@@ -381,7 +381,13 @@
                      &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 @@
       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 @@
       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() {}