Bug 1323931. Part 1 - remove unnecessary comments and logs. r?kaku
They are already in MDSM::On{Audio,Video}Decoded, OnNotDecoded.
MozReview-Commit-ID: COivpHEaYdp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -866,21 +866,16 @@ public:
void HandleAudioDecoded(MediaData* aAudio) override
{
MOZ_ASSERT(!mDoneAudioSeeking || !mDoneVideoSeeking, "Seek shouldn't be finished");
RefPtr<MediaData> audio(aAudio);
MOZ_ASSERT(audio);
- // The MDSM::mDecodedAudioEndTime will be updated once the whole SeekTask is
- // resolved.
-
- SSAMPLELOG("HandleAudioDecoded [%lld,%lld]", audio->mTime, audio->GetEndTime());
-
// Video-only seek doesn't reset audio decoder. There might be pending audio
// requests when AccurateSeekTask::Seek() begins. We will just store the data
// without checking |mDiscontinuity| or calling DropAudioUpToSeekTarget().
if (mSeekJob.mTarget.IsVideoOnly()) {
mSeekedAudioData = audio.forget();
return;
}
@@ -907,21 +902,16 @@ public:
void HandleVideoDecoded(MediaData* aVideo, TimeStamp aDecodeStart) override
{
MOZ_ASSERT(!mDoneAudioSeeking || !mDoneVideoSeeking, "Seek shouldn't be finished");
RefPtr<MediaData> video(aVideo);
MOZ_ASSERT(video);
- // The MDSM::mDecodedVideoEndTime will be updated once the whole SeekTask is
- // resolved.
-
- SSAMPLELOG("HandleVideoDecoded [%lld,%lld]", video->mTime, video->GetEndTime());
-
AdjustFastSeekIfNeeded(video);
if (mSeekJob.mTarget.IsFast()) {
// Non-precise seek. We can stop the seek at the first sample.
mSeekedVideoData = video;
mDoneVideoSeeking = true;
} else {
nsresult rv = DropVideoUpToSeekTarget(video.get());
@@ -937,18 +927,16 @@ public:
}
MaybeFinishSeek();
}
void HandleNotDecoded(MediaData::Type aType, const MediaResult& aError) override
{
MOZ_ASSERT(!mDoneAudioSeeking || !mDoneVideoSeeking, "Seek shouldn't be finished");
- SSAMPLELOG("OnNotDecoded type=%d reason=%u", aType, aError.Code());
-
// Ignore pending requests from video-only seek.
if (aType == MediaData::AUDIO_DATA && mSeekJob.mTarget.IsVideoOnly()) {
return;
}
// If the decoder is waiting for data, we tell it to call us back when the
// data arrives.
if (aError == NS_ERROR_DOM_MEDIA_WAITING_FOR_DATA) {