mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1286454 part 1 - remove MediaData::mDiscontinuity; r=jwwang
This member is only assigned but never used now. MozReview-Commit-ID: IbuAbRaXzc4 --HG-- extra : rebase_source : 166bd3bc7478f725b64b5b2a0e8e258980674d06
This commit is contained in:
parent
03100d8735
commit
fcd9df9127
@ -292,8 +292,7 @@ AccurateSeekTask::OnAudioDecoded(MediaData* aAudioSample)
|
||||
// The MDSM::mDecodedAudioEndTime will be updated once the whole SeekTask is
|
||||
// resolved.
|
||||
|
||||
SAMPLE_LOG("OnAudioDecoded [%lld,%lld] disc=%d",
|
||||
audio->mTime, audio->GetEndTime(), audio->mDiscontinuity);
|
||||
SAMPLE_LOG("OnAudioDecoded [%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
|
||||
@ -303,11 +302,6 @@ AccurateSeekTask::OnAudioDecoded(MediaData* aAudioSample)
|
||||
return;
|
||||
}
|
||||
|
||||
if (mFirstAudioSample) {
|
||||
mFirstAudioSample = false;
|
||||
MOZ_ASSERT(audio->mDiscontinuity);
|
||||
}
|
||||
|
||||
AdjustFastSeekIfNeeded(audio);
|
||||
|
||||
if (mTarget.IsFast()) {
|
||||
@ -393,13 +387,7 @@ AccurateSeekTask::OnVideoDecoded(MediaData* aVideoSample)
|
||||
// The MDSM::mDecodedVideoEndTime will be updated once the whole SeekTask is
|
||||
// resolved.
|
||||
|
||||
SAMPLE_LOG("OnVideoDecoded [%lld,%lld] disc=%d",
|
||||
video->mTime, video->GetEndTime(), video->mDiscontinuity);
|
||||
|
||||
if (mFirstVideoSample) {
|
||||
mFirstVideoSample = false;
|
||||
MOZ_ASSERT(video->mDiscontinuity);
|
||||
}
|
||||
SAMPLE_LOG("OnVideoDecoded [%lld,%lld]", video->mTime, video->GetEndTime());
|
||||
|
||||
AdjustFastSeekIfNeeded(video);
|
||||
|
||||
|
@ -65,8 +65,6 @@ private:
|
||||
const uint32_t mAudioRate; // Audio sample rate.
|
||||
bool mDoneAudioSeeking;
|
||||
bool mDoneVideoSeeking;
|
||||
bool mFirstAudioSample = true;
|
||||
bool mFirstVideoSample = true;
|
||||
|
||||
// This temporarily stores the first frame we decode after we seek.
|
||||
// This is so that if we hit end of stream while we're decoding to reach
|
||||
|
@ -85,8 +85,6 @@ AudioData::TransferAndUpdateTimestampAndDuration(AudioData* aOther,
|
||||
Move(aOther->mAudioData),
|
||||
aOther->mChannels,
|
||||
aOther->mRate);
|
||||
v->mDiscontinuity = aOther->mDiscontinuity;
|
||||
|
||||
return v.forget();
|
||||
}
|
||||
|
||||
@ -173,7 +171,6 @@ VideoData::ShallowCopyUpdateDuration(const VideoData* aOther,
|
||||
aOther->mTimecode,
|
||||
aOther->mDisplay,
|
||||
aOther->mFrameID);
|
||||
v->mDiscontinuity = aOther->mDiscontinuity;
|
||||
v->mImage = aOther->mImage;
|
||||
return v.forget();
|
||||
}
|
||||
@ -191,7 +188,6 @@ VideoData::ShallowCopyUpdateTimestamp(const VideoData* aOther,
|
||||
aOther->mTimecode,
|
||||
aOther->mDisplay,
|
||||
aOther->mFrameID);
|
||||
v->mDiscontinuity = aOther->mDiscontinuity;
|
||||
v->mImage = aOther->mImage;
|
||||
return v.forget();
|
||||
}
|
||||
@ -210,7 +206,6 @@ VideoData::ShallowCopyUpdateTimestampAndDuration(const VideoData* aOther,
|
||||
aOther->mTimecode,
|
||||
aOther->mDisplay,
|
||||
aOther->mFrameID);
|
||||
v->mDiscontinuity = aOther->mDiscontinuity;
|
||||
v->mImage = aOther->mImage;
|
||||
return v.forget();
|
||||
}
|
||||
|
@ -289,7 +289,6 @@ public:
|
||||
, mDuration(aDuration)
|
||||
, mFrames(aFrames)
|
||||
, mKeyframe(false)
|
||||
, mDiscontinuity(false)
|
||||
{}
|
||||
|
||||
// Type of contained data.
|
||||
@ -313,10 +312,6 @@ public:
|
||||
|
||||
bool mKeyframe;
|
||||
|
||||
// True if this is the first sample after a gap or discontinuity in
|
||||
// the stream. This is true for the first sample in a stream after a seek.
|
||||
bool mDiscontinuity;
|
||||
|
||||
int64_t GetEndTime() const { return mTime + mDuration; }
|
||||
|
||||
bool AdjustForStartTime(int64_t aStartTime)
|
||||
@ -348,7 +343,6 @@ protected:
|
||||
, mDuration(0)
|
||||
, mFrames(aFrames)
|
||||
, mKeyframe(false)
|
||||
, mDiscontinuity(false)
|
||||
{}
|
||||
|
||||
virtual ~MediaData() {}
|
||||
|
@ -459,7 +459,6 @@ MediaDecoderReader::RequestVideoData(bool aSkipToNextKeyframe,
|
||||
if (VideoQueue().GetSize() > 0) {
|
||||
RefPtr<VideoData> v = VideoQueue().PopFront();
|
||||
if (v && mVideoDiscontinuity) {
|
||||
v->mDiscontinuity = true;
|
||||
mVideoDiscontinuity = false;
|
||||
}
|
||||
mBaseVideoPromise.Resolve(v, __func__);
|
||||
@ -495,7 +494,6 @@ MediaDecoderReader::RequestAudioData()
|
||||
if (AudioQueue().GetSize() > 0) {
|
||||
RefPtr<AudioData> a = AudioQueue().PopFront();
|
||||
if (mAudioDiscontinuity) {
|
||||
a->mDiscontinuity = true;
|
||||
mAudioDiscontinuity = false;
|
||||
}
|
||||
mBaseAudioPromise.Resolve(a, __func__);
|
||||
|
@ -573,8 +573,7 @@ MediaDecoderStateMachine::OnAudioDecoded(MediaData* aAudioSample)
|
||||
// audio->GetEndTime() is not always mono-increasing in chained ogg.
|
||||
mDecodedAudioEndTime = std::max(audio->GetEndTime(), mDecodedAudioEndTime);
|
||||
|
||||
SAMPLE_LOG("OnAudioDecoded [%lld,%lld] disc=%d",
|
||||
audio->mTime, audio->GetEndTime(), audio->mDiscontinuity);
|
||||
SAMPLE_LOG("OnAudioDecoded [%lld,%lld]", audio->mTime, audio->GetEndTime());
|
||||
|
||||
switch (mState) {
|
||||
case DECODER_STATE_BUFFERING: {
|
||||
@ -760,8 +759,7 @@ MediaDecoderStateMachine::OnVideoDecoded(MediaData* aVideoSample,
|
||||
// Handle abnormal or negative timestamps.
|
||||
mDecodedVideoEndTime = std::max(mDecodedVideoEndTime, video->GetEndTime());
|
||||
|
||||
SAMPLE_LOG("OnVideoDecoded [%lld,%lld] disc=%d",
|
||||
video->mTime, video->GetEndTime(), video->mDiscontinuity);
|
||||
SAMPLE_LOG("OnVideoDecoded [%lld,%lld]", video->mTime, video->GetEndTime());
|
||||
|
||||
switch (mState) {
|
||||
case DECODER_STATE_BUFFERING: {
|
||||
|
@ -1326,7 +1326,6 @@ MediaFormatReader::ReturnOutput(MediaData* aData, TrackType aTrack)
|
||||
if (decoder.mDiscontinuity) {
|
||||
LOGV("Setting discontinuity flag");
|
||||
decoder.mDiscontinuity = false;
|
||||
aData->mDiscontinuity = true;
|
||||
}
|
||||
|
||||
LOG("Resolved data promise for %s [%lld, %lld]", TrackTypeToStr(aTrack),
|
||||
|
@ -172,10 +172,9 @@ NextFrameSeekTask::OnAudioDecoded(MediaData* aAudioSample)
|
||||
// The MDSM::mDecodedAudioEndTime will be updated once the whole SeekTask is
|
||||
// resolved.
|
||||
|
||||
SAMPLE_LOG("OnAudioDecoded [%lld,%lld] disc=%d",
|
||||
SAMPLE_LOG("OnAudioDecoded [%lld,%lld]",
|
||||
aAudioSample->mTime,
|
||||
aAudioSample->GetEndTime(),
|
||||
aAudioSample->mDiscontinuity);
|
||||
aAudioSample->GetEndTime());
|
||||
|
||||
// We accept any audio data here.
|
||||
mSeekedAudioData = aAudioSample;
|
||||
@ -208,10 +207,9 @@ NextFrameSeekTask::OnVideoDecoded(MediaData* aVideoSample)
|
||||
// The MDSM::mDecodedVideoEndTime will be updated once the whole SeekTask is
|
||||
// resolved.
|
||||
|
||||
SAMPLE_LOG("OnVideoDecoded [%lld,%lld] disc=%d",
|
||||
SAMPLE_LOG("OnVideoDecoded [%lld,%lld]",
|
||||
aVideoSample->mTime,
|
||||
aVideoSample->GetEndTime(),
|
||||
aVideoSample->mDiscontinuity);
|
||||
aVideoSample->GetEndTime());
|
||||
|
||||
if (aVideoSample->mTime > mCurrentTime) {
|
||||
mSeekedVideoData = aVideoSample;
|
||||
|
Loading…
Reference in New Issue
Block a user