зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1328547. part 1 - Move MDSM::Dispatch{Audio,Video}DecodeTaskIfNeeded into DecodingState. r=kaku
MozReview-Commit-ID: I2gT77VHutm --HG-- extra : rebase_source : 39daa2eb03b780cd44e8e461d90ea38c5f163394
This commit is contained in:
Родитель
4fbabbbacb
Коммит
7bbc498596
|
@ -1998,11 +1998,15 @@ DecodingState::Enter()
|
|||
|
||||
mOnAudioPopped = AudioQueue().PopEvent().Connect(
|
||||
OwnerThread(), [this] () {
|
||||
mMaster->DispatchAudioDecodeTaskIfNeeded();
|
||||
if (!mMaster->IsShutdown() && mMaster->NeedToDecodeAudio()) {
|
||||
mMaster->EnsureAudioDecodeTaskQueued();
|
||||
}
|
||||
});
|
||||
mOnVideoPopped = VideoQueue().PopEvent().Connect(
|
||||
OwnerThread(), [this] () {
|
||||
mMaster->DispatchVideoDecodeTaskIfNeeded();
|
||||
if (!mMaster->IsShutdown() && mMaster->NeedToDecodeVideo()) {
|
||||
mMaster->EnsureVideoDecodeTaskQueued();
|
||||
}
|
||||
});
|
||||
|
||||
mMaster->UpdateNextFrameStatus(MediaDecoderOwner::NEXT_FRAME_AVAILABLE);
|
||||
|
@ -3008,15 +3012,6 @@ MediaDecoderStateMachine::DispatchDecodeTasksIfNeeded()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
MediaDecoderStateMachine::DispatchAudioDecodeTaskIfNeeded()
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
if (!IsShutdown() && NeedToDecodeAudio()) {
|
||||
EnsureAudioDecodeTaskQueued();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MediaDecoderStateMachine::EnsureAudioDecodeTaskQueued()
|
||||
{
|
||||
|
@ -3070,15 +3065,6 @@ MediaDecoderStateMachine::RequestAudioData()
|
|||
);
|
||||
}
|
||||
|
||||
void
|
||||
MediaDecoderStateMachine::DispatchVideoDecodeTaskIfNeeded()
|
||||
{
|
||||
MOZ_ASSERT(OnTaskQueue());
|
||||
if (!IsShutdown() && NeedToDecodeVideo()) {
|
||||
EnsureVideoDecodeTaskQueued();
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
MediaDecoderStateMachine::EnsureVideoDecodeTaskQueued()
|
||||
{
|
||||
|
|
|
@ -448,9 +448,6 @@ protected:
|
|||
|
||||
void EnqueueFirstFrameLoadedEvent();
|
||||
|
||||
void DispatchAudioDecodeTaskIfNeeded();
|
||||
void DispatchVideoDecodeTaskIfNeeded();
|
||||
|
||||
// Dispatch a task to decode audio if there is not.
|
||||
void EnsureAudioDecodeTaskQueued();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче