mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Add unit test for MatroskaExtractor full Block
The existing sample uses SimpleBlock PiperOrigin-RevId: 284195590
This commit is contained in:
parent
d73af0247b
commit
45013ece1e
6 changed files with 177 additions and 0 deletions
BIN
library/core/src/test/assets/mkv/full_blocks.mkv
Normal file
BIN
library/core/src/test/assets/mkv/full_blocks.mkv
Normal file
Binary file not shown.
43
library/core/src/test/assets/mkv/full_blocks.mkv.0.dump
Normal file
43
library/core/src/test/assets/mkv/full_blocks.mkv.0.dump
Normal 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
|
||||||
43
library/core/src/test/assets/mkv/full_blocks.mkv.1.dump
Normal file
43
library/core/src/test/assets/mkv/full_blocks.mkv.1.dump
Normal 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
|
||||||
43
library/core/src/test/assets/mkv/full_blocks.mkv.2.dump
Normal file
43
library/core/src/test/assets/mkv/full_blocks.mkv.2.dump
Normal 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
|
||||||
43
library/core/src/test/assets/mkv/full_blocks.mkv.3.dump
Normal file
43
library/core/src/test/assets/mkv/full_blocks.mkv.3.dump
Normal 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
|
||||||
|
|
@ -29,6 +29,11 @@ public final class MatroskaExtractorTest {
|
||||||
ExtractorAsserts.assertBehavior(MatroskaExtractor::new, "mkv/sample.mkv");
|
ExtractorAsserts.assertBehavior(MatroskaExtractor::new, "mkv/sample.mkv");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testMkvFullBlocksSample() throws Exception {
|
||||||
|
ExtractorAsserts.assertBehavior(MatroskaExtractor::new, "mkv/full_blocks.mkv");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testWebmSubsampleEncryption() throws Exception {
|
public void testWebmSubsampleEncryption() throws Exception {
|
||||||
ExtractorAsserts.assertBehavior(
|
ExtractorAsserts.assertBehavior(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue