From bfebe64691e8e346bd7039b493c75b8f121b2bfe Mon Sep 17 00:00:00 2001 From: JW Wang Date: Wed, 19 Jul 2017 14:49:08 +0800 Subject: [PATCH] Bug 1316211. P7 - remove mAudioQueue and mVideoQueue for we never push data into the queues. r=gerald MozReview-Commit-ID: AL5JqUIAVXo --HG-- extra : rebase_source : daf75d0e9a6065769b88d09fa52132f561d5ee77 extra : source : c6901fa2f8c548648606ecc1750ef98a38b8d6ad --- dom/media/MediaDecoderReader.cpp | 20 ++++---------------- dom/media/MediaDecoderReader.h | 11 ----------- 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/dom/media/MediaDecoderReader.cpp b/dom/media/MediaDecoderReader.cpp index 5d822029cc94..44af69019a6c 100644 --- a/dom/media/MediaDecoderReader.cpp +++ b/dom/media/MediaDecoderReader.cpp @@ -96,26 +96,22 @@ MediaDecoderReader::~MediaDecoderReader() size_t MediaDecoderReader::SizeOfVideoQueueInBytes() const { - VideoQueueMemoryFunctor functor; - mVideoQueue.LockedForEach(functor); - return functor.mSize; + return 0; } size_t MediaDecoderReader::SizeOfAudioQueueInBytes() const { - AudioQueueMemoryFunctor functor; - mAudioQueue.LockedForEach(functor); - return functor.mSize; + return 0; } size_t MediaDecoderReader::SizeOfVideoQueueInFrames() { - return mVideoQueue.GetSize(); + return 0; } size_t MediaDecoderReader::SizeOfAudioQueueInFrames() { - return mAudioQueue.GetSize(); + return 0; } void @@ -128,14 +124,6 @@ MediaDecoderReader::UpdateDuration(const media::TimeUnit& aDuration) nsresult MediaDecoderReader::ResetDecode(TrackSet aTracks) { - if (aTracks.contains(TrackInfo::kVideoTrack)) { - VideoQueue().Reset(); - } - - if (aTracks.contains(TrackInfo::kAudioTrack)) { - AudioQueue().Reset(); - } - return NS_OK; } diff --git a/dom/media/MediaDecoderReader.h b/dom/media/MediaDecoderReader.h index 2906e91a40e3..525f8a9f46df 100644 --- a/dom/media/MediaDecoderReader.h +++ b/dom/media/MediaDecoderReader.h @@ -210,9 +210,6 @@ public: // mBuffered should be recalculated and updated accordingly. virtual void NotifyDataArrived() = 0; - virtual MediaQueue& AudioQueue() { return mAudioQueue; } - virtual MediaQueue& VideoQueue() { return mVideoQueue; } - AbstractCanonical* CanonicalBuffered() { return &mBuffered; @@ -283,14 +280,6 @@ protected: // Recomputes mBuffered. virtual void UpdateBuffered() = 0; - // Queue of audio frames. This queue is threadsafe, and is accessed from - // the audio, decoder, state machine, and main threads. - MediaQueue mAudioQueue; - - // Queue of video frames. This queue is threadsafe, and is accessed from - // the decoder, state machine, and main threads. - MediaQueue mVideoQueue; - // Reference to the owning decoder object. AbstractMediaDecoder* mDecoder;