summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/include
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-06-07 15:52:25 -0700
committerAndreas Huber <andih@google.com>2011-06-08 16:04:26 -0700
commita0b1d4b161599c2bb2a47119e50c51e75bbe980e (patch)
tree806d5dbe250fbd8069bff8bcafffc730736fef8d /media/libstagefright/include
parent26adde897188059057b3ffcfde1d60171fc6888c (diff)
downloadframeworks_av-a0b1d4b161599c2bb2a47119e50c51e75bbe980e.zip
frameworks_av-a0b1d4b161599c2bb2a47119e50c51e75bbe980e.tar.gz
frameworks_av-a0b1d4b161599c2bb2a47119e50c51e75bbe980e.tar.bz2
Make dumpsys(media.player) more useful by having AwesomePlayer populate it.
Change-Id: I12ba7d542331a8293d67a0d47378b8be4f777759
Diffstat (limited to 'media/libstagefright/include')
-rw-r--r--media/libstagefright/include/AwesomePlayer.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/media/libstagefright/include/AwesomePlayer.h b/media/libstagefright/include/AwesomePlayer.h
index aebcdd1..f6df380 100644
--- a/media/libstagefright/include/AwesomePlayer.h
+++ b/media/libstagefright/include/AwesomePlayer.h
@@ -105,6 +105,8 @@ struct AwesomePlayer {
status_t setTimedTextTrackIndex(int32_t index);
+ status_t dump(int fd, const Vector<String16> &args) const;
+
private:
friend struct AwesomeEvent;
friend struct PreviewPlayer;
@@ -142,6 +144,7 @@ private:
mutable Mutex mLock;
Mutex mMiscStateLock;
+ mutable Mutex mStatsLock;
OMXClient mClient;
TimedEventQueue mQueue;
@@ -294,6 +297,33 @@ private:
bool isStreamingHTTP() const;
void sendCacheStats();
+ enum FlagMode {
+ SET,
+ CLEAR,
+ ASSIGN
+ };
+ void modifyFlags(unsigned value, FlagMode mode);
+
+ struct TrackStat {
+ String8 mMIME;
+ String8 mDecoderName;
+ };
+
+ // protected by mStatsLock
+ struct Stats {
+ int mFd;
+ String8 mURI;
+ int64_t mBitrate;
+ ssize_t mAudioTrackIndex;
+ ssize_t mVideoTrackIndex;
+ int64_t mNumVideoFramesDecoded;
+ int64_t mNumVideoFramesDropped;
+ int32_t mVideoWidth;
+ int32_t mVideoHeight;
+ uint32_t mFlags;
+ Vector<TrackStat> mTracks;
+ } mStats;
+
AwesomePlayer(const AwesomePlayer &);
AwesomePlayer &operator=(const AwesomePlayer &);
};