зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1282658. Part 17 - rename and remove some functions. r=kaku
MozReview-Commit-ID: 1v8WOlz2671 --HG-- extra : rebase_source : 1c80cc7afc0e6e5fec16904d7ca2b6d5b32a6666
This commit is contained in:
Родитель
638885d3b8
Коммит
2a6206aecc
|
@ -104,7 +104,7 @@ AccurateSeekTask::Seek(const media::TimeUnit& aDuration)
|
|||
}
|
||||
|
||||
void
|
||||
AccurateSeekTask::EnsureAudioDecodeTaskQueued()
|
||||
AccurateSeekTask::RequestAudioData()
|
||||
{
|
||||
AssertOwnerThread();
|
||||
MOZ_ASSERT(!mDoneAudioSeeking);
|
||||
|
@ -114,7 +114,7 @@ AccurateSeekTask::EnsureAudioDecodeTaskQueued()
|
|||
}
|
||||
|
||||
void
|
||||
AccurateSeekTask::EnsureVideoDecodeTaskQueued()
|
||||
AccurateSeekTask::RequestVideoData()
|
||||
{
|
||||
AssertOwnerThread();
|
||||
MOZ_ASSERT(!mDoneVideoSeeking);
|
||||
|
@ -123,34 +123,6 @@ AccurateSeekTask::EnsureVideoDecodeTaskQueued()
|
|||
mReader->RequestVideoData(false, media::TimeUnit());
|
||||
}
|
||||
|
||||
const char*
|
||||
AccurateSeekTask::AudioRequestStatus()
|
||||
{
|
||||
AssertOwnerThread();
|
||||
|
||||
if (mReader->IsRequestingAudioData()) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mReader->IsWaitingAudioData());
|
||||
return "pending";
|
||||
} else if (mReader->IsWaitingAudioData()) {
|
||||
return "waiting";
|
||||
}
|
||||
return "idle";
|
||||
}
|
||||
|
||||
const char*
|
||||
AccurateSeekTask::VideoRequestStatus()
|
||||
{
|
||||
AssertOwnerThread();
|
||||
|
||||
if (mReader->IsRequestingVideoData()) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(!mReader->IsWaitingVideoData());
|
||||
return "pending";
|
||||
} else if (mReader->IsWaitingVideoData()) {
|
||||
return "waiting";
|
||||
}
|
||||
return "idle";
|
||||
}
|
||||
|
||||
nsresult
|
||||
AccurateSeekTask::DropAudioUpToSeekTarget(MediaData* aSample)
|
||||
{
|
||||
|
@ -288,10 +260,10 @@ AccurateSeekTask::OnSeekResolved(media::TimeUnit)
|
|||
// We must decode the first samples of active streams, so we can determine
|
||||
// the new stream time. So dispatch tasks to do that.
|
||||
if (!mDoneVideoSeeking) {
|
||||
EnsureVideoDecodeTaskQueued();
|
||||
RequestVideoData();
|
||||
}
|
||||
if (!mDoneAudioSeeking) {
|
||||
EnsureAudioDecodeTaskQueued();
|
||||
RequestAudioData();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -354,7 +326,7 @@ AccurateSeekTask::OnAudioDecoded(MediaData* aAudioSample)
|
|||
}
|
||||
|
||||
if (!mDoneAudioSeeking) {
|
||||
EnsureAudioDecodeTaskQueued();
|
||||
RequestAudioData();
|
||||
return;
|
||||
}
|
||||
MaybeFinishSeek();
|
||||
|
@ -384,9 +356,9 @@ AccurateSeekTask::OnNotDecoded(MediaData::Type aType,
|
|||
|
||||
if (aReason == MediaDecoderReader::CANCELED) {
|
||||
if (aType == MediaData::AUDIO_DATA) {
|
||||
EnsureAudioDecodeTaskQueued();
|
||||
RequestAudioData();
|
||||
} else {
|
||||
EnsureVideoDecodeTaskQueued();
|
||||
RequestVideoData();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -440,7 +412,7 @@ AccurateSeekTask::OnVideoDecoded(MediaData* aVideoSample)
|
|||
}
|
||||
|
||||
if (!mDoneVideoSeeking) {
|
||||
EnsureVideoDecodeTaskQueued();
|
||||
RequestVideoData();
|
||||
return;
|
||||
}
|
||||
MaybeFinishSeek();
|
||||
|
@ -475,14 +447,14 @@ AccurateSeekTask::SetCallbacks()
|
|||
mAudioWaitCallback = mReader->AudioWaitCallback().Connect(
|
||||
OwnerThread(), [this] (WaitCallbackData aData) {
|
||||
if (aData.is<MediaData::Type>()) {
|
||||
EnsureAudioDecodeTaskQueued();
|
||||
RequestAudioData();
|
||||
}
|
||||
});
|
||||
|
||||
mVideoWaitCallback = mReader->VideoWaitCallback().Connect(
|
||||
OwnerThread(), [this] (WaitCallbackData aData) {
|
||||
if (aData.is<MediaData::Type>()) {
|
||||
EnsureVideoDecodeTaskQueued();
|
||||
RequestVideoData();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -33,13 +33,9 @@ public:
|
|||
private:
|
||||
~AccurateSeekTask();
|
||||
|
||||
void EnsureVideoDecodeTaskQueued();
|
||||
void RequestVideoData();
|
||||
|
||||
void EnsureAudioDecodeTaskQueued();
|
||||
|
||||
const char* AudioRequestStatus();
|
||||
|
||||
const char* VideoRequestStatus();
|
||||
void RequestAudioData();
|
||||
|
||||
nsresult DropAudioUpToSeekTarget(MediaData* aSample);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче