mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Add more test cases to the seek test
This test also changes the image seeking behavior to match ExoPlayer: now if seeking to after the end of the image, the last frame of the image would still be presented. PiperOrigin-RevId: 724054371
This commit is contained in:
parent
d641f6a04c
commit
d23d4fc314
File diff suppressed because it is too large
Load Diff
@ -472,7 +472,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
MediaSource.MediaPeriodId mediaPeriodId)
|
MediaSource.MediaPeriodId mediaPeriodId)
|
||||||
throws ExoPlaybackException {
|
throws ExoPlaybackException {
|
||||||
checkState(getTimeline().getWindowCount() == 1);
|
checkState(getTimeline().getWindowCount() == 1);
|
||||||
super.onStreamChanged(formats, startPositionUs, offsetUs, mediaPeriodId);
|
|
||||||
streamStartPositionUs = startPositionUs;
|
streamStartPositionUs = startPositionUs;
|
||||||
// The media item might have been repeated in the sequence.
|
// The media item might have been repeated in the sequence.
|
||||||
int mediaItemIndex = getTimeline().getIndexOfPeriod(mediaPeriodId.periodUid);
|
int mediaItemIndex = getTimeline().getIndexOfPeriod(mediaPeriodId.periodUid);
|
||||||
@ -481,6 +480,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||||||
timestampIterator = createTimestampIterator(/* positionUs= */ startPositionUs);
|
timestampIterator = createTimestampIterator(/* positionUs= */ startPositionUs);
|
||||||
videoEffects = currentEditedMediaItem.effects.videoEffects;
|
videoEffects = currentEditedMediaItem.effects.videoEffects;
|
||||||
inputStreamPending = true;
|
inputStreamPending = true;
|
||||||
|
super.onStreamChanged(formats, startPositionUs, offsetUs, mediaPeriodId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user