diff options
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayer.h')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayer.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.h b/media/libmediaplayerservice/nuplayer/NuPlayer.h index 31efb2e..ca87be9 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.h +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.h @@ -42,7 +42,9 @@ struct NuPlayer : public AHandler { void setDataSource(int fd, int64_t offset, int64_t length); - void setVideoSurfaceTexture(const sp<ISurfaceTexture> &surfaceTexture); + void setVideoSurfaceTextureAsync( + const sp<ISurfaceTexture> &surfaceTexture); + void setAudioSink(const sp<MediaPlayerBase::AudioSink> &sink); void start(); @@ -73,6 +75,10 @@ private: struct Renderer; struct RTSPSource; struct StreamingSource; + struct Action; + struct SeekAction; + struct SetSurfaceAction; + struct SimpleAction; enum { kWhatSetDataSource = '=DaS', @@ -102,6 +108,8 @@ private: sp<Decoder> mAudioDecoder; sp<Renderer> mRenderer; + List<sp<Action> > mDeferredActions; + bool mAudioEOS; bool mVideoEOS; @@ -126,8 +134,6 @@ private: FlushStatus mFlushingAudio; FlushStatus mFlushingVideo; - bool mResetInProgress; - bool mResetPostponed; int64_t mSkipRenderingAudioUntilMediaTimeUs; int64_t mSkipRenderingVideoUntilMediaTimeUs; @@ -137,6 +143,8 @@ private: int32_t mVideoScalingMode; + bool mStarted; + status_t instantiateDecoder(bool audio, sp<Decoder> *decoder); status_t feedDecoderInputData(bool audio, const sp<AMessage> &msg); @@ -150,12 +158,20 @@ private: static bool IsFlushingState(FlushStatus state, bool *needShutdown = NULL); - void finishReset(); void postScanSources(); void schedulePollDuration(); void cancelPollDuration(); + void processDeferredActions(); + + void performSeek(int64_t seekTimeUs); + void performDecoderFlush(); + void performDecoderShutdown(); + void performReset(); + void performScanSources(); + void performSetSurface(const sp<NativeWindowWrapper> &wrapper); + DISALLOW_EVIL_CONSTRUCTORS(NuPlayer); }; |