Commit 2f7b6fcf authored by jrummell@chromium.org's avatar jrummell@chromium.org

Add UMA tracing for unsupported codecs

BUG=

Review URL: https://chromiumcodereview.appspot.com/13493018

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195247 0039d316-1c4b-4281-b951-d872f2087c98
parent ac36a883
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "base/command_line.h" #include "base/command_line.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/message_loop.h" #include "base/message_loop.h"
#include "base/metrics/sparse_histogram.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/string_util.h" #include "base/string_util.h"
#include "base/task_runner_util.h" #include "base/task_runner_util.h"
...@@ -465,6 +466,9 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb, ...@@ -465,6 +466,9 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
if (codec_type == AVMEDIA_TYPE_AUDIO) { if (codec_type == AVMEDIA_TYPE_AUDIO) {
if (found_audio_stream) if (found_audio_stream)
continue; 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. // Ensure the codec is supported.
if (CodecIDToAudioCodec(codec_context->codec_id) == kUnknownAudioCodec) if (CodecIDToAudioCodec(codec_context->codec_id) == kUnknownAudioCodec)
continue; continue;
...@@ -472,6 +476,9 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb, ...@@ -472,6 +476,9 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
} else if (codec_type == AVMEDIA_TYPE_VIDEO) { } else if (codec_type == AVMEDIA_TYPE_VIDEO) {
if (found_video_stream) if (found_video_stream)
continue; 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. // Ensure the codec is supported.
if (CodecIDToVideoCodec(codec_context->codec_id) == kUnknownVideoCodec) if (CodecIDToVideoCodec(codec_context->codec_id) == kUnknownVideoCodec)
continue; continue;
......
This diff is collapsed.
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