mirror of
https://github.com/samsonjs/media.git
synced 2026-04-19 13:35:47 +00:00
add test sample for packet header split across PES packets
This commit is contained in:
parent
ad7ca92e29
commit
3d974793f9
7 changed files with 362 additions and 0 deletions
|
|
@ -350,6 +350,14 @@ public final class TsExtractorTest {
|
|||
simulationConfig);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void sampleWithMpeghBlContSplitHeader() throws Exception {
|
||||
ExtractorAsserts.assertBehavior(
|
||||
getExtractorFactory(subtitlesParsedDuringExtraction),
|
||||
"media/ts/sample_mpegh_bl_cicp1_cont_splitheader.ts",
|
||||
simulationConfig);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void customPesReader() throws Exception {
|
||||
CustomTsPayloadReaderFactory factory = new CustomTsPayloadReaderFactory(true, false);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,133 @@
|
|||
seekMap:
|
||||
isSeekable = true
|
||||
duration = 589566
|
||||
getPosition(0) = [[timeUs=0, position=0]]
|
||||
getPosition(1) = [[timeUs=1, position=0]]
|
||||
getPosition(294783) = [[timeUs=294783, position=35353]]
|
||||
getPosition(589566) = [[timeUs=589566, position=70894]]
|
||||
numberOfTracks = 1
|
||||
track 32:
|
||||
total output bytes = 2837
|
||||
sample count = 29
|
||||
format 0:
|
||||
id = 1/32
|
||||
sampleMimeType = audio/mhm1
|
||||
codecs = mhm1.10
|
||||
sampleRate = 48000
|
||||
sample 0:
|
||||
time = 0
|
||||
flags = 1
|
||||
data = length 335, hash E6334A80
|
||||
sample 1:
|
||||
time = 21333
|
||||
flags = 0
|
||||
data = length 85, hash 8EFCDF36
|
||||
sample 2:
|
||||
time = 42666
|
||||
flags = 0
|
||||
data = length 98, hash BC03FE8A
|
||||
sample 3:
|
||||
time = 64000
|
||||
flags = 0
|
||||
data = length 105, hash 9FBA3169
|
||||
sample 4:
|
||||
time = 85333
|
||||
flags = 0
|
||||
data = length 93, hash BD1CBC0E
|
||||
sample 5:
|
||||
time = 106666
|
||||
flags = 0
|
||||
data = length 93, hash C0B46623
|
||||
sample 6:
|
||||
time = 128000
|
||||
flags = 0
|
||||
data = length 91, hash E4CA8D5
|
||||
sample 7:
|
||||
time = 149333
|
||||
flags = 0
|
||||
data = length 82, hash EB64F3A8
|
||||
sample 8:
|
||||
time = 170666
|
||||
flags = 0
|
||||
data = length 83, hash 97803527
|
||||
sample 9:
|
||||
time = 192000
|
||||
flags = 0
|
||||
data = length 82, hash 5972B44D
|
||||
sample 10:
|
||||
time = 213333
|
||||
flags = 0
|
||||
data = length 81, hash 3D9C7710
|
||||
sample 11:
|
||||
time = 234666
|
||||
flags = 0
|
||||
data = length 77, hash 27B26E3D
|
||||
sample 12:
|
||||
time = 256000
|
||||
flags = 0
|
||||
data = length 79, hash FB7243AF
|
||||
sample 13:
|
||||
time = 277333
|
||||
flags = 0
|
||||
data = length 80, hash 284BFE1
|
||||
sample 14:
|
||||
time = 298666
|
||||
flags = 0
|
||||
data = length 78, hash 8F24DBB3
|
||||
sample 15:
|
||||
time = 320000
|
||||
flags = 0
|
||||
data = length 77, hash CD76338B
|
||||
sample 16:
|
||||
time = 341333
|
||||
flags = 0
|
||||
data = length 78, hash CB614574
|
||||
sample 17:
|
||||
time = 362666
|
||||
flags = 0
|
||||
data = length 76, hash F97A6A30
|
||||
sample 18:
|
||||
time = 384000
|
||||
flags = 0
|
||||
data = length 56, hash E05FB636
|
||||
sample 19:
|
||||
time = 405333
|
||||
flags = 0
|
||||
data = length 81, hash 2B2350C7
|
||||
sample 20:
|
||||
time = 426666
|
||||
flags = 0
|
||||
data = length 79, hash DFF1D0CD
|
||||
sample 21:
|
||||
time = 448000
|
||||
flags = 0
|
||||
data = length 78, hash 8BA25136
|
||||
sample 22:
|
||||
time = 469333
|
||||
flags = 0
|
||||
data = length 79, hash 4FEDABA0
|
||||
sample 23:
|
||||
time = 490666
|
||||
flags = 0
|
||||
data = length 82, hash 7C80BC82
|
||||
sample 24:
|
||||
time = 512000
|
||||
flags = 1
|
||||
data = length 320, hash 58EEA8F6
|
||||
sample 25:
|
||||
time = 533333
|
||||
flags = 0
|
||||
data = length 77, hash 7349D247
|
||||
sample 26:
|
||||
time = 554666
|
||||
flags = 0
|
||||
data = length 77, hash 73C5B274
|
||||
sample 27:
|
||||
time = 576000
|
||||
flags = 0
|
||||
data = length 65, hash 622B1A8
|
||||
sample 28:
|
||||
time = 597333
|
||||
flags = 0
|
||||
data = length 70, hash E441B6B8
|
||||
tracksEnded = true
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
seekMap:
|
||||
isSeekable = true
|
||||
duration = 589566
|
||||
getPosition(0) = [[timeUs=0, position=0]]
|
||||
getPosition(1) = [[timeUs=1, position=0]]
|
||||
getPosition(294783) = [[timeUs=294783, position=35353]]
|
||||
getPosition(589566) = [[timeUs=589566, position=70894]]
|
||||
numberOfTracks = 1
|
||||
track 32:
|
||||
total output bytes = 609
|
||||
sample count = 5
|
||||
format 0:
|
||||
id = 1/32
|
||||
sampleMimeType = audio/mhm1
|
||||
codecs = mhm1.10
|
||||
sampleRate = 48000
|
||||
sample 0:
|
||||
time = 512000
|
||||
flags = 1
|
||||
data = length 320, hash 58EEA8F6
|
||||
sample 1:
|
||||
time = 533333
|
||||
flags = 0
|
||||
data = length 77, hash 7349D247
|
||||
sample 2:
|
||||
time = 554666
|
||||
flags = 0
|
||||
data = length 77, hash 73C5B274
|
||||
sample 3:
|
||||
time = 576000
|
||||
flags = 0
|
||||
data = length 65, hash 622B1A8
|
||||
sample 4:
|
||||
time = 597333
|
||||
flags = 0
|
||||
data = length 70, hash E441B6B8
|
||||
tracksEnded = true
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
seekMap:
|
||||
isSeekable = true
|
||||
duration = 589566
|
||||
getPosition(0) = [[timeUs=0, position=0]]
|
||||
getPosition(1) = [[timeUs=1, position=0]]
|
||||
getPosition(294783) = [[timeUs=294783, position=35353]]
|
||||
getPosition(589566) = [[timeUs=589566, position=70894]]
|
||||
numberOfTracks = 1
|
||||
track 32:
|
||||
total output bytes = 609
|
||||
sample count = 5
|
||||
format 0:
|
||||
id = 1/32
|
||||
sampleMimeType = audio/mhm1
|
||||
codecs = mhm1.10
|
||||
sampleRate = 48000
|
||||
sample 0:
|
||||
time = 512000
|
||||
flags = 1
|
||||
data = length 320, hash 58EEA8F6
|
||||
sample 1:
|
||||
time = 533333
|
||||
flags = 0
|
||||
data = length 77, hash 7349D247
|
||||
sample 2:
|
||||
time = 554666
|
||||
flags = 0
|
||||
data = length 77, hash 73C5B274
|
||||
sample 3:
|
||||
time = 576000
|
||||
flags = 0
|
||||
data = length 65, hash 622B1A8
|
||||
sample 4:
|
||||
time = 597333
|
||||
flags = 0
|
||||
data = length 70, hash E441B6B8
|
||||
tracksEnded = true
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
seekMap:
|
||||
isSeekable = true
|
||||
duration = 589566
|
||||
getPosition(0) = [[timeUs=0, position=0]]
|
||||
getPosition(1) = [[timeUs=1, position=0]]
|
||||
getPosition(294783) = [[timeUs=294783, position=35353]]
|
||||
getPosition(589566) = [[timeUs=589566, position=70894]]
|
||||
numberOfTracks = 1
|
||||
track 32:
|
||||
total output bytes = 0
|
||||
sample count = 0
|
||||
format 0:
|
||||
id = 1/32
|
||||
sampleMimeType = audio/mhm1
|
||||
codecs = mhm1.10
|
||||
sampleRate = 48000
|
||||
tracksEnded = true
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
seekMap:
|
||||
isSeekable = false
|
||||
duration = UNSET TIME
|
||||
getPosition(0) = [[timeUs=0, position=0]]
|
||||
numberOfTracks = 1
|
||||
track 32:
|
||||
total output bytes = 2837
|
||||
sample count = 29
|
||||
format 0:
|
||||
id = 1/32
|
||||
sampleMimeType = audio/mhm1
|
||||
codecs = mhm1.10
|
||||
sampleRate = 48000
|
||||
sample 0:
|
||||
time = 0
|
||||
flags = 1
|
||||
data = length 335, hash E6334A80
|
||||
sample 1:
|
||||
time = 21333
|
||||
flags = 0
|
||||
data = length 85, hash 8EFCDF36
|
||||
sample 2:
|
||||
time = 42666
|
||||
flags = 0
|
||||
data = length 98, hash BC03FE8A
|
||||
sample 3:
|
||||
time = 64000
|
||||
flags = 0
|
||||
data = length 105, hash 9FBA3169
|
||||
sample 4:
|
||||
time = 85333
|
||||
flags = 0
|
||||
data = length 93, hash BD1CBC0E
|
||||
sample 5:
|
||||
time = 106666
|
||||
flags = 0
|
||||
data = length 93, hash C0B46623
|
||||
sample 6:
|
||||
time = 128000
|
||||
flags = 0
|
||||
data = length 91, hash E4CA8D5
|
||||
sample 7:
|
||||
time = 149333
|
||||
flags = 0
|
||||
data = length 82, hash EB64F3A8
|
||||
sample 8:
|
||||
time = 170666
|
||||
flags = 0
|
||||
data = length 83, hash 97803527
|
||||
sample 9:
|
||||
time = 192000
|
||||
flags = 0
|
||||
data = length 82, hash 5972B44D
|
||||
sample 10:
|
||||
time = 213333
|
||||
flags = 0
|
||||
data = length 81, hash 3D9C7710
|
||||
sample 11:
|
||||
time = 234666
|
||||
flags = 0
|
||||
data = length 77, hash 27B26E3D
|
||||
sample 12:
|
||||
time = 256000
|
||||
flags = 0
|
||||
data = length 79, hash FB7243AF
|
||||
sample 13:
|
||||
time = 277333
|
||||
flags = 0
|
||||
data = length 80, hash 284BFE1
|
||||
sample 14:
|
||||
time = 298666
|
||||
flags = 0
|
||||
data = length 78, hash 8F24DBB3
|
||||
sample 15:
|
||||
time = 320000
|
||||
flags = 0
|
||||
data = length 77, hash CD76338B
|
||||
sample 16:
|
||||
time = 341333
|
||||
flags = 0
|
||||
data = length 78, hash CB614574
|
||||
sample 17:
|
||||
time = 362666
|
||||
flags = 0
|
||||
data = length 76, hash F97A6A30
|
||||
sample 18:
|
||||
time = 384000
|
||||
flags = 0
|
||||
data = length 56, hash E05FB636
|
||||
sample 19:
|
||||
time = 405333
|
||||
flags = 0
|
||||
data = length 81, hash 2B2350C7
|
||||
sample 20:
|
||||
time = 426666
|
||||
flags = 0
|
||||
data = length 79, hash DFF1D0CD
|
||||
sample 21:
|
||||
time = 448000
|
||||
flags = 0
|
||||
data = length 78, hash 8BA25136
|
||||
sample 22:
|
||||
time = 469333
|
||||
flags = 0
|
||||
data = length 79, hash 4FEDABA0
|
||||
sample 23:
|
||||
time = 490666
|
||||
flags = 0
|
||||
data = length 82, hash 7C80BC82
|
||||
sample 24:
|
||||
time = 512000
|
||||
flags = 1
|
||||
data = length 320, hash 58EEA8F6
|
||||
sample 25:
|
||||
time = 533333
|
||||
flags = 0
|
||||
data = length 77, hash 7349D247
|
||||
sample 26:
|
||||
time = 554666
|
||||
flags = 0
|
||||
data = length 77, hash 73C5B274
|
||||
sample 27:
|
||||
time = 576000
|
||||
flags = 0
|
||||
data = length 65, hash 622B1A8
|
||||
sample 28:
|
||||
time = 597333
|
||||
flags = 0
|
||||
data = length 70, hash E441B6B8
|
||||
tracksEnded = true
|
||||
Binary file not shown.
Loading…
Reference in a new issue