diff options
Diffstat (limited to 'media/libstagefright/include')
-rw-r--r-- | media/libstagefright/include/AwesomePlayer.h | 12 | ||||
-rw-r--r-- | media/libstagefright/include/Prefetcher.h | 4 |
2 files changed, 13 insertions, 3 deletions
diff --git a/media/libstagefright/include/AwesomePlayer.h b/media/libstagefright/include/AwesomePlayer.h index 75e71e6..651b910 100644 --- a/media/libstagefright/include/AwesomePlayer.h +++ b/media/libstagefright/include/AwesomePlayer.h @@ -57,6 +57,10 @@ struct AwesomePlayer { void reset(); + status_t prepare(); + status_t prepareAsync(); + status_t prepareAsync_l(); + status_t play(); status_t pause(); @@ -121,6 +125,9 @@ private: sp<TimedEventQueue::Event> mCheckAudioStatusEvent; bool mAudioStatusEventPending; + sp<TimedEventQueue::Event> mAsyncPrepareEvent; + Condition mPreparedCondition; + void postVideoEvent_l(int64_t delayUs = -1); void postBufferingEvent_l(); void postStreamDoneEvent_l(); @@ -143,13 +150,14 @@ private: status_t setAudioSource(sp<MediaSource> source); status_t setVideoSource(sp<MediaSource> source); - void onEvent(int32_t code); void onStreamDone(); - void notifyListener_l(int msg, int ext1 = 0); + void notifyListener_l(int msg, int ext1 = 0, int ext2 = 0); + void onVideoEvent(); void onBufferingUpdate(); void onCheckAudioStatus(); + void onPrepareAsyncEvent(); AwesomePlayer(const AwesomePlayer &); AwesomePlayer &operator=(const AwesomePlayer &); diff --git a/media/libstagefright/include/Prefetcher.h b/media/libstagefright/include/Prefetcher.h index 7a97785..d227864 100644 --- a/media/libstagefright/include/Prefetcher.h +++ b/media/libstagefright/include/Prefetcher.h @@ -34,7 +34,9 @@ struct Prefetcher : public RefBase { // that will benefit from prefetching/caching the original one. sp<MediaSource> addSource(const sp<MediaSource> &source); - int64_t getCachedDurationUs(); + int64_t getCachedDurationUs(bool *noMoreData = NULL); + + status_t prepare(); protected: virtual ~Prefetcher(); |