Add support for reporting "display composited video frames" through the VideoPlayback...
[WebKit-https.git] / Source / WebCore / Modules / mediasource / VideoPlaybackQuality.cpp
index ac7498c..398e788 100644 (file)
 #include "config.h"
 #include "VideoPlaybackQuality.h"
 
+#include "MediaPlayer.h"
+
 namespace WebCore {
 
-Ref<VideoPlaybackQuality> VideoPlaybackQuality::create(double creationTime, unsigned totalVideoFrames, unsigned droppedVideoFrames, unsigned corruptedVideoFrames, double totalFrameDelay)
+Ref<VideoPlaybackQuality> VideoPlaybackQuality::create(double creationTime, const VideoPlaybackQualityMetrics& metrics)
 {
-    return adoptRef(*new VideoPlaybackQuality(creationTime, totalVideoFrames, droppedVideoFrames, corruptedVideoFrames, totalFrameDelay));
+    return adoptRef(*new VideoPlaybackQuality(creationTime, metrics));
 }
 
-VideoPlaybackQuality::VideoPlaybackQuality(double creationTime, unsigned totalVideoFrames, unsigned droppedVideoFrames, unsigned corruptedVideoFrames, double totalFrameDelay)
+VideoPlaybackQuality::VideoPlaybackQuality(double creationTime, const VideoPlaybackQualityMetrics& metrics)
     : m_creationTime(creationTime)
-    , m_totalVideoFrames(totalVideoFrames)
-    , m_droppedVideoFrames(droppedVideoFrames)
-    , m_corruptedVideoFrames(corruptedVideoFrames)
-    , m_totalFrameDelay(totalFrameDelay)
+    , m_totalVideoFrames(metrics.totalVideoFrames)
+    , m_droppedVideoFrames(metrics.droppedVideoFrames)
+    , m_corruptedVideoFrames(metrics.corruptedVideoFrames)
+    , m_displayCompositedVideoFrames(metrics.displayCompositedVideoFrames)
+    , m_totalFrameDelay(metrics.totalFrameDelay)
 {
 }