summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/NuPlayer.h
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2013-02-05 13:59:56 -0800
committerAndreas Huber <andih@google.com>2013-02-05 14:09:08 -0800
commit9575c96b6e418914e2ffc6741ecc8d71e3968dbe (patch)
tree1fafdf4d3150799cf9a4266919bf069b7f007c91 /media/libmediaplayerservice/nuplayer/NuPlayer.h
parent84ca0414fedea2dfe51607b422f6227e1c4f0d7f (diff)
downloadframeworks_av-9575c96b6e418914e2ffc6741ecc8d71e3968dbe.zip
frameworks_av-9575c96b6e418914e2ffc6741ecc8d71e3968dbe.tar.gz
frameworks_av-9575c96b6e418914e2ffc6741ecc8d71e3968dbe.tar.bz2
Support for a "preparation" state that can take care of lengthy
operations in NuPlayer and its sources. Sources also can publish their flags now and the mediaplayer UI will be able to pick up on these. Change-Id: I4f2b7e5d105dcb4b6c9132cd0e8799efa0c6a14b
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayer.h')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.h b/media/libmediaplayerservice/nuplayer/NuPlayer.h
index 0ff6089..50d0462 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.h
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.h
@@ -35,12 +35,14 @@ struct NuPlayer : public AHandler {
void setDriver(const wp<NuPlayerDriver> &driver);
- void setDataSource(const sp<IStreamSource> &source);
+ void setDataSourceAsync(const sp<IStreamSource> &source);
- void setDataSource(
+ void setDataSourceAsync(
const char *url, const KeyedVector<String8, String8> *headers);
- void setDataSource(int fd, int64_t offset, int64_t length);
+ void setDataSourceAsync(int fd, int64_t offset, int64_t length);
+
+ void prepareAsync();
void setVideoSurfaceTextureAsync(
const sp<IGraphicBufferProducer> &bufferProducer);
@@ -82,6 +84,7 @@ private:
enum {
kWhatSetDataSource = '=DaS',
+ kWhatPrepare = 'prep',
kWhatSetVideoNativeWindow = '=NaW',
kWhatSetAudioSink = '=AuS',
kWhatMoreDataQueued = 'more',
@@ -102,6 +105,7 @@ private:
bool mUIDValid;
uid_t mUID;
sp<Source> mSource;
+ uint32_t mSourceFlags;
sp<NativeWindowWrapper> mNativeWindow;
sp<MediaPlayerBase::AudioSink> mAudioSink;
sp<Decoder> mVideoDecoder;
@@ -173,6 +177,8 @@ private:
void performScanSources();
void performSetSurface(const sp<NativeWindowWrapper> &wrapper);
+ void onSourceNotify(const sp<AMessage> &msg);
+
DISALLOW_EVIL_CONSTRUCTORS(NuPlayer);
};