From 39d88e8d8b20fecb287da84554d5c5bcebde6a8f Mon Sep 17 00:00:00 2001 From: JW Wang Date: Wed, 19 Jul 2017 14:24:35 +0800 Subject: [PATCH] Bug 1316211. P5 - remove IsAsync() and its callers. r=gerald MozReview-Commit-ID: CT2gyEak2Qz --HG-- extra : rebase_source : 205bf82c8abe7da9026bff6daab7562a5981ea39 extra : source : a6a543c1d90133036caada487799cac064e2f3f3 --- dom/media/MediaDecoderReader.h | 6 ------ dom/media/MediaDecoderReaderWrapper.h | 1 - dom/media/MediaDecoderStateMachine.cpp | 5 ++--- dom/media/MediaFormatReader.h | 2 -- 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/dom/media/MediaDecoderReader.h b/dom/media/MediaDecoderReader.h index 71e890b61f7e..9df647ee9192 100644 --- a/dom/media/MediaDecoderReader.h +++ b/dom/media/MediaDecoderReader.h @@ -223,12 +223,6 @@ public: return mTaskQueue; } - // Returns true if the reader implements RequestAudioData() - // and RequestVideoData() asynchronously, rather than using the - // implementation in this class to adapt the old synchronous to - // the newer async model. - virtual bool IsAsync() const = 0; - // Returns true if this decoder reader uses hardware accelerated video // decoding. virtual bool VideoIsHardwareAccelerated() const = 0; diff --git a/dom/media/MediaDecoderReaderWrapper.h b/dom/media/MediaDecoderReaderWrapper.h index 5d85a196120a..a04af2a6c2ab 100644 --- a/dom/media/MediaDecoderReaderWrapper.h +++ b/dom/media/MediaDecoderReaderWrapper.h @@ -53,7 +53,6 @@ public: void ResetDecode(TrackSet aTracks); nsresult Init() { return mReader->Init(); } - bool IsAsync() const { return mReader->IsAsync(); } bool UseBufferingHeuristics() const { return mReader->UseBufferingHeuristics(); } bool VideoIsHardwareAccelerated() const { diff --git a/dom/media/MediaDecoderStateMachine.cpp b/dom/media/MediaDecoderStateMachine.cpp index b5b67c13bac2..c36c54fedf2a 100644 --- a/dom/media/MediaDecoderStateMachine.cpp +++ b/dom/media/MediaDecoderStateMachine.cpp @@ -2255,8 +2255,7 @@ DecodeMetadataState::OnMetadataRead(MetadataHolder&& aMetadata) } if (mMaster->HasVideo()) { - SLOG("Video decode isAsync=%d HWAccel=%d videoQueueSize=%d", - Reader()->IsAsync(), + SLOG("Video decode HWAccel=%d videoQueueSize=%d", Reader()->VideoIsHardwareAccelerated(), mMaster->GetAmpleVideoFrames()); } @@ -3918,7 +3917,7 @@ MediaDecoderStateMachine::SetAudioCaptured(bool aCaptured) uint32_t MediaDecoderStateMachine::GetAmpleVideoFrames() const { MOZ_ASSERT(OnTaskQueue()); - return (mReader->IsAsync() && mReader->VideoIsHardwareAccelerated()) + return mReader->VideoIsHardwareAccelerated() ? std::max(sVideoQueueHWAccelSize, MIN_VIDEO_QUEUE_SIZE) : std::max(sVideoQueueDefaultSize, MIN_VIDEO_QUEUE_SIZE); } diff --git a/dom/media/MediaFormatReader.h b/dom/media/MediaFormatReader.h index 26fc17fca31b..4a22d101fb73 100644 --- a/dom/media/MediaFormatReader.h +++ b/dom/media/MediaFormatReader.h @@ -59,8 +59,6 @@ public: RefPtr Shutdown() override; - bool IsAsync() const override { return true; } - bool VideoIsHardwareAccelerated() const override; bool IsWaitForDataSupported() const override { return true; }