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

Unified Diff: media/ffmpeg/ffmpeg_common.cc

Issue 45053003: Add UMA metrics for ffmpeg color ranges. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Log VideoFrame::Format, instead of ffmpeg's AvPixelFormat. Created 7 years, 2 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 | « media/base/video_frame.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/ffmpeg/ffmpeg_common.cc
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 72b31252f8508df48cc10c7d2d832264525233cd..8f3d1de5c0573df9815f0d568ae2b19e167b473e 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -6,6 +6,7 @@
#include "base/basictypes.h"
#include "base/logging.h"
+#include "base/metrics/histogram.h"
#include "media/base/decoder_buffer.h"
#include "media/base/video_frame.h"
#include "media/base/video_util.h"
@@ -369,6 +370,12 @@ void AVStreamToVideoDecoderConfig(
gfx::Size natural_size = GetNaturalSize(
visible_rect.size(), aspect_ratio.num, aspect_ratio.den);
+ if (record_stats) {
+ UMA_HISTOGRAM_ENUMERATION("Media.VideoColorRange",
+ stream->codec->color_range,
+ AVCOL_RANGE_NB + 1);
scherkus (not reviewing) 2013/10/29 00:36:31 should this be AVCOL_RANGE_NB as opposed to AVCOL_
+ }
+
VideoFrame::Format format = PixelFormatToVideoFormat(stream->codec->pix_fmt);
if (codec == kCodecVP9) {
// TODO(tomfinegan): libavcodec doesn't know about VP9.
« no previous file with comments | « media/base/video_frame.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698