summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/NuPlayerDriver.h
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-01-05 12:17:08 -0800
committerAndreas Huber <andih@google.com>2011-01-05 14:48:31 -0800
commit43c3e6ce02215ca99d506458f596cb1211639f29 (patch)
tree52a143f0a92abc9f5050f5c9f44e2e4c087848f3 /media/libmediaplayerservice/nuplayer/NuPlayerDriver.h
parent627baacc748c5e2ed68bdb256aea4d70fcfe9ce4 (diff)
downloadframeworks_av-43c3e6ce02215ca99d506458f596cb1211639f29.zip
frameworks_av-43c3e6ce02215ca99d506458f596cb1211639f29.tar.gz
frameworks_av-43c3e6ce02215ca99d506458f596cb1211639f29.tar.bz2
Seek/Duration support for completed http live streams in NuPlayer.
Change-Id: I55bbe75d87140c07b1927d14ad24130fce803463 related-to-bug: 3321475
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayerDriver.h')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayerDriver.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.h b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.h
index f153af4..e3a5de4 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayerDriver.h
+++ b/media/libmediaplayerservice/nuplayer/NuPlayerDriver.h
@@ -54,7 +54,10 @@ struct NuPlayerDriver : public MediaPlayerInterface {
virtual status_t getMetadata(
const media::Metadata::Filter& ids, Parcel *records);
- virtual void sendEvent(int msg, int ext1 = 0, int ext2 = 0);
+ void notifyResetComplete();
+ void notifyDuration(int64_t durationUs);
+ void notifyPosition(int64_t positionUs);
+ void notifySeekComplete();
protected:
virtual ~NuPlayerDriver();
@@ -62,11 +65,27 @@ protected:
private:
Mutex mLock;
Condition mCondition;
+
+ // The following are protected through "mLock"
+ // >>>
bool mResetInProgress;
+ int64_t mDurationUs;
+ int64_t mPositionUs;
+ // <<<
sp<ALooper> mLooper;
sp<NuPlayer> mPlayer;
- bool mPlaying;
+
+ enum State {
+ UNINITIALIZED,
+ STOPPED,
+ PLAYING,
+ PAUSED
+ };
+
+ State mState;
+
+ int64_t mStartupSeekTimeUs;
DISALLOW_EVIL_CONSTRUCTORS(NuPlayerDriver);
};