diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-16 02:03:16 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-16 02:03:16 +0000 |
commit | 4c51bc66e6496234d5a3a7cbdfb1cf07cca2167e (patch) | |
tree | 03e28346b7752cec02e91ba925694548b49b8184 /media/base/pipeline.h | |
parent | 9cadfb34adaf42ad30e398b24ab06e5bc587e57a (diff) | |
download | chromium_src-4c51bc66e6496234d5a3a7cbdfb1cf07cca2167e.zip chromium_src-4c51bc66e6496234d5a3a7cbdfb1cf07cca2167e.tar.gz chromium_src-4c51bc66e6496234d5a3a7cbdfb1cf07cca2167e.tar.bz2 |
Implement webkit media metrics in chromium.
This implements the chromium side of the webkit media statistics
feature.
A followup cl (in webkit) will wire the two sides together.
Patch by sjl@chromium.org:
http://codereview.chromium.org/6246091/
BUG=71255
TEST=media_unittests
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75050 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/pipeline.h')
-rw-r--r-- | media/base/pipeline.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/media/base/pipeline.h b/media/base/pipeline.h index 61a1110..0b87d29 100644 --- a/media/base/pipeline.h +++ b/media/base/pipeline.h @@ -42,6 +42,20 @@ enum PipelineError { DEMUXER_ERROR_COULD_NOT_CREATE_THREAD, }; +struct PipelineStatistics { + PipelineStatistics() : + audio_bytes_decoded(0), + video_bytes_decoded(0), + video_frames_decoded(0), + video_frames_dropped(0) { + } + + uint32 audio_bytes_decoded; // Should be uint64? + uint32 video_bytes_decoded; // Should be uint64? + uint32 video_frames_decoded; + uint32 video_frames_dropped; +}; + class FilterCollection; // Client-provided callbacks for various pipeline operations. Clients should @@ -172,6 +186,9 @@ class Pipeline : public base::RefCountedThreadSafe<Pipeline> { // operating correctly, this will return OK. virtual PipelineError GetError() const = 0; + // Gets the current pipeline statistics. + virtual PipelineStatistics GetStatistics() const = 0; + protected: // Only allow ourselves to be deleted by reference counting. friend class base::RefCountedThreadSafe<Pipeline>; |