Add unit test for MatroskaExtractor full Block

The existing sample uses SimpleBlock

PiperOrigin-RevId: 284195590
This commit is contained in:
olly 2019-12-06 17:02:19 +00:00 committed by Oliver Woodman
parent d73af0247b
commit 45013ece1e
6 changed files with 177 additions and 0 deletions

Binary file not shown.

View file

@ -0,0 +1,43 @@
seekMap:
isSeekable = true
duration = 8901000
getPosition(0) = [[timeUs=0, position=5401]]
numberOfTracks = 1
track 1:
format:
bitrate = -1
id = 1
containerMimeType = null
sampleMimeType = application/x-subrip
maxInputSize = -1
width = -1
height = -1
frameRate = -1.0
rotationDegrees = 0
pixelWidthHeightRatio = 1.0
channelCount = -1
sampleRate = -1
pcmEncoding = -1
encoderDelay = 0
encoderPadding = 0
subsampleOffsetUs = 9223372036854775807
selectionFlags = 1
language = und
drmInitData = -
metadata = null
initializationData:
total output bytes = 213
sample count = 3
sample 0:
time = 0
flags = 1
data = length 59, hash A0217393
sample 1:
time = 2345000
flags = 1
data = length 95, hash 4904F2
sample 2:
time = 4567000
flags = 1
data = length 59, hash EFAB6D8A
tracksEnded = true

View file

@ -0,0 +1,43 @@
seekMap:
isSeekable = true
duration = 8901000
getPosition(0) = [[timeUs=0, position=5401]]
numberOfTracks = 1
track 1:
format:
bitrate = -1
id = 1
containerMimeType = null
sampleMimeType = application/x-subrip
maxInputSize = -1
width = -1
height = -1
frameRate = -1.0
rotationDegrees = 0
pixelWidthHeightRatio = 1.0
channelCount = -1
sampleRate = -1
pcmEncoding = -1
encoderDelay = 0
encoderPadding = 0
subsampleOffsetUs = 9223372036854775807
selectionFlags = 1
language = und
drmInitData = -
metadata = null
initializationData:
total output bytes = 213
sample count = 3
sample 0:
time = 0
flags = 1
data = length 59, hash A0217393
sample 1:
time = 2345000
flags = 1
data = length 95, hash 4904F2
sample 2:
time = 4567000
flags = 1
data = length 59, hash EFAB6D8A
tracksEnded = true

View file

@ -0,0 +1,43 @@
seekMap:
isSeekable = true
duration = 8901000
getPosition(0) = [[timeUs=0, position=5401]]
numberOfTracks = 1
track 1:
format:
bitrate = -1
id = 1
containerMimeType = null
sampleMimeType = application/x-subrip
maxInputSize = -1
width = -1
height = -1
frameRate = -1.0
rotationDegrees = 0
pixelWidthHeightRatio = 1.0
channelCount = -1
sampleRate = -1
pcmEncoding = -1
encoderDelay = 0
encoderPadding = 0
subsampleOffsetUs = 9223372036854775807
selectionFlags = 1
language = und
drmInitData = -
metadata = null
initializationData:
total output bytes = 213
sample count = 3
sample 0:
time = 0
flags = 1
data = length 59, hash A0217393
sample 1:
time = 2345000
flags = 1
data = length 95, hash 4904F2
sample 2:
time = 4567000
flags = 1
data = length 59, hash EFAB6D8A
tracksEnded = true

View file

@ -0,0 +1,43 @@
seekMap:
isSeekable = true
duration = 8901000
getPosition(0) = [[timeUs=0, position=5401]]
numberOfTracks = 1
track 1:
format:
bitrate = -1
id = 1
containerMimeType = null
sampleMimeType = application/x-subrip
maxInputSize = -1
width = -1
height = -1
frameRate = -1.0
rotationDegrees = 0
pixelWidthHeightRatio = 1.0
channelCount = -1
sampleRate = -1
pcmEncoding = -1
encoderDelay = 0
encoderPadding = 0
subsampleOffsetUs = 9223372036854775807
selectionFlags = 1
language = und
drmInitData = -
metadata = null
initializationData:
total output bytes = 213
sample count = 3
sample 0:
time = 0
flags = 1
data = length 59, hash A0217393
sample 1:
time = 2345000
flags = 1
data = length 95, hash 4904F2
sample 2:
time = 4567000
flags = 1
data = length 59, hash EFAB6D8A
tracksEnded = true

View file

@ -29,6 +29,11 @@ public final class MatroskaExtractorTest {
ExtractorAsserts.assertBehavior(MatroskaExtractor::new, "mkv/sample.mkv");
}
@Test
public void testMkvFullBlocksSample() throws Exception {
ExtractorAsserts.assertBehavior(MatroskaExtractor::new, "mkv/full_blocks.mkv");
}
@Test
public void testWebmSubsampleEncryption() throws Exception {
ExtractorAsserts.assertBehavior(