diff options
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayerSource.h')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayerSource.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerSource.h b/media/libmediaplayerservice/nuplayer/NuPlayerSource.h index a3201cf..53c7c12 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerSource.h +++ b/media/libmediaplayerservice/nuplayer/NuPlayerSource.h @@ -25,11 +25,21 @@ namespace android { struct ABuffer; +struct MetaData; struct NuPlayer::Source : public AHandler { enum Flags { - FLAG_SEEKABLE = 1, - FLAG_DYNAMIC_DURATION = 2, + FLAG_CAN_PAUSE = 1, + FLAG_CAN_SEEK_BACKWARD = 2, // the "10 sec back button" + FLAG_CAN_SEEK_FORWARD = 4, // the "10 sec forward button" + FLAG_CAN_SEEK = 8, // the "seek bar" + FLAG_DYNAMIC_DURATION = 16, + }; + + enum { + kWhatPrepared, + kWhatFlagsChanged, + kWhatVideoSizeChanged, }; // The provides message is used to notify the player about various @@ -38,6 +48,8 @@ struct NuPlayer::Source : public AHandler { : mNotify(notify) { } + virtual void prepareAsync() = 0; + virtual void start() = 0; virtual void stop() {} @@ -58,8 +70,6 @@ struct NuPlayer::Source : public AHandler { return INVALID_OPERATION; } - virtual uint32_t flags() const = 0; - protected: virtual ~Source() {} @@ -69,6 +79,10 @@ protected: sp<AMessage> dupNotify() const { return mNotify->dup(); } + void notifyFlagsChanged(uint32_t flags); + void notifyVideoSizeChanged(int32_t width, int32_t height); + void notifyPrepared(); + private: sp<AMessage> mNotify; |