mirror of
https://github.com/samsonjs/media.git
synced 2026-04-10 12:05:47 +00:00
Add test for emsg near to end of DASH period
The dumped output should include metadata, but doesn't because of Issue: #8710. The fix is in a follow-up change. PiperOrigin-RevId: 366028303
This commit is contained in:
parent
2fa3675edb
commit
c02288452b
4 changed files with 153 additions and 0 deletions
|
|
@ -73,4 +73,27 @@ public final class DashPlaybackTest {
|
|||
DumpFileAsserts.assertOutput(
|
||||
applicationContext, playbackOutput, "playbackdumps/dash/webvtt-in-mp4.dump");
|
||||
}
|
||||
|
||||
// https://github.com/google/ExoPlayer/issues/8710
|
||||
@Test
|
||||
public void emsgNearToPeriodBoundary() throws Exception {
|
||||
Context applicationContext = ApplicationProvider.getApplicationContext();
|
||||
CapturingRenderersFactory capturingRenderersFactory =
|
||||
new CapturingRenderersFactory(applicationContext);
|
||||
SimpleExoPlayer player =
|
||||
new SimpleExoPlayer.Builder(applicationContext, capturingRenderersFactory)
|
||||
.setClock(new FakeClock(/* isAutoAdvancing= */ true))
|
||||
.build();
|
||||
player.setVideoSurface(new Surface(new SurfaceTexture(/* texName= */ 1)));
|
||||
PlaybackOutput playbackOutput = PlaybackOutput.register(player, capturingRenderersFactory);
|
||||
|
||||
player.setMediaItem(MediaItem.fromUri("asset:///media/dash/emsg/sample.mpd"));
|
||||
player.prepare();
|
||||
player.play();
|
||||
TestPlayerRunHelper.runUntilPlaybackState(player, Player.STATE_ENDED);
|
||||
player.release();
|
||||
|
||||
DumpFileAsserts.assertOutput(
|
||||
applicationContext, playbackOutput, "playbackdumps/dash/emsg.dump");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
BIN
testdata/src/test/assets/media/dash/emsg/sample.audio.mp4
vendored
Normal file
BIN
testdata/src/test/assets/media/dash/emsg/sample.audio.mp4
vendored
Normal file
Binary file not shown.
36
testdata/src/test/assets/media/dash/emsg/sample.mpd
vendored
Normal file
36
testdata/src/test/assets/media/dash/emsg/sample.mpd
vendored
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--Generated with https://github.com/google/shaka-packager version v2.4.1-c731217-release
|
||||
$ packager-linux \
|
||||
in=../../mp4/sample.mp4,stream=audio,output=sample.audio.mp4 \
|
||||
-\-mpd_output sample.mpd
|
||||
|
||||
Then EventStream section & second period added by hand (copy-pasting first period).
|
||||
-->
|
||||
<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="PT2.044S">
|
||||
<Period id="0" start="PT00.000S">
|
||||
<AdaptationSet id="0" contentType="audio" subsegmentAlignment="true">
|
||||
<Representation id="0" bandwidth="78099" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
|
||||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1"/>
|
||||
<BaseURL>sample.audio.mp4</BaseURL>
|
||||
<SegmentBase indexRange="757-800" timescale="44100" presentationTimeOffset="1940">
|
||||
<Initialization range="0-756"/>
|
||||
</SegmentBase>
|
||||
</Representation>
|
||||
</AdaptationSet>
|
||||
<EventStream schemeIdUri="urn:mpeg:dash:event:callback:2015" timescale="1000" value="1">
|
||||
<Event presentationTime="100" duration="1000" id="0" messageData="" />
|
||||
<Event presentationTime="1000" duration="1000" id="1" messageData="" />
|
||||
</EventStream>
|
||||
</Period>
|
||||
<Period id="1" start="PT1.022S">
|
||||
<AdaptationSet id="0" contentType="audio" subsegmentAlignment="true">
|
||||
<Representation id="0" bandwidth="78099" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="44100">
|
||||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="1"/>
|
||||
<BaseURL>sample.audio.mp4</BaseURL>
|
||||
<SegmentBase indexRange="757-800" timescale="44100" presentationTimeOffset="1940">
|
||||
<Initialization range="0-756"/>
|
||||
</SegmentBase>
|
||||
</Representation>
|
||||
</AdaptationSet>
|
||||
</Period>
|
||||
</MPD>
|
||||
94
testdata/src/test/assets/playbackdumps/dash/emsg.dump
vendored
Normal file
94
testdata/src/test/assets/playbackdumps/dash/emsg.dump
vendored
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
MediaCodecAdapter (exotest.audio.aac):
|
||||
buffers.length = 92
|
||||
buffers[0] = length 23, hash 47DE9131
|
||||
buffers[1] = length 6, hash 31EC5206
|
||||
buffers[2] = length 148, hash 894A176B
|
||||
buffers[3] = length 189, hash CEF235A1
|
||||
buffers[4] = length 205, hash BBF5F7B0
|
||||
buffers[5] = length 210, hash F278B193
|
||||
buffers[6] = length 210, hash 82DA1589
|
||||
buffers[7] = length 207, hash 5BE231DF
|
||||
buffers[8] = length 225, hash 18819EE1
|
||||
buffers[9] = length 215, hash CA7FA67B
|
||||
buffers[10] = length 211, hash 581A1C18
|
||||
buffers[11] = length 216, hash ADB88187
|
||||
buffers[12] = length 229, hash 2E8BA4DC
|
||||
buffers[13] = length 232, hash 22F0C510
|
||||
buffers[14] = length 235, hash 867AD0DC
|
||||
buffers[15] = length 231, hash 84E823A8
|
||||
buffers[16] = length 226, hash 1BEF3A95
|
||||
buffers[17] = length 216, hash EAA345AE
|
||||
buffers[18] = length 229, hash 6957411F
|
||||
buffers[19] = length 219, hash 41275022
|
||||
buffers[20] = length 241, hash 6495DF96
|
||||
buffers[21] = length 228, hash 63D95906
|
||||
buffers[22] = length 238, hash 34F676F9
|
||||
buffers[23] = length 234, hash E5CBC045
|
||||
buffers[24] = length 231, hash 5FC43661
|
||||
buffers[25] = length 217, hash 682708ED
|
||||
buffers[26] = length 239, hash D43780FC
|
||||
buffers[27] = length 243, hash C5E17980
|
||||
buffers[28] = length 231, hash AC5837BA
|
||||
buffers[29] = length 230, hash 169EE895
|
||||
buffers[30] = length 238, hash C48FF3F1
|
||||
buffers[31] = length 225, hash 531E4599
|
||||
buffers[32] = length 232, hash CB3C6B8D
|
||||
buffers[33] = length 243, hash F8C94C7
|
||||
buffers[34] = length 232, hash A646A7D0
|
||||
buffers[35] = length 237, hash E8B787A5
|
||||
buffers[36] = length 228, hash 3FA7A29F
|
||||
buffers[37] = length 235, hash B9B33B0A
|
||||
buffers[38] = length 264, hash 71A4869E
|
||||
buffers[39] = length 257, hash D049B54C
|
||||
buffers[40] = length 227, hash 66757231
|
||||
buffers[41] = length 227, hash BD374F1B
|
||||
buffers[42] = length 235, hash 999477F6
|
||||
buffers[43] = length 229, hash FFF98DF0
|
||||
buffers[44] = length 6, hash 31B22286
|
||||
buffers[45] = length 0, hash 1
|
||||
buffers[46] = length 23, hash 47DE9131
|
||||
buffers[47] = length 6, hash 31EC5206
|
||||
buffers[48] = length 148, hash 894A176B
|
||||
buffers[49] = length 189, hash CEF235A1
|
||||
buffers[50] = length 205, hash BBF5F7B0
|
||||
buffers[51] = length 210, hash F278B193
|
||||
buffers[52] = length 210, hash 82DA1589
|
||||
buffers[53] = length 207, hash 5BE231DF
|
||||
buffers[54] = length 225, hash 18819EE1
|
||||
buffers[55] = length 215, hash CA7FA67B
|
||||
buffers[56] = length 211, hash 581A1C18
|
||||
buffers[57] = length 216, hash ADB88187
|
||||
buffers[58] = length 229, hash 2E8BA4DC
|
||||
buffers[59] = length 232, hash 22F0C510
|
||||
buffers[60] = length 235, hash 867AD0DC
|
||||
buffers[61] = length 231, hash 84E823A8
|
||||
buffers[62] = length 226, hash 1BEF3A95
|
||||
buffers[63] = length 216, hash EAA345AE
|
||||
buffers[64] = length 229, hash 6957411F
|
||||
buffers[65] = length 219, hash 41275022
|
||||
buffers[66] = length 241, hash 6495DF96
|
||||
buffers[67] = length 228, hash 63D95906
|
||||
buffers[68] = length 238, hash 34F676F9
|
||||
buffers[69] = length 234, hash E5CBC045
|
||||
buffers[70] = length 231, hash 5FC43661
|
||||
buffers[71] = length 217, hash 682708ED
|
||||
buffers[72] = length 239, hash D43780FC
|
||||
buffers[73] = length 243, hash C5E17980
|
||||
buffers[74] = length 231, hash AC5837BA
|
||||
buffers[75] = length 230, hash 169EE895
|
||||
buffers[76] = length 238, hash C48FF3F1
|
||||
buffers[77] = length 225, hash 531E4599
|
||||
buffers[78] = length 232, hash CB3C6B8D
|
||||
buffers[79] = length 243, hash F8C94C7
|
||||
buffers[80] = length 232, hash A646A7D0
|
||||
buffers[81] = length 237, hash E8B787A5
|
||||
buffers[82] = length 228, hash 3FA7A29F
|
||||
buffers[83] = length 235, hash B9B33B0A
|
||||
buffers[84] = length 264, hash 71A4869E
|
||||
buffers[85] = length 257, hash D049B54C
|
||||
buffers[86] = length 227, hash 66757231
|
||||
buffers[87] = length 227, hash BD374F1B
|
||||
buffers[88] = length 235, hash 999477F6
|
||||
buffers[89] = length 229, hash FFF98DF0
|
||||
buffers[90] = length 6, hash 31B22286
|
||||
buffers[91] = length 0, hash 1
|
||||
Loading…
Reference in a new issue