From 59221a6965baed2e6fe60430b51c9ebdd0f46a36 Mon Sep 17 00:00:00 2001 From: Randy Lin Date: Thu, 19 Dec 2013 18:13:05 +0800 Subject: [PATCH] Bug 952020 - Remove the MediaEncoder::OnEncoderThread(). r=roc --- content/media/encoder/MediaEncoder.cpp | 11 +---------- content/media/encoder/MediaEncoder.h | 4 ---- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/content/media/encoder/MediaEncoder.cpp b/content/media/encoder/MediaEncoder.cpp index 60931f34521..a04c992cfde 100644 --- a/content/media/encoder/MediaEncoder.cpp +++ b/content/media/encoder/MediaEncoder.cpp @@ -37,8 +37,6 @@ PRLogModuleInfo* gMediaEncoderLog; namespace mozilla { -static nsIThread* sEncoderThread = nullptr; - void MediaEncoder::NotifyQueuedTrackChanges(MediaStreamGraph* aGraph, TrackID aID, @@ -75,11 +73,6 @@ MediaEncoder::NotifyRemoved(MediaStreamGraph* aGraph) } -bool -MediaEncoder::OnEncoderThread() -{ - return NS_GetCurrentThread() == sEncoderThread; -} /* static */ already_AddRefed MediaEncoder::CreateEncoder(const nsAString& aMIMEType, uint8_t aTrackTypes) @@ -179,9 +172,7 @@ MediaEncoder::GetEncodedData(nsTArray >* aOutputBufs, nsAString& aMIMEType) { MOZ_ASSERT(!NS_IsMainThread()); - if (!sEncoderThread) { - sEncoderThread = NS_GetCurrentThread(); - } + aMIMEType = mMIMEType; bool reloop = true; diff --git a/content/media/encoder/MediaEncoder.h b/content/media/encoder/MediaEncoder.h index e82dc6e6d6f..933363b643e 100644 --- a/content/media/encoder/MediaEncoder.h +++ b/content/media/encoder/MediaEncoder.h @@ -94,10 +94,6 @@ public : */ static already_AddRefed CreateEncoder(const nsAString& aMIMEType, uint8_t aTrackTypes = ContainerWriter::HAS_AUDIO); - /** - * Check if run on Encoder thread - */ - static bool OnEncoderThread(); /** * Encodes the raw track data and returns the final container data. Assuming * it is called on a single worker thread. The buffer of container data is