зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1322799 part 12 - remove AccurateSeekTask; r=jwwang
MozReview-Commit-ID: I4CvCSHpTBN --HG-- extra : rebase_source : 7c30f38bd50b372d80174e75c57f0d52619e53b3
This commit is contained in:
Родитель
6c5c0bdd5f
Коммит
527aa62402
|
@ -1,103 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim:set ts=2 sw=2 sts=2 et cindent: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "AccurateSeekTask.h"
|
||||
#include "MediaDecoderReaderWrapper.h"
|
||||
#include "mozilla/AbstractThread.h"
|
||||
#include "mozilla/Assertions.h"
|
||||
#include "nsPrintfCString.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
extern LazyLogModule gMediaDecoderLog;
|
||||
extern LazyLogModule gMediaSampleLog;
|
||||
|
||||
// avoid redefined macro in unified build
|
||||
#undef FMT
|
||||
#undef DECODER_LOG
|
||||
#undef SAMPLE_LOG
|
||||
#undef DECODER_WARN
|
||||
|
||||
#define FMT(x, ...) "[AccurateSeekTask] Decoder=%p " x, mDecoderID, ##__VA_ARGS__
|
||||
#define DECODER_LOG(...) MOZ_LOG(gMediaDecoderLog, LogLevel::Debug, (FMT(__VA_ARGS__)))
|
||||
#define SAMPLE_LOG(...) MOZ_LOG(gMediaSampleLog, LogLevel::Debug, (FMT(__VA_ARGS__)))
|
||||
#define DECODER_WARN(...) NS_WARNING(nsPrintfCString(FMT(__VA_ARGS__)).get())
|
||||
|
||||
AccurateSeekTask::AccurateSeekTask(const void* aDecoderID,
|
||||
AbstractThread* aThread,
|
||||
MediaDecoderReaderWrapper* aReader,
|
||||
const SeekTarget& aTarget,
|
||||
const MediaInfo& aInfo,
|
||||
const media::TimeUnit& aEnd,
|
||||
int64_t aCurrentMediaTime)
|
||||
: SeekTask(aDecoderID, aThread, aReader, aTarget)
|
||||
{
|
||||
AssertOwnerThread();
|
||||
}
|
||||
|
||||
AccurateSeekTask::~AccurateSeekTask()
|
||||
{
|
||||
AssertOwnerThread();
|
||||
MOZ_ASSERT(mIsDiscarded);
|
||||
}
|
||||
|
||||
void
|
||||
AccurateSeekTask::Discard()
|
||||
{
|
||||
AssertOwnerThread();
|
||||
|
||||
// Disconnect MDSM.
|
||||
RejectIfExist(NS_ERROR_DOM_MEDIA_CANCELED, __func__);
|
||||
|
||||
mIsDiscarded = true;
|
||||
}
|
||||
|
||||
int64_t
|
||||
AccurateSeekTask::CalculateNewCurrentTime() const
|
||||
{
|
||||
AssertOwnerThread();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
AccurateSeekTask::HandleAudioDecoded(MediaData* aAudio)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
AccurateSeekTask::HandleVideoDecoded(MediaData* aVideo, TimeStamp aDecodeStart)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
AccurateSeekTask::HandleNotDecoded(MediaData::Type aType, const MediaResult& aError)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
AccurateSeekTask::HandleAudioWaited(MediaData::Type aType)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
AccurateSeekTask::HandleVideoWaited(MediaData::Type aType)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
AccurateSeekTask::HandleNotWaited(const WaitForDataRejectValue& aRejection)
|
||||
{
|
||||
}
|
||||
|
||||
RefPtr<AccurateSeekTask::SeekTaskPromise>
|
||||
AccurateSeekTask::Seek(const media::TimeUnit& aDuration)
|
||||
{
|
||||
AssertOwnerThread();
|
||||
|
||||
return mSeekTaskPromise.Ensure(__func__);
|
||||
}
|
||||
|
||||
} // namespace mozilla
|
|
@ -1,49 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#ifndef ACCURATE_SEEK_TASK_H
|
||||
#define ACCURATE_SEEK_TASK_H
|
||||
|
||||
#include "SeekTask.h"
|
||||
#include "MediaDecoderReader.h"
|
||||
#include "SeekJob.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
class AccurateSeekTask final : public SeekTask {
|
||||
public:
|
||||
AccurateSeekTask(const void* aDecoderID,
|
||||
AbstractThread* aThread,
|
||||
MediaDecoderReaderWrapper* aReader,
|
||||
const SeekTarget& aTarget,
|
||||
const MediaInfo& aInfo,
|
||||
const media::TimeUnit& aEnd,
|
||||
int64_t aCurrentMediaTime);
|
||||
|
||||
void Discard() override;
|
||||
|
||||
RefPtr<SeekTaskPromise> Seek(const media::TimeUnit& aDuration) override;
|
||||
|
||||
int64_t CalculateNewCurrentTime() const override;
|
||||
|
||||
void HandleAudioDecoded(MediaData* aAudio) override;
|
||||
|
||||
void HandleVideoDecoded(MediaData* aVideo, TimeStamp aDecodeStart) override;
|
||||
|
||||
void HandleNotDecoded(MediaData::Type aType, const MediaResult& aError) override;
|
||||
|
||||
void HandleAudioWaited(MediaData::Type aType) override;
|
||||
|
||||
void HandleVideoWaited(MediaData::Type aType) override;
|
||||
|
||||
void HandleNotWaited(const WaitForDataRejectValue& aRejection) override;
|
||||
|
||||
~AccurateSeekTask();
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif /* ACCURATE_SEEK_TASK_H */
|
|
@ -37,7 +37,6 @@
|
|||
#include "nsDeque.h"
|
||||
#include "prenv.h"
|
||||
|
||||
#include "AccurateSeekTask.h"
|
||||
#include "AudioSegment.h"
|
||||
#include "DOMMediaStream.h"
|
||||
#include "ImageContainer.h"
|
||||
|
@ -1331,10 +1330,6 @@ private:
|
|||
RefPtr<MediaData> mSeekedVideoData;
|
||||
bool mIsAudioQueueFinished = false;
|
||||
bool mIsVideoQueueFinished = false;
|
||||
|
||||
// For refactoring only, will be removed later.
|
||||
RefPtr<AccurateSeekTask> mTask;
|
||||
|
||||
};
|
||||
|
||||
class MediaDecoderStateMachine::NextFrameSeekingState
|
||||
|
|
|
@ -77,7 +77,6 @@ XPIDL_MODULE = 'dom_media'
|
|||
|
||||
EXPORTS += [
|
||||
'AbstractMediaDecoder.h',
|
||||
'AccurateSeekTask.h',
|
||||
'ADTSDecoder.h',
|
||||
'ADTSDemuxer.h',
|
||||
'AudioBufferUtils.h',
|
||||
|
@ -188,7 +187,6 @@ EXPORTS.mozilla.dom += [
|
|||
]
|
||||
|
||||
UNIFIED_SOURCES += [
|
||||
'AccurateSeekTask.cpp',
|
||||
'ADTSDecoder.cpp',
|
||||
'ADTSDemuxer.cpp',
|
||||
'AudioCaptureStream.cpp',
|
||||
|
|
Загрузка…
Ссылка в новой задаче