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

Unified Diff: media/base/android/media_codec_decoder.h

Issue 1367403003: Added UMA metrics for MediaSourcePlayer and MediaCodecPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mtplayer-drm
Patch Set: Addressed most of the comments Created 5 years, 3 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
Index: media/base/android/media_codec_decoder.h
diff --git a/media/base/android/media_codec_decoder.h b/media/base/android/media_codec_decoder.h
index 72cbf1000100c24db50db5a9c972cfda44d53dd6..185b22c4a9b156c55db422c5ed6bbf0bc9dd9b3d 100644
--- a/media/base/android/media_codec_decoder.h
+++ b/media/base/android/media_codec_decoder.h
@@ -19,6 +19,7 @@
namespace media {
+class FrameStatistics;
class MediaCodecBridge;
// The decoder for MediaCodecPlayer.
@@ -165,7 +166,9 @@ class MediaCodecDecoder {
const base::Closure& stop_done_cb,
const base::Closure& key_required_cb,
const base::Closure& error_cb,
- const char* decoder_thread_name);
+ const char* decoder_thread_name,
+ FrameStatistics* frame_statistics);
+
virtual ~MediaCodecDecoder();
virtual const char* class_name() const;
@@ -301,8 +304,9 @@ class MediaCodecDecoder {
// Returns true if we are in the process of sync stop.
bool InEmergencyStop() const { return GetState() == kInEmergencyStop; }
- // Notifies the decoder if the frame is the last one.
- void CheckLastFrame(bool eos_encountered, bool has_delayed_tasks);
+ // Notifies the decoder if the frame is the last one. Returns true if the
+ // current frame is the last frame.
+ bool CheckLastFrame(bool eos_encountered, bool has_delayed_tasks);
const char* AsString(RenderMode render_mode);
@@ -321,6 +325,9 @@ class MediaCodecDecoder {
// The queue of access units.
AccessUnitQueue au_queue_;
+ // Statistics for UMA.
+ FrameStatistics* frame_statistics_;
+
// Flag forces reconfiguration even if |media_codec_bridge_| exists. Currently
// is set by video decoder when the video surface changes.
bool needs_reconfigure_;

Powered by Google App Engine
This is Rietveld 408576698