diff options
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayer.h')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayer.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.h b/media/libmediaplayerservice/nuplayer/NuPlayer.h index d6120d2..121f7dd 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.h +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.h @@ -54,7 +54,6 @@ struct NuPlayer : public AHandler { void start(); void pause(); - void resume(); // Will notify the driver through "notifyResetComplete" once finished. void resetAsync(); @@ -95,7 +94,7 @@ private: struct Action; struct SeekAction; struct SetSurfaceAction; - struct ShutdownDecoderAction; + struct FlushDecoderAction; struct PostMessageAction; struct SimpleAction; @@ -160,6 +159,12 @@ private: SHUT_DOWN, }; + enum FlushCommand { + FLUSH_CMD_NONE, + FLUSH_CMD_FLUSH, + FLUSH_CMD_SHUTDOWN, + }; + // Once the current flush is complete this indicates whether the // notion of time has changed. bool mTimeDiscontinuityPending; @@ -213,6 +218,9 @@ private: void handleFlushComplete(bool audio, bool isDecoder); void finishFlushIfPossible(); + void onStart(); + void onResume(); + bool audioDecoderStillNeeded(); void flushDecoder( @@ -227,8 +235,7 @@ private: void processDeferredActions(); void performSeek(int64_t seekTimeUs, bool needNotify); - void performDecoderFlush(); - void performDecoderShutdown(bool audio, bool video); + void performDecoderFlush(FlushCommand audio, FlushCommand video); void performReset(); void performScanSources(); void performSetSurface(const sp<NativeWindowWrapper> &wrapper); |