Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Unified Diff: media/base/pipeline.cc

Issue 497913002: Add UMA for droppedframes count (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a check before logging Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/pipeline.cc
diff --git a/media/base/pipeline.cc b/media/base/pipeline.cc
index 41eeb98d8a1dc85fb8e845815f2a60cf8372451e..847cefa94b78bc72ed1c7c8825eabf2ba839cfb2 100644
--- a/media/base/pipeline.cc
+++ b/media/base/pipeline.cc
@@ -526,6 +526,11 @@ void Pipeline::StopTask(const base::Closure& stop_cb) {
if (state_ == kStopping)
return;
+ PipelineStatistics stats = GetStatistics();
+ if (renderer_ && renderer_->HasVideo() && stats.video_frames_decoded > 0) {
DaleCurtis 2014/08/28 18:25:24 No {} required since it's a single line if.
prabhur1 2014/08/28 18:46:30 Done.
+ UMA_HISTOGRAM_COUNTS("Media.DroppedFrameCount", stats.video_frames_dropped);
+ }
+
SetState(kStopping);
pending_callbacks_.reset();
DoStop(base::Bind(&Pipeline::OnStopCompleted, weak_factory_.GetWeakPtr()));
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698