mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Fix CompositionPlayerTest.imagePreview_imagePlaysForSetDuration
PiperOrigin-RevId: 700931124
This commit is contained in:
parent
08619bf6fa
commit
dfe3c90f9a
1 changed files with 4 additions and 1 deletions
|
|
@ -245,6 +245,7 @@ public class CompositionPlayerTest {
|
||||||
.setUri(JPG_SINGLE_PIXEL_ASSET.uri)
|
.setUri(JPG_SINGLE_PIXEL_ASSET.uri)
|
||||||
.setImageDurationMs(1_000)
|
.setImageDurationMs(1_000)
|
||||||
.build())
|
.build())
|
||||||
|
.setFrameRate(30)
|
||||||
.build())
|
.build())
|
||||||
.build())
|
.build())
|
||||||
.build());
|
.build());
|
||||||
|
|
@ -258,7 +259,9 @@ public class CompositionPlayerTest {
|
||||||
listener.waitUntilPlayerEnded();
|
listener.waitUntilPlayerEnded();
|
||||||
long playbackRealTimeMs = SystemClock.DEFAULT.elapsedRealtime() - playbackStartTimeMs;
|
long playbackRealTimeMs = SystemClock.DEFAULT.elapsedRealtime() - playbackStartTimeMs;
|
||||||
|
|
||||||
assertThat(playbackRealTimeMs).isAtLeast(1_000);
|
// Video frames are not rendered exactly at the time corresponding to their presentation
|
||||||
|
// timestamp, and the differences accumulate.
|
||||||
|
assertThat(playbackRealTimeMs).isAtLeast(900);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue