Backed out changeset 18f274867bcc (bug 1195939) for Windows EME test failures.

CLOSED TREE
This commit is contained in:
Ryan VanderMeulen 2015-08-18 23:06:55 -04:00
parent 4ecd047304
commit 5154150b31
2 changed files with 3 additions and 26 deletions

View File

@ -33,7 +33,6 @@ VideoDecoder::VideoDecoder(GMPVideoHost *aHostAPI)
, mMutex(nullptr)
, mNumInputTasks(0)
, mSentExtraData(false)
, mIsFlushing(false)
, mHasShutdown(false)
{
// We drop the ref in DecodingComplete().
@ -141,11 +140,6 @@ VideoDecoder::DecodeTask(GMPVideoEncodedFrame* aInput)
AutoReleaseVideoFrame ensureFrameReleased(aInput);
HRESULT hr;
if (mIsFlushing) {
CK_LOGD("VideoDecoder::DecodeTask rejecting frame: flushing.");
return;
}
{
AutoLock lock(mMutex);
mNumInputTasks--;
@ -349,28 +343,15 @@ VideoDecoder::SampleToVideoFrame(IMFSample* aSample,
return S_OK;
}
void
VideoDecoder::ResetCompleteTask()
{
mIsFlushing = false;
if (mCallback) {
MaybeRunOnMainThread(WrapTask(mCallback,
&GMPVideoDecoderCallback::ResetComplete));
}
}
void
VideoDecoder::Reset()
{
mIsFlushing = true;
if (mDecoder) {
mDecoder->Reset();
}
// Schedule ResetComplete callback to run after existing frames have been
// flushed out of the task queue.
mWorkerThread->Post(WrapTaskRefCounted(this,
&VideoDecoder::ResetCompleteTask));
if (mCallback) {
mCallback->ResetComplete();
}
}
void

View File

@ -60,8 +60,6 @@ private:
void DecodeTask(GMPVideoEncodedFrame* aInputFrame);
void ResetCompleteTask();
void ReturnOutput(IMFSample* aSample,
int32_t aWidth,
int32_t aHeight,
@ -87,8 +85,6 @@ private:
int32_t mNumInputTasks;
bool mSentExtraData;
std::atomic<bool> mIsFlushing;
bool mHasShutdown;
};