summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/NuPlayer.h
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2014-11-21 02:48:45 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-21 02:48:45 +0000
commit93535715c6d2cac06d5dc6f8e3d8f15a19c21e60 (patch)
tree34a2e30a7f07f8b7a3b106af24cf63c80aa77ca5 /media/libmediaplayerservice/nuplayer/NuPlayer.h
parentde63283cc926b6b3dea563445a5e0a851bc92d45 (diff)
parente9e6a9306c42e0902d31f32dffc75135ff9dca49 (diff)
downloadframeworks_av-93535715c6d2cac06d5dc6f8e3d8f15a19c21e60.zip
frameworks_av-93535715c6d2cac06d5dc6f8e3d8f15a19c21e60.tar.gz
frameworks_av-93535715c6d2cac06d5dc6f8e3d8f15a19c21e60.tar.bz2
am e9e6a930: am 3a8d7d10: Merge "tunnel NuPlayer source and decoder input" into lmp-mr1-dev
* commit 'e9e6a9306c42e0902d31f32dffc75135ff9dca49': tunnel NuPlayer source and decoder input
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayer.h')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.h32
1 files changed, 7 insertions, 25 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.h b/media/libmediaplayerservice/nuplayer/NuPlayer.h
index 524f197..0fd64ad 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);