summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/NuPlayerDriver.h
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2013-02-05 22:46:45 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-02-05 22:46:45 +0000
commit3c7f8b48fcae6f4b41b66c86008170166e43b428 (patch)
treef96f734b550e2461f4a67a5a4353792b1c82be75 /media/libmediaplayerservice/nuplayer/NuPlayerDriver.h
parent198a893671ce80d951625fe328a92073306660d0 (diff)
parent9575c96b6e418914e2ffc6741ecc8d71e3968dbe (diff)
downloadframeworks_av-3c7f8b48fcae6f4b41b66c86008170166e43b428.zip
frameworks_av-3c7f8b48fcae6f4b41b66c86008170166e43b428.tar.gz
frameworks_av-3c7f8b48fcae6f4b41b66c86008170166e43b428.tar.bz2
Merge "Support for a "preparation" state that can take care of lengthy"
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayerDriver.h')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayerDriver.h30
1 files changed, 21 insertions, 9 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.h b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.h
index 553c406..49b8ed2 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.h
+++ b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.h
@@ -61,6 +61,8 @@ struct NuPlayerDriver : public MediaPlayerInterface {
virtual status_t dump(int fd, const Vector<String16> &args) const;
+ void notifySetDataSourceCompleted(status_t err);
+ void notifyPrepareCompleted(status_t err);
void notifyResetComplete();
void notifySetSurfaceComplete();
void notifyDuration(int64_t durationUs);
@@ -68,17 +70,32 @@ struct NuPlayerDriver : public MediaPlayerInterface {
void notifySeekComplete();
void notifyFrameStats(int64_t numFramesTotal, int64_t numFramesDropped);
void notifyListener(int msg, int ext1 = 0, int ext2 = 0);
+ void notifyFlagsChanged(uint32_t flags);
protected:
virtual ~NuPlayerDriver();
private:
+ enum State {
+ STATE_IDLE,
+ STATE_SET_DATASOURCE_PENDING,
+ STATE_UNPREPARED,
+ STATE_PREPARING,
+ STATE_PREPARED,
+ STATE_RUNNING,
+ STATE_PAUSED,
+ STATE_RESET_IN_PROGRESS,
+ };
+
mutable Mutex mLock;
Condition mCondition;
+ State mState;
+
+ status_t mAsyncResult;
+
// The following are protected through "mLock"
// >>>
- bool mResetInProgress;
bool mSetSurfaceInProgress;
int64_t mDurationUs;
int64_t mPositionUs;
@@ -88,19 +105,14 @@ private:
sp<ALooper> mLooper;
sp<NuPlayer> mPlayer;
+ uint32_t mPlayerFlags;
- enum State {
- UNINITIALIZED,
- STOPPED,
- PLAYING,
- PAUSED
- };
-
- State mState;
bool mAtEOS;
int64_t mStartupSeekTimeUs;
+ status_t prepare_l();
+
DISALLOW_EVIL_CONSTRUCTORS(NuPlayerDriver);
};