From c287cad65bd0c7a79e43f4decc5e04593027a7c8 Mon Sep 17 00:00:00 2001 From: Chong Zhang Date: Thu, 19 Feb 2015 18:30:30 -0800 Subject: nuplayer: remove prefill cache code it's only needed if we post Reset to GenericSource's looper, but we now do reset outside NuPlayer or GenericSource's looper. also don't allow buffering percentage to go backward unless there's seek or pause. Change-Id: I1a39df4bc0a685f76d8558c368db1bac92b490c2 --- media/libmediaplayerservice/nuplayer/GenericSource.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'media/libmediaplayerservice/nuplayer/GenericSource.h') diff --git a/media/libmediaplayerservice/nuplayer/GenericSource.h b/media/libmediaplayerservice/nuplayer/GenericSource.h index 385d73a..5fc41ec 100644 --- a/media/libmediaplayerservice/nuplayer/GenericSource.h +++ b/media/libmediaplayerservice/nuplayer/GenericSource.h @@ -139,14 +139,13 @@ private: sp mDecryptHandle; bool mStarted; bool mStopRead; - String8 mContentType; - AString mSniffedMIME; - off64_t mMetaDataSize; int64_t mBitrate; int32_t mPollBufferingGeneration; uint32_t mPendingReadBufferTypes; bool mBuffering; bool mPrepareBuffering; + int32_t mPrevBufferPercentage; + mutable Mutex mReadBufferLock; sp mLooper; @@ -158,8 +157,6 @@ private: int64_t getLastReadPosition(); void setDrmPlaybackStatusIfNeeded(int playbackStatus, int64_t position); - status_t prefillCacheIfNecessary(); - void notifyPreparedAndCleanup(status_t err); void onGetFormatMeta(sp msg) const; @@ -200,7 +197,7 @@ private: void cancelPollBuffering(); void restartPollBuffering(); void onPollBuffering(); - void notifyBufferingUpdate(int percentage); + void notifyBufferingUpdate(int32_t percentage); void startBufferingIfNecessary(); void stopBufferingIfNecessary(); void sendCacheStats(); -- cgit v1.1