mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-14 14:02:47 +00:00
Backed out changeset ed6f3ec5a71b (bug 1050667)
This commit is contained in:
parent
c711249807
commit
b8f2fead4f
@ -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;
|
||||
}
|
||||
|
@ -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<android::MediaExtractor> 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<T>.
|
||||
|
Loading…
x
Reference in New Issue
Block a user