diff options
author | Chong Zhang <chz@google.com> | 2014-11-12 16:41:05 -0800 |
---|---|---|
committer | Chong Zhang <chz@google.com> | 2014-11-20 18:14:31 -0800 |
commit | 7137ec7e005a5a6e3c0edb91cfacf16a31f4bf6a (patch) | |
tree | df4513073e85173034aca859ff220d8908969636 /media/libmediaplayerservice/nuplayer/NuPlayer.h | |
parent | f4ea51fda9396d7ee851b1d4d220384210ea2336 (diff) | |
download | frameworks_av-7137ec7e005a5a6e3c0edb91cfacf16a31f4bf6a.zip frameworks_av-7137ec7e005a5a6e3c0edb91cfacf16a31f4bf6a.tar.gz frameworks_av-7137ec7e005a5a6e3c0edb91cfacf16a31f4bf6a.tar.bz2 |
tunnel NuPlayer source and decoder input
Bug: 18342383
Change-Id: Ieff1cd3bad2b39d46f127ddd5d5139b919992461
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayer.h')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayer.h | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.h b/media/libmediaplayerservice/nuplayer/NuPlayer.h index 901cfbd..6856af1 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.h +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.h @@ -71,8 +71,6 @@ struct NuPlayer : public AHandler { sp<MetaData> getFileMeta(); - static const size_t kAggregateBufferSizeBytes; - protected: virtual ~NuPlayer(); @@ -84,6 +82,7 @@ public: private: struct Decoder; + struct DecoderBase; struct DecoderPassThrough; struct CCDecoder; struct GenericSource; @@ -128,10 +127,9 @@ private: uint32_t mSourceFlags; sp<NativeWindowWrapper> mNativeWindow; sp<MediaPlayerBase::AudioSink> mAudioSink; - sp<Decoder> mVideoDecoder; - bool mVideoIsAVC; + sp<DecoderBase> mVideoDecoder; bool mOffloadAudio; - sp<Decoder> mAudioDecoder; + sp<DecoderBase> mAudioDecoder; sp<CCDecoder> mCCDecoder; sp<Renderer> mRenderer; sp<ALooper> mRendererLooper; @@ -165,29 +163,17 @@ private: FLUSH_CMD_SHUTDOWN, }; - // Once the current flush is complete this indicates whether the - // notion of time has changed. - bool mTimeDiscontinuityPending; - // Status of flush responses from the decoder and renderer. bool mFlushComplete[2][2]; - // Used by feedDecoderInputData to aggregate small buffers into - // one large buffer. - sp<ABuffer> mPendingAudioAccessUnit; - status_t mPendingAudioErr; - sp<ABuffer> mAggregateBuffer; - FlushStatus mFlushingAudio; FlushStatus mFlushingVideo; - int64_t mNumFramesTotal, mNumFramesDropped; - int32_t mVideoScalingMode; bool mStarted; - inline const sp<Decoder> &getDecoder(bool audio) { + inline const sp<DecoderBase> &getDecoder(bool audio) { return audio ? mAudioDecoder : mVideoDecoder; } @@ -201,15 +187,12 @@ private: void openAudioSink(const sp<AMessage> &format, bool offloadOnly); void closeAudioSink(); - status_t instantiateDecoder(bool audio, sp<Decoder> *decoder); + status_t instantiateDecoder(bool audio, sp<DecoderBase> *decoder); void updateVideoSize( const sp<AMessage> &inputFormat, const sp<AMessage> &outputFormat = NULL); - status_t feedDecoderInputData(bool audio, const sp<AMessage> &msg); - void renderBuffer(bool audio, const sp<AMessage> &msg); - void notifyListener(int msg, int ext1, int ext2, const Parcel *in = NULL); void handleFlushComplete(bool audio, bool isDecoder); @@ -220,9 +203,7 @@ private: bool audioDecoderStillNeeded(); - void flushDecoder( - bool audio, bool needShutdown, const sp<AMessage> &newFormat = NULL); - void updateDecoderFormatWithoutFlush(bool audio, const sp<AMessage> &format); + void flushDecoder(bool audio, bool needShutdown); void postScanSources(); @@ -236,6 +217,7 @@ private: void performReset(); void performScanSources(); void performSetSurface(const sp<NativeWindowWrapper> &wrapper); + void performResumeDecoders(); void onSourceNotify(const sp<AMessage> &msg); void onClosedCaptionNotify(const sp<AMessage> &msg); |