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
Родитель ac665ca41c
Коммит 10835ff78b
2 изменённых файлов: 3 добавлений и 26 удалений

Просмотреть файл

@ -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

Просмотреть файл

@ -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;
};