Bug 1206607 - Remove some dead code from MDSM. r=kinetik.

This commit is contained in:
JW Wang 2015-09-22 13:55:55 +08:00
Родитель f62a2c90cc
Коммит 4395bf4e9d
2 изменённых файлов: 0 добавлений и 33 удалений

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

@ -206,7 +206,6 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
mIsAudioPrerolling(false),
mIsVideoPrerolling(false),
mAudioCaptured(false),
mPositionChangeQueued(false),
mAudioCompleted(false, "MediaDecoderStateMachine::mAudioCompleted"),
mNotifyMetadataBeforeFirstFrame(false),
mDispatchedEventToDecode(false),
@ -1155,14 +1154,6 @@ void MediaDecoderStateMachine::UpdatePlaybackPosition(int64_t aTime)
}
}
void MediaDecoderStateMachine::ClearPositionChangeFlag()
{
NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
AssertCurrentThreadInMonitor();
mPositionChangeQueued = false;
}
static const char* const gMachineStateStr[] = {
"NONE",
"DECODING_METADATA",
@ -2896,14 +2887,6 @@ void MediaDecoderStateMachine::StartBuffering()
stats.mDownloadRate/1024, stats.mDownloadRateReliable ? "" : " (unreliable)");
}
void MediaDecoderStateMachine::ScheduleStateMachineWithLockAndWakeDecoder()
{
MOZ_ASSERT(OnTaskQueue());
ReentrantMonitorAutoEnter mon(mDecoder->GetReentrantMonitor());
DispatchAudioDecodeTaskIfNeeded();
DispatchVideoDecodeTaskIfNeeded();
}
void
MediaDecoderStateMachine::ScheduleStateMachine()
{

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

@ -265,11 +265,6 @@ private:
void FinishShutdown();
// Clear the flag indicating that a playback position change event
// is currently queued. This is called from the main thread and must
// be called with the decode monitor held.
void ClearPositionChangeFlag();
// Update the playback position. This can result in a timeupdate event
// and an invalidate of the frame being dispatched asynchronously if
// there is no such event currently queued.
@ -322,10 +317,6 @@ private:
// Returns the state machine task queue.
TaskQueue* OwnerThread() const { return mTaskQueue; }
// Calls ScheduleStateMachine() after taking the decoder lock. Also
// notifies the decoder thread in case it's waiting on the decoder lock.
void ScheduleStateMachineWithLockAndWakeDecoder();
// Schedules the shared state machine thread to run the state machine.
//
// The first variant coalesces multiple calls into a single state machine
@ -1147,13 +1138,6 @@ private:
// it has stopped.
bool mAudioCaptured;
// True if an event to notify about a change in the playback
// position has been queued, but not yet run. It is set to false when
// the event is run. This allows coalescing of these events as they can be
// produced many times per second. Synchronised via decoder monitor.
// Accessed on main and state machine threads.
bool mPositionChangeQueued;
// True if the audio playback thread has finished. It is finished
// when either all the audio frames have completed playing, or we've moved
// into shutdown state, and the threads are to be