Commit 3c9a7d60 authored by prabhur's avatar prabhur Committed by Commit bot

Add UMA for droppedframes count

Adding droppedframecount UMA to monitor videoplayback quality. Metric gets logged only if the pipeline has video & has decoded atleast one video frame.

BUG=
R=dalecurtis

Review URL: https://codereview.chromium.org/497913002

Cr-Commit-Position: refs/heads/master@{#292449}
parent ba81a156
...@@ -530,6 +530,10 @@ void Pipeline::StopTask(const base::Closure& stop_cb) { ...@@ -530,6 +530,10 @@ void Pipeline::StopTask(const base::Closure& stop_cb) {
if (state_ == kStopping) if (state_ == kStopping)
return; return;
PipelineStatistics stats = GetStatistics();
if (renderer_ && renderer_->HasVideo() && stats.video_frames_decoded > 0)
UMA_HISTOGRAM_COUNTS("Media.DroppedFrameCount", stats.video_frames_dropped);
SetState(kStopping); SetState(kStopping);
pending_callbacks_.reset(); pending_callbacks_.reset();
DoStop(base::Bind(&Pipeline::OnStopCompleted, weak_factory_.GetWeakPtr())); DoStop(base::Bind(&Pipeline::OnStopCompleted, weak_factory_.GetWeakPtr()));
......
...@@ -11085,6 +11085,15 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -11085,6 +11085,15 @@ Therefore, the affected-histogram name has to have at least one dot in it.
</summary> </summary>
</histogram> </histogram>
<histogram name="Media.DroppedFrameCount">
<owner>prabhur@chromium.org</owner>
<summary>
Count of dropped frames between pipeline start and stop. Media pipeline
starts/stops when an HTML5 video is loaded/unloaded respectively in the
browser.
</summary>
</histogram>
<histogram name="Media.Duration" units="ms"> <histogram name="Media.Duration" units="ms">
<owner>scherkus@chromium.org</owner> <owner>scherkus@chromium.org</owner>
<summary>Duration in milliseconds of HTML5 media (when known).</summary> <summary>Duration in milliseconds of HTML5 media (when known).</summary>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment