Add DashPlayback test for loading thumbnail grids
This test instantiates an image renderer, selects an image track and plays a thumbnail grid. PiperOrigin-RevId: 582696009
This commit is contained in:
parent
a667ceb6f9
commit
64d2210b79
@ -255,4 +255,25 @@ public final class DashPlaybackTest {
|
||||
DumpFileAsserts.assertOutput(
|
||||
applicationContext, playbackOutput, "playbackdumps/dash/metadata_from_early_output.dump");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void playThumbnailGrid() throws Exception {
|
||||
Context applicationContext = ApplicationProvider.getApplicationContext();
|
||||
CapturingRenderersFactory capturingRenderersFactory =
|
||||
new CapturingRenderersFactory(applicationContext);
|
||||
ExoPlayer player =
|
||||
new ExoPlayer.Builder(applicationContext, capturingRenderersFactory)
|
||||
.setClock(new FakeClock(/* isAutoAdvancing= */ true))
|
||||
.build();
|
||||
PlaybackOutput playbackOutput = PlaybackOutput.register(player, capturingRenderersFactory);
|
||||
|
||||
player.setMediaItem(MediaItem.fromUri("asset:///media/dash/thumbnails/sample.mpd"));
|
||||
player.prepare();
|
||||
player.play();
|
||||
TestPlayerRunHelper.runUntilPlaybackState(player, Player.STATE_ENDED);
|
||||
player.release();
|
||||
|
||||
DumpFileAsserts.assertOutput(
|
||||
applicationContext, playbackOutput, "playbackdumps/dash/loadimage.dump");
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 172 KiB |
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" minBufferTime="PT2S" type="static" mediaPresentationDuration="PT60S">
|
||||
<Period id="0">
|
||||
<AdaptationSet id="0" contentType="image" mimeType="image/jpeg">
|
||||
<SegmentTemplate media="sample.image_$Number$.jpg" timescale="1" duration="60"/>
|
||||
<Representation id="thumbnails_256x144" bandwidth="24000" width="2048" height="1152">
|
||||
<EssentialProperty schemeIdUri="http://dashif.org/guidelines/thumbnail_tile" value="8x8"/>
|
||||
</Representation>
|
||||
</AdaptationSet>
|
||||
</Period>
|
||||
</MPD>
|
@ -0,0 +1,5 @@
|
||||
ImageOutput:
|
||||
rendered image count = 1
|
||||
image output #1:
|
||||
presentationTimeUs = 0
|
||||
bitmap hash = 90169190
|
Loading…
x
Reference in New Issue
Block a user