Commit 1f1f51c9 authored by grunell@chromium.org's avatar grunell@chromium.org

Add UMA stats for received frames or not in video track adapter.

The adapter is torn down when a session is ended (no more tracks connected to it), so we do the logging in the destructor.

BUG=399835

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

Cr-Commit-Position: refs/heads/master@{#289939}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289939 0039d316-1c4b-4281-b951-d872f2087c98
parent bb632bed
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/debug/trace_event.h" #include "base/debug/trace_event.h"
#include "base/location.h" #include "base/location.h"
#include "base/metrics/histogram.h"
#include "media/base/video_util.h" #include "media/base/video_util.h"
namespace content { namespace content {
...@@ -315,6 +316,8 @@ VideoTrackAdapter::VideoTrackAdapter( ...@@ -315,6 +316,8 @@ VideoTrackAdapter::VideoTrackAdapter(
VideoTrackAdapter::~VideoTrackAdapter() { VideoTrackAdapter::~VideoTrackAdapter() {
DCHECK(adapters_.empty()); DCHECK(adapters_.empty());
UMA_HISTOGRAM_BOOLEAN("Media.VideoTrackAdapter.FramesReceived",
frame_counter_ > 0);
} }
void VideoTrackAdapter::AddTrack( void VideoTrackAdapter::AddTrack(
......
...@@ -11487,6 +11487,15 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -11487,6 +11487,15 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<summary>Metadata rotation in mp4 videos. Emitted during demuxing.</summary> <summary>Metadata rotation in mp4 videos. Emitted during demuxing.</summary>
</histogram> </histogram>
<histogram name="Media.VideoTrackAdapter.FramesReceived" enum="BooleanReceived">
<owner>grunell@chromium.org</owner>
<owner>mcasas@chromium.org</owner>
<summary>
If any frames were received during a video capture session. It's recorded
when a video source is stopped.
</summary>
</histogram>
<histogram name="Media.VideoVisibleAspectRatio"> <histogram name="Media.VideoVisibleAspectRatio">
<owner>scherkus@chromium.org</owner> <owner>scherkus@chromium.org</owner>
<summary>Visible aspect ratio of HTML5 video.</summary> <summary>Visible aspect ratio of HTML5 video.</summary>
...@@ -37673,6 +37682,11 @@ Therefore, the affected-histogram name has to have at least one dot in it. ...@@ -37673,6 +37682,11 @@ Therefore, the affected-histogram name has to have at least one dot in it.
<int value="1" label="Raced"/> <int value="1" label="Raced"/>
</enum> </enum>
<enum name="BooleanReceived" type="int">
<int value="0" label="Not Received"/>
<int value="1" label="Received"/>
</enum>
<enum name="BooleanRegistered" type="int"> <enum name="BooleanRegistered" type="int">
<int value="0" label="Not Registered"/> <int value="0" label="Not Registered"/>
<int value="1" label="Registered"/> <int value="1" label="Registered"/>
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