From b8f2fead4ff95ae9dc0ee6013cd468fd3b51ea5d Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Fri, 19 Sep 2014 13:21:30 +0200 Subject: [PATCH] Backed out changeset ed6f3ec5a71b (bug 1050667) --- content/media/omx/MediaCodecReader.cpp | 15 +-------------- content/media/omx/MediaCodecReader.h | 7 ------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/content/media/omx/MediaCodecReader.cpp b/content/media/omx/MediaCodecReader.cpp index 27352a116d85..35b6cf9582d8 100644 --- a/content/media/omx/MediaCodecReader.cpp +++ b/content/media/omx/MediaCodecReader.cpp @@ -285,7 +285,6 @@ MediaCodecReader::MediaCodecReader(AbstractMediaDecoder* aDecoder) , mParseDataFromCache(true) , mNextParserPosition(INT64_C(0)) , mParsedDataLength(INT64_C(0)) - , mIsWaitingResources(false) { mHandler = new MessageHandler(this); mVideoListener = new VideoResourceListener(this); @@ -305,14 +304,7 @@ MediaCodecReader::Init(MediaDecoderReader* aCloneDonor) bool MediaCodecReader::IsWaitingMediaResources() { - return mIsWaitingResources; -} - -void -MediaCodecReader::UpdateIsWaitingMediaResources() -{ - mIsWaitingResources = (mVideoTrack.mCodec != nullptr) && - (!mVideoTrack.mCodec->allocated()); + return mVideoTrack.mCodec != nullptr && !mVideoTrack.mCodec->allocated(); } bool @@ -669,11 +661,6 @@ MediaCodecReader::ReadMetadata(MediaInfo* aInfo, return NS_ERROR_FAILURE; } - // Bug 1050667, both MediaDecoderStateMachine and MediaCodecReader - // relies on IsWaitingMediaResources() function. And the waiting state will be - // changed by binder thread, so we store the waiting state in a cache value to - // make them in the same waiting state. - UpdateIsWaitingMediaResources(); if (IsWaitingMediaResources()) { return NS_OK; } diff --git a/content/media/omx/MediaCodecReader.h b/content/media/omx/MediaCodecReader.h index 79f1bc7f664d..48b14c2940b8 100644 --- a/content/media/omx/MediaCodecReader.h +++ b/content/media/omx/MediaCodecReader.h @@ -152,14 +152,7 @@ protected: virtual bool CreateExtractor(); - // Check the underlying HW resource is available and store the result in - // mIsWaitingResources. - void UpdateIsWaitingMediaResources(); - android::sp mExtractor; - // A cache value updated by UpdateIsWaitingMediaResources(), makes the - // "waiting resources state" is synchronous to StateMachine. - bool mIsWaitingResources; private: // An intermediary class that can be managed by android::sp.