summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/include/AwesomePlayer.h
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-02-08 16:39:24 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-02-08 16:39:24 -0800
commit2dd73b65542c9eeb82bb567098f235349d18b06f (patch)
tree6d473e627e5c8f78f7380db7b550d7f3d932f66b /media/libstagefright/include/AwesomePlayer.h
parent940ad815a1a30abf0268949e3d3937d7e0d672c0 (diff)
parentc23f12af0394aa2f6651968a3c8840f1af317aa1 (diff)
downloadframeworks_av-2dd73b65542c9eeb82bb567098f235349d18b06f.zip
frameworks_av-2dd73b65542c9eeb82bb567098f235349d18b06f.tar.gz
frameworks_av-2dd73b65542c9eeb82bb567098f235349d18b06f.tar.bz2
Merge "Properly implement asynchronous preparation of media playback."
Diffstat (limited to 'media/libstagefright/include/AwesomePlayer.h')
-rw-r--r--media/libstagefright/include/AwesomePlayer.h12
1 files changed, 10 insertions, 2 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 &);