mirror of
https://github.com/samsonjs/media.git
synced 2026-03-27 09:45:47 +00:00
Add protected AC-4 fmp4 test case
This commit is contained in:
parent
4ce72d9d6d
commit
74e01f4e97
6 changed files with 370 additions and 0 deletions
BIN
library/core/src/test/assets/mp4/sample_ac4_protected.mp4
Normal file
BIN
library/core/src/test/assets/mp4/sample_ac4_protected.mp4
Normal file
Binary file not shown.
145
library/core/src/test/assets/mp4/sample_ac4_protected.mp4.0.dump
Normal file
145
library/core/src/test/assets/mp4/sample_ac4_protected.mp4.0.dump
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
seekMap:
|
||||
isSeekable = true
|
||||
duration = 760000
|
||||
getPosition(0) = [[timeUs=0, position=950]]
|
||||
numberOfTracks = 1
|
||||
track 0:
|
||||
format:
|
||||
bitrate = -1
|
||||
id = 1
|
||||
containerMimeType = null
|
||||
sampleMimeType = audio/ac4
|
||||
maxInputSize = -1
|
||||
width = -1
|
||||
height = -1
|
||||
frameRate = -1.0
|
||||
rotationDegrees = 0
|
||||
pixelWidthHeightRatio = 1.0
|
||||
channelCount = 2
|
||||
sampleRate = 48000
|
||||
pcmEncoding = -1
|
||||
encoderDelay = 0
|
||||
encoderPadding = 0
|
||||
subsampleOffsetUs = 9223372036854775807
|
||||
selectionFlags = 0
|
||||
language = und
|
||||
drmInitData = -1683793742
|
||||
metadata = null
|
||||
initializationData:
|
||||
total output bytes = 7936
|
||||
sample count = 19
|
||||
sample 0:
|
||||
time = 0
|
||||
flags = 1073741825
|
||||
data = length 384, hash 96EFFFF3
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 1:
|
||||
time = 40000
|
||||
flags = 1073741825
|
||||
data = length 384, hash 899279C6
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 2:
|
||||
time = 80000
|
||||
flags = 1073741825
|
||||
data = length 384, hash 9EA9F45
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 3:
|
||||
time = 120000
|
||||
flags = 1073741825
|
||||
data = length 384, hash 82D362A9
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 4:
|
||||
time = 160000
|
||||
flags = 1073741825
|
||||
data = length 384, hash B8705CFB
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 5:
|
||||
time = 200000
|
||||
flags = 1073741825
|
||||
data = length 384, hash 58B5628E
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 6:
|
||||
time = 240000
|
||||
flags = 1073741825
|
||||
data = length 384, hash 87F3C13B
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 7:
|
||||
time = 280000
|
||||
flags = 1073741825
|
||||
data = length 384, hash 54333DC5
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 8:
|
||||
time = 320000
|
||||
flags = 1073741825
|
||||
data = length 384, hash 1C49C4B3
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 9:
|
||||
time = 360000
|
||||
flags = 1073741825
|
||||
data = length 384, hash 5FDC324F
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 10:
|
||||
time = 400000
|
||||
flags = 1073741825
|
||||
data = length 384, hash B2A7F444
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 11:
|
||||
time = 440000
|
||||
flags = 1073741825
|
||||
data = length 512, hash 5FD06C1E
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 12:
|
||||
time = 480000
|
||||
flags = 1073741825
|
||||
data = length 537, hash 7ABBDCB
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 13:
|
||||
time = 520000
|
||||
flags = 1073741825
|
||||
data = length 616, hash 3F657E23
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 14:
|
||||
time = 560000
|
||||
flags = 1073741825
|
||||
data = length 453, hash 8FCF0529
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 15:
|
||||
time = 600000
|
||||
flags = 1073741825
|
||||
data = length 383, hash 7F8C9E19
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 16:
|
||||
time = 640000
|
||||
flags = 1073741825
|
||||
data = length 410, hash 3727858D
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 17:
|
||||
time = 680000
|
||||
flags = 1073741825
|
||||
data = length 391, hash E2931212
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 18:
|
||||
time = 720000
|
||||
flags = 1073741825
|
||||
data = length 410, hash 63017D46
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
tracksEnded = true
|
||||
109
library/core/src/test/assets/mp4/sample_ac4_protected.mp4.1.dump
Normal file
109
library/core/src/test/assets/mp4/sample_ac4_protected.mp4.1.dump
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
seekMap:
|
||||
isSeekable = true
|
||||
duration = 760000
|
||||
getPosition(0) = [[timeUs=0, position=950]]
|
||||
numberOfTracks = 1
|
||||
track 0:
|
||||
format:
|
||||
bitrate = -1
|
||||
id = 1
|
||||
containerMimeType = null
|
||||
sampleMimeType = audio/ac4
|
||||
maxInputSize = -1
|
||||
width = -1
|
||||
height = -1
|
||||
frameRate = -1.0
|
||||
rotationDegrees = 0
|
||||
pixelWidthHeightRatio = 1.0
|
||||
channelCount = 2
|
||||
sampleRate = 48000
|
||||
pcmEncoding = -1
|
||||
encoderDelay = 0
|
||||
encoderPadding = 0
|
||||
subsampleOffsetUs = 9223372036854775807
|
||||
selectionFlags = 0
|
||||
language = und
|
||||
drmInitData = -1683793742
|
||||
metadata = null
|
||||
initializationData:
|
||||
total output bytes = 5632
|
||||
sample count = 13
|
||||
sample 0:
|
||||
time = 240000
|
||||
flags = 1073741825
|
||||
data = length 384, hash 87F3C13B
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 1:
|
||||
time = 280000
|
||||
flags = 1073741825
|
||||
data = length 384, hash 54333DC5
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 2:
|
||||
time = 320000
|
||||
flags = 1073741825
|
||||
data = length 384, hash 1C49C4B3
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 3:
|
||||
time = 360000
|
||||
flags = 1073741825
|
||||
data = length 384, hash 5FDC324F
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 4:
|
||||
time = 400000
|
||||
flags = 1073741825
|
||||
data = length 384, hash B2A7F444
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 5:
|
||||
time = 440000
|
||||
flags = 1073741825
|
||||
data = length 512, hash 5FD06C1E
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 6:
|
||||
time = 480000
|
||||
flags = 1073741825
|
||||
data = length 537, hash 7ABBDCB
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 7:
|
||||
time = 520000
|
||||
flags = 1073741825
|
||||
data = length 616, hash 3F657E23
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 8:
|
||||
time = 560000
|
||||
flags = 1073741825
|
||||
data = length 453, hash 8FCF0529
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 9:
|
||||
time = 600000
|
||||
flags = 1073741825
|
||||
data = length 383, hash 7F8C9E19
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 10:
|
||||
time = 640000
|
||||
flags = 1073741825
|
||||
data = length 410, hash 3727858D
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 11:
|
||||
time = 680000
|
||||
flags = 1073741825
|
||||
data = length 391, hash E2931212
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 12:
|
||||
time = 720000
|
||||
flags = 1073741825
|
||||
data = length 410, hash 63017D46
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
tracksEnded = true
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
seekMap:
|
||||
isSeekable = true
|
||||
duration = 760000
|
||||
getPosition(0) = [[timeUs=0, position=950]]
|
||||
numberOfTracks = 1
|
||||
track 0:
|
||||
format:
|
||||
bitrate = -1
|
||||
id = 1
|
||||
containerMimeType = null
|
||||
sampleMimeType = audio/ac4
|
||||
maxInputSize = -1
|
||||
width = -1
|
||||
height = -1
|
||||
frameRate = -1.0
|
||||
rotationDegrees = 0
|
||||
pixelWidthHeightRatio = 1.0
|
||||
channelCount = 2
|
||||
sampleRate = 48000
|
||||
pcmEncoding = -1
|
||||
encoderDelay = 0
|
||||
encoderPadding = 0
|
||||
subsampleOffsetUs = 9223372036854775807
|
||||
selectionFlags = 0
|
||||
language = und
|
||||
drmInitData = -1683793742
|
||||
metadata = null
|
||||
initializationData:
|
||||
total output bytes = 3200
|
||||
sample count = 7
|
||||
sample 0:
|
||||
time = 480000
|
||||
flags = 1073741825
|
||||
data = length 537, hash 7ABBDCB
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 1:
|
||||
time = 520000
|
||||
flags = 1073741825
|
||||
data = length 616, hash 3F657E23
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 2:
|
||||
time = 560000
|
||||
flags = 1073741825
|
||||
data = length 453, hash 8FCF0529
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 3:
|
||||
time = 600000
|
||||
flags = 1073741825
|
||||
data = length 383, hash 7F8C9E19
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 4:
|
||||
time = 640000
|
||||
flags = 1073741825
|
||||
data = length 410, hash 3727858D
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 5:
|
||||
time = 680000
|
||||
flags = 1073741825
|
||||
data = length 391, hash E2931212
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
sample 6:
|
||||
time = 720000
|
||||
flags = 1073741825
|
||||
data = length 410, hash 63017D46
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
tracksEnded = true
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
seekMap:
|
||||
isSeekable = true
|
||||
duration = 760000
|
||||
getPosition(0) = [[timeUs=0, position=950]]
|
||||
numberOfTracks = 1
|
||||
track 0:
|
||||
format:
|
||||
bitrate = -1
|
||||
id = 1
|
||||
containerMimeType = null
|
||||
sampleMimeType = audio/ac4
|
||||
maxInputSize = -1
|
||||
width = -1
|
||||
height = -1
|
||||
frameRate = -1.0
|
||||
rotationDegrees = 0
|
||||
pixelWidthHeightRatio = 1.0
|
||||
channelCount = 2
|
||||
sampleRate = 48000
|
||||
pcmEncoding = -1
|
||||
encoderDelay = 0
|
||||
encoderPadding = 0
|
||||
subsampleOffsetUs = 9223372036854775807
|
||||
selectionFlags = 0
|
||||
language = und
|
||||
drmInitData = -1683793742
|
||||
metadata = null
|
||||
initializationData:
|
||||
total output bytes = 410
|
||||
sample count = 1
|
||||
sample 0:
|
||||
time = 720000
|
||||
flags = 1073741825
|
||||
data = length 410, hash 63017D46
|
||||
crypto mode = 1
|
||||
encryption key = length 16, hash 9FDDEA52
|
||||
tracksEnded = true
|
||||
|
|
@ -57,6 +57,12 @@ public final class FragmentedMp4ExtractorTest {
|
|||
getExtractorFactory(Collections.emptyList()), "mp4/sample_ac4_fragmented.mp4");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSampleWithProtectedAc4Track() throws Exception {
|
||||
ExtractorAsserts.assertBehavior(
|
||||
getExtractorFactory(Collections.emptyList()), "mp4/sample_ac4_protected.mp4");
|
||||
}
|
||||
|
||||
private static ExtractorFactory getExtractorFactory(final List<Format> closedCaptionFormats) {
|
||||
return () -> new FragmentedMp4Extractor(0, null, null, null, closedCaptionFormats);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue