Bug 1325004. Part 7 - remove Push(). r?kikuo
MozReview-Commit-ID: 7fNAGwKhKSN
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -2564,38 +2564,16 @@ MediaDecoderStateMachine::PushVideo(Medi
{
MOZ_ASSERT(OnTaskQueue());
MOZ_ASSERT(aSample);
aSample->As<VideoData>()->mFrameID = ++mCurrentFrameID;
VideoQueue().Push(aSample);
}
void
-MediaDecoderStateMachine::Push(MediaData* aSample)
-{
- MOZ_ASSERT(OnTaskQueue());
- MOZ_ASSERT(aSample);
-
- if (aSample->mType == MediaData::AUDIO_DATA) {
- // TODO: Send aSample to MSG and recalculate readystate before pushing,
- // otherwise AdvanceFrame may pop the sample before we have a chance
- // to reach playing.
- AudioQueue().Push(aSample);
- } else if (aSample->mType == MediaData::VIDEO_DATA) {
- // TODO: Send aSample to MSG and recalculate readystate before pushing,
- // otherwise AdvanceFrame may pop the sample before we have a chance
- // to reach playing.
- aSample->As<VideoData>()->mFrameID = ++mCurrentFrameID;
- VideoQueue().Push(aSample);
- }
-
- DispatchDecodeTasksIfNeeded();
-}
-
-void
MediaDecoderStateMachine::OnAudioPopped(const RefPtr<MediaData>& aSample)
{
MOZ_ASSERT(OnTaskQueue());
mPlaybackOffset = std::max(mPlaybackOffset.Ref(), aSample->mOffset);
DispatchAudioDecodeTaskIfNeeded();
}
--- a/dom/media/MediaDecoderStateMachine.h
+++ b/dom/media/MediaDecoderStateMachine.h
@@ -333,17 +333,16 @@ protected:
virtual ~MediaDecoderStateMachine();
void BufferedRangeUpdated();
void ReaderSuspendedChanged();
// Inserts MediaData* samples into their respective MediaQueues.
// aSample must not be null.
- void Push(MediaData* aSample);
void PushAudio(MediaData* aSample);
void PushVideo(MediaData* aSample);
void OnAudioPopped(const RefPtr<MediaData>& aSample);
void OnVideoPopped(const RefPtr<MediaData>& aSample);
void AudioAudibleChanged(bool aAudible);