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
This commit is contained in:
JW Wang 2017-07-19 14:49:08 +08:00
Родитель 7383189ffa
Коммит bfebe64691
2 изменённых файлов: 4 добавлений и 27 удалений

Просмотреть файл

@ -96,26 +96,22 @@ MediaDecoderReader::~MediaDecoderReader()
size_t MediaDecoderReader::SizeOfVideoQueueInBytes() const size_t MediaDecoderReader::SizeOfVideoQueueInBytes() const
{ {
VideoQueueMemoryFunctor functor; return 0;
mVideoQueue.LockedForEach(functor);
return functor.mSize;
} }
size_t MediaDecoderReader::SizeOfAudioQueueInBytes() const size_t MediaDecoderReader::SizeOfAudioQueueInBytes() const
{ {
AudioQueueMemoryFunctor functor; return 0;
mAudioQueue.LockedForEach(functor);
return functor.mSize;
} }
size_t MediaDecoderReader::SizeOfVideoQueueInFrames() size_t MediaDecoderReader::SizeOfVideoQueueInFrames()
{ {
return mVideoQueue.GetSize(); return 0;
} }
size_t MediaDecoderReader::SizeOfAudioQueueInFrames() size_t MediaDecoderReader::SizeOfAudioQueueInFrames()
{ {
return mAudioQueue.GetSize(); return 0;
} }
void void
@ -128,14 +124,6 @@ MediaDecoderReader::UpdateDuration(const media::TimeUnit& aDuration)
nsresult MediaDecoderReader::ResetDecode(TrackSet aTracks) nsresult MediaDecoderReader::ResetDecode(TrackSet aTracks)
{ {
if (aTracks.contains(TrackInfo::kVideoTrack)) {
VideoQueue().Reset();
}
if (aTracks.contains(TrackInfo::kAudioTrack)) {
AudioQueue().Reset();
}
return NS_OK; return NS_OK;
} }

Просмотреть файл

@ -210,9 +210,6 @@ public:
// mBuffered should be recalculated and updated accordingly. // mBuffered should be recalculated and updated accordingly.
virtual void NotifyDataArrived() = 0; virtual void NotifyDataArrived() = 0;
virtual MediaQueue<AudioData>& AudioQueue() { return mAudioQueue; }
virtual MediaQueue<VideoData>& VideoQueue() { return mVideoQueue; }
AbstractCanonical<media::TimeIntervals>* CanonicalBuffered() AbstractCanonical<media::TimeIntervals>* CanonicalBuffered()
{ {
return &mBuffered; return &mBuffered;
@ -283,14 +280,6 @@ protected:
// Recomputes mBuffered. // Recomputes mBuffered.
virtual void UpdateBuffered() = 0; 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<AudioData> mAudioQueue;
// Queue of video frames. This queue is threadsafe, and is accessed from
// the decoder, state machine, and main threads.
MediaQueue<VideoData> mVideoQueue;
// Reference to the owning decoder object. // Reference to the owning decoder object.
AbstractMediaDecoder* mDecoder; AbstractMediaDecoder* mDecoder;