Bug 952020 - Remove the MediaEncoder::OnEncoderThread(). r=roc

This commit is contained in:
Randy Lin 2013-12-19 18:13:05 +08:00
parent a997fae2e4
commit 59221a6965
2 changed files with 1 additions and 14 deletions

View File

@ -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>
MediaEncoder::CreateEncoder(const nsAString& aMIMEType, uint8_t aTrackTypes)
@ -179,9 +172,7 @@ MediaEncoder::GetEncodedData(nsTArray<nsTArray<uint8_t> >* aOutputBufs,
nsAString& aMIMEType)
{
MOZ_ASSERT(!NS_IsMainThread());
if (!sEncoderThread) {
sEncoderThread = NS_GetCurrentThread();
}
aMIMEType = mMIMEType;
bool reloop = true;

View File

@ -94,10 +94,6 @@ public :
*/
static already_AddRefed<MediaEncoder> 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