Add TsExtractor tests for LATM and H264

PiperOrigin-RevId: 305475709
This commit is contained in:
kimvde 2020-04-08 15:50:14 +01:00 committed by Oliver Woodman
parent dbfb6b183c
commit dc80cf32b6
13 changed files with 612 additions and 2 deletions

View File

@ -49,12 +49,12 @@ public final class TsExtractorTest {
}
@Test
public void sampleScte35() throws Exception {
public void sampleWithScte35() throws Exception {
ExtractorAsserts.assertBehavior(TsExtractor::new, "ts/sample_scte35.ts");
}
@Test
public void withAit() throws Exception {
public void sampleWithAit() throws Exception {
ExtractorAsserts.assertBehavior(TsExtractor::new, "ts/sample_ait.ts");
}
@ -78,6 +78,16 @@ public final class TsExtractorTest {
ExtractorAsserts.assertBehavior(TsExtractor::new, "ts/sample_eac3joc.ts");
}
@Test
public void sampleWithH264() throws Exception {
ExtractorAsserts.assertBehavior(TsExtractor::new, "ts/sample_h264.ts");
}
@Test
public void sampleWithLatm() throws Exception {
ExtractorAsserts.assertBehavior(TsExtractor::new, "ts/sample_latm.ts");
}
@Test
public void streamWithJunkData() throws Exception {
ExtractorAsserts.assertBehavior(

Binary file not shown.

View File

@ -0,0 +1,61 @@
seekMap:
isSeekable = true
duration = 66733
getPosition(0) = [[timeUs=0, position=0]]
getPosition(1) = [[timeUs=1, position=0]]
getPosition(33366) = [[timeUs=33366, position=9545]]
getPosition(66733) = [[timeUs=66733, position=19279]]
numberOfTracks = 3
track 256:
total output bytes = 13650
sample count = 2
format 0:
id = 1/256
sampleMimeType = video/avc
codecs = avc1.64001E
width = 640
height = 426
initializationData:
data = length 29, hash 4C2CAE9C
data = length 9, hash D971CD89
sample 0:
time = 66733
flags = 1
data = length 12394, hash A39F5311
sample 1:
time = 100100
flags = 0
data = length 813, hash 99F7B4FA
track 257:
total output bytes = 5015
sample count = 4
format 0:
id = 1/257
sampleMimeType = audio/mpeg-L2
maxInputSize = 4096
channelCount = 1
sampleRate = 44100
language = und
sample 0:
time = 66733
flags = 1
data = length 1253, hash 727FD1C6
sample 1:
time = 92855
flags = 1
data = length 1254, hash 73FB07B8
sample 2:
time = 118977
flags = 1
data = length 1254, hash 73FB07B8
sample 3:
time = 145099
flags = 1
data = length 1254, hash 73FB07B8
track 8448:
total output bytes = 0
sample count = 0
format 0:
id = 1/8448
sampleMimeType = application/cea-608
tracksEnded = true

View File

@ -0,0 +1,61 @@
seekMap:
isSeekable = true
duration = 66733
getPosition(0) = [[timeUs=0, position=0]]
getPosition(1) = [[timeUs=1, position=0]]
getPosition(33366) = [[timeUs=33366, position=9545]]
getPosition(66733) = [[timeUs=66733, position=19279]]
numberOfTracks = 3
track 256:
total output bytes = 13650
sample count = 2
format 0:
id = 1/256
sampleMimeType = video/avc
codecs = avc1.64001E
width = 640
height = 426
initializationData:
data = length 29, hash 4C2CAE9C
data = length 9, hash D971CD89
sample 0:
time = 88977
flags = 1
data = length 12394, hash A39F5311
sample 1:
time = 122344
flags = 0
data = length 813, hash 99F7B4FA
track 257:
total output bytes = 5015
sample count = 4
format 0:
id = 1/257
sampleMimeType = audio/mpeg-L2
maxInputSize = 4096
channelCount = 1
sampleRate = 44100
language = und
sample 0:
time = 88977
flags = 1
data = length 1253, hash 727FD1C6
sample 1:
time = 115099
flags = 1
data = length 1254, hash 73FB07B8
sample 2:
time = 141221
flags = 1
data = length 1254, hash 73FB07B8
sample 3:
time = 167343
flags = 1
data = length 1254, hash 73FB07B8
track 8448:
total output bytes = 0
sample count = 0
format 0:
id = 1/8448
sampleMimeType = application/cea-608
tracksEnded = true

View File

@ -0,0 +1,61 @@
seekMap:
isSeekable = true
duration = 66733
getPosition(0) = [[timeUs=0, position=0]]
getPosition(1) = [[timeUs=1, position=0]]
getPosition(33366) = [[timeUs=33366, position=9545]]
getPosition(66733) = [[timeUs=66733, position=19279]]
numberOfTracks = 3
track 256:
total output bytes = 13650
sample count = 2
format 0:
id = 1/256
sampleMimeType = video/avc
codecs = avc1.64001E
width = 640
height = 426
initializationData:
data = length 29, hash 4C2CAE9C
data = length 9, hash D971CD89
sample 0:
time = 111221
flags = 1
data = length 12394, hash A39F5311
sample 1:
time = 144588
flags = 0
data = length 813, hash 99F7B4FA
track 257:
total output bytes = 5015
sample count = 4
format 0:
id = 1/257
sampleMimeType = audio/mpeg-L2
maxInputSize = 4096
channelCount = 1
sampleRate = 44100
language = und
sample 0:
time = 111221
flags = 1
data = length 1253, hash 727FD1C6
sample 1:
time = 137343
flags = 1
data = length 1254, hash 73FB07B8
sample 2:
time = 163465
flags = 1
data = length 1254, hash 73FB07B8
sample 3:
time = 189587
flags = 1
data = length 1254, hash 73FB07B8
track 8448:
total output bytes = 0
sample count = 0
format 0:
id = 1/8448
sampleMimeType = application/cea-608
tracksEnded = true

View File

@ -0,0 +1,37 @@
seekMap:
isSeekable = true
duration = 66733
getPosition(0) = [[timeUs=0, position=0]]
getPosition(1) = [[timeUs=1, position=0]]
getPosition(33366) = [[timeUs=33366, position=9545]]
getPosition(66733) = [[timeUs=66733, position=19279]]
numberOfTracks = 3
track 256:
total output bytes = 0
sample count = 0
format 0:
id = 1/256
sampleMimeType = video/avc
codecs = avc1.64001E
width = 640
height = 426
initializationData:
data = length 29, hash 4C2CAE9C
data = length 9, hash D971CD89
track 257:
total output bytes = 0
sample count = 0
format 0:
id = 1/257
sampleMimeType = audio/mpeg-L2
maxInputSize = 4096
channelCount = 1
sampleRate = 44100
language = und
track 8448:
total output bytes = 0
sample count = 0
format 0:
id = 1/8448
sampleMimeType = application/cea-608
tracksEnded = true

View File

@ -0,0 +1,58 @@
seekMap:
isSeekable = false
duration = UNSET TIME
getPosition(0) = [[timeUs=0, position=0]]
numberOfTracks = 3
track 256:
total output bytes = 13650
sample count = 2
format 0:
id = 1/256
sampleMimeType = video/avc
codecs = avc1.64001E
width = 640
height = 426
initializationData:
data = length 29, hash 4C2CAE9C
data = length 9, hash D971CD89
sample 0:
time = 66733
flags = 1
data = length 12394, hash A39F5311
sample 1:
time = 100100
flags = 0
data = length 813, hash 99F7B4FA
track 257:
total output bytes = 5015
sample count = 4
format 0:
id = 1/257
sampleMimeType = audio/mpeg-L2
maxInputSize = 4096
channelCount = 1
sampleRate = 44100
language = und
sample 0:
time = 66733
flags = 1
data = length 1253, hash 727FD1C6
sample 1:
time = 92855
flags = 1
data = length 1254, hash 73FB07B8
sample 2:
time = 118977
flags = 1
data = length 1254, hash 73FB07B8
sample 3:
time = 145099
flags = 1
data = length 1254, hash 73FB07B8
track 8448:
total output bytes = 0
sample count = 0
format 0:
id = 1/8448
sampleMimeType = application/cea-608
tracksEnded = true

Binary file not shown.

View File

@ -0,0 +1,65 @@
seekMap:
isSeekable = true
duration = 0
getPosition(0) = [[timeUs=0, position=0]]
getPosition(1) = [[timeUs=1, position=0]]
getPosition(0) = [[timeUs=0, position=0]]
getPosition(0) = [[timeUs=0, position=0]]
numberOfTracks = 3
track 256:
total output bytes = 45026
sample count = 2
format 0:
id = 1/256
sampleMimeType = video/mpeg2
width = 640
height = 426
initializationData:
data = length 22, hash CE183139
sample 0:
time = 33367
flags = 1
data = length 20711, hash 34341E8
sample 1:
time = 66733
flags = 0
data = length 18112, hash EC44B35B
track 257:
total output bytes = 1396
sample count = 5
format 0:
id = 1/257
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.5
channelCount = 1
sampleRate = 44100
language = und
initializationData:
data = length 4, hash 1FE978
sample 0:
time = -92233
flags = 1
data = length 279, hash 79BF9F9B
sample 1:
time = -69014
flags = 1
data = length 279, hash C96F4684
sample 2:
time = -45795
flags = 1
data = length 279, hash 65670B86
sample 3:
time = -22576
flags = 1
data = length 280, hash 1AF29BCE
sample 4:
time = 643
flags = 1
data = length 279, hash C96F4684
track 8448:
total output bytes = 0
sample count = 0
format 0:
id = 1/8448
sampleMimeType = application/cea-608
tracksEnded = true

View File

@ -0,0 +1,65 @@
seekMap:
isSeekable = true
duration = 0
getPosition(0) = [[timeUs=0, position=0]]
getPosition(1) = [[timeUs=1, position=0]]
getPosition(0) = [[timeUs=0, position=0]]
getPosition(0) = [[timeUs=0, position=0]]
numberOfTracks = 3
track 256:
total output bytes = 45026
sample count = 2
format 0:
id = 1/256
sampleMimeType = video/mpeg2
width = 640
height = 426
initializationData:
data = length 22, hash CE183139
sample 0:
time = 33367
flags = 1
data = length 20711, hash 34341E8
sample 1:
time = 66733
flags = 0
data = length 18112, hash EC44B35B
track 257:
total output bytes = 1396
sample count = 5
format 0:
id = 1/257
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.5
channelCount = 1
sampleRate = 44100
language = und
initializationData:
data = length 4, hash 1FE978
sample 0:
time = -92233
flags = 1
data = length 279, hash 79BF9F9B
sample 1:
time = -69014
flags = 1
data = length 279, hash C96F4684
sample 2:
time = -45795
flags = 1
data = length 279, hash 65670B86
sample 3:
time = -22576
flags = 1
data = length 280, hash 1AF29BCE
sample 4:
time = 643
flags = 1
data = length 279, hash C96F4684
track 8448:
total output bytes = 0
sample count = 0
format 0:
id = 1/8448
sampleMimeType = application/cea-608
tracksEnded = true

View File

@ -0,0 +1,65 @@
seekMap:
isSeekable = true
duration = 0
getPosition(0) = [[timeUs=0, position=0]]
getPosition(1) = [[timeUs=1, position=0]]
getPosition(0) = [[timeUs=0, position=0]]
getPosition(0) = [[timeUs=0, position=0]]
numberOfTracks = 3
track 256:
total output bytes = 45026
sample count = 2
format 0:
id = 1/256
sampleMimeType = video/mpeg2
width = 640
height = 426
initializationData:
data = length 22, hash CE183139
sample 0:
time = 33367
flags = 1
data = length 20711, hash 34341E8
sample 1:
time = 66733
flags = 0
data = length 18112, hash EC44B35B
track 257:
total output bytes = 1396
sample count = 5
format 0:
id = 1/257
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.5
channelCount = 1
sampleRate = 44100
language = und
initializationData:
data = length 4, hash 1FE978
sample 0:
time = -92233
flags = 1
data = length 279, hash 79BF9F9B
sample 1:
time = -69014
flags = 1
data = length 279, hash C96F4684
sample 2:
time = -45795
flags = 1
data = length 279, hash 65670B86
sample 3:
time = -22576
flags = 1
data = length 280, hash 1AF29BCE
sample 4:
time = 643
flags = 1
data = length 279, hash C96F4684
track 8448:
total output bytes = 0
sample count = 0
format 0:
id = 1/8448
sampleMimeType = application/cea-608
tracksEnded = true

View File

@ -0,0 +1,65 @@
seekMap:
isSeekable = true
duration = 0
getPosition(0) = [[timeUs=0, position=0]]
getPosition(1) = [[timeUs=1, position=0]]
getPosition(0) = [[timeUs=0, position=0]]
getPosition(0) = [[timeUs=0, position=0]]
numberOfTracks = 3
track 256:
total output bytes = 45026
sample count = 2
format 0:
id = 1/256
sampleMimeType = video/mpeg2
width = 640
height = 426
initializationData:
data = length 22, hash CE183139
sample 0:
time = 33367
flags = 1
data = length 20711, hash 34341E8
sample 1:
time = 66733
flags = 0
data = length 18112, hash EC44B35B
track 257:
total output bytes = 1396
sample count = 5
format 0:
id = 1/257
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.5
channelCount = 1
sampleRate = 44100
language = und
initializationData:
data = length 4, hash 1FE978
sample 0:
time = -92233
flags = 1
data = length 279, hash 79BF9F9B
sample 1:
time = -69014
flags = 1
data = length 279, hash C96F4684
sample 2:
time = -45795
flags = 1
data = length 279, hash 65670B86
sample 3:
time = -22576
flags = 1
data = length 280, hash 1AF29BCE
sample 4:
time = 643
flags = 1
data = length 279, hash C96F4684
track 8448:
total output bytes = 0
sample count = 0
format 0:
id = 1/8448
sampleMimeType = application/cea-608
tracksEnded = true

View File

@ -0,0 +1,62 @@
seekMap:
isSeekable = false
duration = UNSET TIME
getPosition(0) = [[timeUs=0, position=0]]
numberOfTracks = 3
track 256:
total output bytes = 45026
sample count = 2
format 0:
id = 1/256
sampleMimeType = video/mpeg2
width = 640
height = 426
initializationData:
data = length 22, hash CE183139
sample 0:
time = 33367
flags = 1
data = length 20711, hash 34341E8
sample 1:
time = 66733
flags = 0
data = length 18112, hash EC44B35B
track 257:
total output bytes = 1396
sample count = 5
format 0:
id = 1/257
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.5
channelCount = 1
sampleRate = 44100
language = und
initializationData:
data = length 4, hash 1FE978
sample 0:
time = -92233
flags = 1
data = length 279, hash 79BF9F9B
sample 1:
time = -69014
flags = 1
data = length 279, hash C96F4684
sample 2:
time = -45795
flags = 1
data = length 279, hash 65670B86
sample 3:
time = -22576
flags = 1
data = length 280, hash 1AF29BCE
sample 4:
time = 643
flags = 1
data = length 279, hash C96F4684
track 8448:
total output bytes = 0
sample count = 0
format 0:
id = 1/8448
sampleMimeType = application/cea-608
tracksEnded = true