mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1144519 - Rename MDSM::OnDecodeThread to MDSM::OnDecodeTaskQueue. r=jya
This commit is contained in:
parent
79bed83dbd
commit
135ab8c259
@ -1578,7 +1578,7 @@ void MediaDecoder::SetPreservesPitch(bool aPreservesPitch)
|
||||
|
||||
bool MediaDecoder::OnDecodeThread() const {
|
||||
NS_WARN_IF_FALSE(mDecoderStateMachine, "mDecoderStateMachine is null");
|
||||
return mDecoderStateMachine ? mDecoderStateMachine->OnDecodeThread() : false;
|
||||
return mDecoderStateMachine ? mDecoderStateMachine->OnDecodeTaskQueue() : false;
|
||||
}
|
||||
|
||||
ReentrantMonitor& MediaDecoder::GetReentrantMonitor() {
|
||||
|
@ -1367,8 +1367,7 @@ private:
|
||||
|
||||
void MediaDecoderStateMachine::SetDuration(int64_t aDuration)
|
||||
{
|
||||
NS_ASSERTION(NS_IsMainThread() || OnDecodeThread(),
|
||||
"Should be on main or decode thread.");
|
||||
MOZ_ASSERT(NS_IsMainThread() || OnDecodeTaskQueue());
|
||||
AssertCurrentThreadInMonitor();
|
||||
|
||||
if (aDuration < 0) {
|
||||
@ -1420,7 +1419,7 @@ void MediaDecoderStateMachine::UpdateEstimatedDuration(int64_t aDuration)
|
||||
|
||||
void MediaDecoderStateMachine::SetMediaEndTime(int64_t aEndTime)
|
||||
{
|
||||
NS_ASSERTION(OnDecodeThread(), "Should be on decode thread");
|
||||
MOZ_ASSERT(OnDecodeTaskQueue());
|
||||
AssertCurrentThreadInMonitor();
|
||||
|
||||
mEndTime = aEndTime;
|
||||
@ -1723,7 +1722,7 @@ MediaDecoderStateMachine::EnqueueDecodeFirstFrameTask()
|
||||
void
|
||||
MediaDecoderStateMachine::SetReaderIdle()
|
||||
{
|
||||
MOZ_ASSERT(OnDecodeThread());
|
||||
MOZ_ASSERT(OnDecodeTaskQueue());
|
||||
DECODER_LOG("Invoking SetReaderIdle()");
|
||||
mReader->SetIdle();
|
||||
}
|
||||
@ -2469,7 +2468,7 @@ private:
|
||||
void
|
||||
MediaDecoderStateMachine::ShutdownReader()
|
||||
{
|
||||
MOZ_ASSERT(OnDecodeThread());
|
||||
MOZ_ASSERT(OnDecodeTaskQueue());
|
||||
mReader->Shutdown()->Then(TaskQueue(), __func__, this,
|
||||
&MediaDecoderStateMachine::FinishShutdown,
|
||||
&MediaDecoderStateMachine::FinishShutdown);
|
||||
@ -3320,7 +3319,7 @@ MediaDecoderStateMachine::ScheduleStateMachineIn(int64_t aMicroseconds)
|
||||
mDelayedScheduler.Ensure(target);
|
||||
}
|
||||
|
||||
bool MediaDecoderStateMachine::OnDecodeThread() const
|
||||
bool MediaDecoderStateMachine::OnDecodeTaskQueue() const
|
||||
{
|
||||
return !DecodeTaskQueue() || DecodeTaskQueue()->IsCurrentThreadIn();
|
||||
}
|
||||
@ -3392,7 +3391,7 @@ void MediaDecoderStateMachine::QueueMetadata(int64_t aPublishTime,
|
||||
nsAutoPtr<MediaInfo> aInfo,
|
||||
nsAutoPtr<MetadataTags> aTags)
|
||||
{
|
||||
NS_ASSERTION(OnDecodeThread(), "Should be on decode thread.");
|
||||
MOZ_ASSERT(OnDecodeTaskQueue());
|
||||
AssertCurrentThreadInMonitor();
|
||||
TimedMetadata* metadata = new TimedMetadata;
|
||||
metadata->mPublishTime = aPublishTime;
|
||||
|
@ -202,7 +202,7 @@ public:
|
||||
|
||||
// Functions used by assertions to ensure we're calling things
|
||||
// on the appropriate threads.
|
||||
bool OnDecodeThread() const;
|
||||
bool OnDecodeTaskQueue() const;
|
||||
bool OnTaskQueue() const;
|
||||
|
||||
MediaDecoderOwner::NextFrameStatus GetNextFrameStatus();
|
||||
|
Loading…
Reference in New Issue
Block a user