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

Unified Diff: media/filters/ffmpeg_demuxer.cc

Issue 13493018: Add UMA tracing for unsupported codecs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 8 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/filters/ffmpeg_demuxer.cc
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index fec580a09a8d9253fcde340c674d3c78f8fb5cfc..0221eb75b56ae0f47010ef295280abd9225ebafb 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -14,6 +14,7 @@
#include "base/command_line.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
+#include "base/metrics/sparse_histogram.h"
#include "base/stl_util.h"
#include "base/string_util.h"
#include "base/task_runner_util.h"
@@ -465,6 +466,9 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
if (codec_type == AVMEDIA_TYPE_AUDIO) {
if (found_audio_stream)
continue;
+ // Log the codec detected, whether it is supported or not.
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Media.DetectedAudioCodec",
+ codec_context->codec_id);
// Ensure the codec is supported.
if (CodecIDToAudioCodec(codec_context->codec_id) == kUnknownAudioCodec)
continue;
@@ -472,6 +476,9 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
} else if (codec_type == AVMEDIA_TYPE_VIDEO) {
if (found_video_stream)
continue;
+ // Log the codec detected, whether it is supported or not.
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Media.DetectedVideoCodec",
+ codec_context->codec_id);
// Ensure the codec is supported.
if (CodecIDToVideoCodec(codec_context->codec_id) == kUnknownVideoCodec)
continue;
« 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