зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1371188 P1 - remove MFR::ShouldSkip()'s aSkipToNextKeyframe parameter; r=jya
MozReview-Commit-ID: 3w6QivBbjnl --HG-- extra : rebase_source : 8b5b65ee58e3b7a943e81e8d0ca5b6fb5b2dc5bd extra : source : 99e5165166bf7fe1cbfb883146700f57626c401e
This commit is contained in:
Родитель
62c25ef8e2
Коммит
2b13f6092f
|
@ -1539,14 +1539,15 @@ MediaFormatReader::GetDecoderData(TrackType aTrack)
|
|||
}
|
||||
|
||||
bool
|
||||
MediaFormatReader::ShouldSkip(bool aSkipToNextKeyframe,
|
||||
TimeUnit aTimeThreshold)
|
||||
MediaFormatReader::ShouldSkip(TimeUnit aTimeThreshold)
|
||||
{
|
||||
MOZ_ASSERT(HasVideo());
|
||||
TimeUnit nextKeyframe;
|
||||
nsresult rv = mVideo.mTrackDemuxer->GetNextRandomAccessPoint(&nextKeyframe);
|
||||
if (NS_FAILED(rv)) {
|
||||
return aSkipToNextKeyframe;
|
||||
// Only OggTrackDemuxer with video type gets into here.
|
||||
// We don't support skip-to-next-frame for this case.
|
||||
return false;
|
||||
}
|
||||
return (nextKeyframe < aTimeThreshold
|
||||
|| (mVideo.mTimeThreshold
|
||||
|
@ -1589,8 +1590,7 @@ MediaFormatReader::RequestVideoData(bool aSkipToNextKeyframe,
|
|||
|
||||
// Ensure we have no pending seek going as ShouldSkip could return out of date
|
||||
// information.
|
||||
if (!mVideo.HasInternalSeekPending()
|
||||
&& ShouldSkip(aSkipToNextKeyframe, aTimeThreshold)) {
|
||||
if (!mVideo.HasInternalSeekPending() && ShouldSkip(aTimeThreshold)) {
|
||||
RefPtr<VideoDataPromise> p = mVideo.EnsurePromise(__func__);
|
||||
SkipVideoDemuxToNextKeyFrame(aTimeThreshold);
|
||||
return p;
|
||||
|
|
|
@ -155,7 +155,7 @@ private:
|
|||
void Reset(TrackType aTrack);
|
||||
void DropDecodedSamples(TrackType aTrack);
|
||||
|
||||
bool ShouldSkip(bool aSkipToNextKeyframe, media::TimeUnit aTimeThreshold);
|
||||
bool ShouldSkip(media::TimeUnit aTimeThreshold);
|
||||
|
||||
void SetVideoDecodeThreshold();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче