Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
85e4137b
authored
May 26, 2021
by
aquilescanta
Committed by
Oliver Woodman
May 27, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add test for ColorInfo in MP4
PiperOrigin-RevId: 375992816
parent
e8498054
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
600 additions
and
0 deletions
library/extractor/src/test/java/com/google/android/exoplayer2/extractor/mp4/Mp4ExtractorTest.java
testdata/src/test/assets/extractordumps/mp4/sample_with_color_info.mp4.0.dump
testdata/src/test/assets/extractordumps/mp4/sample_with_color_info.mp4.1.dump
testdata/src/test/assets/extractordumps/mp4/sample_with_color_info.mp4.2.dump
testdata/src/test/assets/extractordumps/mp4/sample_with_color_info.mp4.3.dump
testdata/src/test/assets/extractordumps/mp4/sample_with_color_info.mp4.unknown_length.dump
testdata/src/test/assets/media/mp4/sample_with_color_info.mp4
library/extractor/src/test/java/com/google/android/exoplayer2/extractor/mp4/Mp4ExtractorTest.java
View file @
85e4137b
...
...
@@ -96,4 +96,10 @@ public final class Mp4ExtractorTest {
ExtractorAsserts
.
assertBehavior
(
Mp4Extractor:
:
new
,
"media/mp4/sample_mpegh_mhm1.mp4"
,
simulationConfig
);
}
@Test
public
void
mp4SampleWithColorInfo
()
throws
Exception
{
ExtractorAsserts
.
assertBehavior
(
Mp4Extractor:
:
new
,
"media/mp4/sample_with_color_info.mp4"
,
simulationConfig
);
}
}
testdata/src/test/assets/extractordumps/mp4/sample_with_color_info.mp4.0.dump
0 → 100644
View file @
85e4137b
seekMap:
isSeekable = true
duration = 298333
getPosition(0) = [[timeUs=0, position=36]]
getPosition(1) = [[timeUs=0, position=36]]
getPosition(149166) = [[timeUs=0, position=36]]
getPosition(298333) = [[timeUs=0, position=36]]
numberOfTracks = 2
track 0:
total output bytes = 122447
sample count = 9
format 0:
id = 1
sampleMimeType = video/dolby-vision
codecs = hev1.08.04
maxInputSize = 40550
width = 1920
height = 1080
frameRate = 30.167633
rotationDegrees = 90
colorInfo:
colorSpace = 6
colorRange = 2
colorTransfer = 7
hdrStaticInfo = length 0, hash 0
initializationData:
data = length 526, hash 7B3FC433
sample 0:
time = 0
flags = 1
data = length 40520, hash 6B3C7ED3
sample 1:
time = 133333
flags = 0
data = length 11652, hash 24B95831
sample 2:
time = 66666
flags = 0
data = length 9546, hash A8965647
sample 3:
time = 33333
flags = 0
data = length 7587, hash 624A0ECE
sample 4:
time = 100000
flags = 0
data = length 8584, hash 8F104D88
sample 5:
time = 266666
flags = 0
data = length 18275, hash E7639088
sample 6:
time = 200000
flags = 0
data = length 12112, hash 7CCEBA45
sample 7:
time = 166666
flags = 0
data = length 7180, hash 4E965EBB
sample 8:
time = 233333
flags = 536870912
data = length 6991, hash 84F4EA41
track 1:
total output bytes = 5993
sample count = 15
format 0:
id = 2
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
maxInputSize = 568
channelCount = 2
sampleRate = 44100
encoderPadding = 2204
language = und
initializationData:
data = length 2, hash 5FF
sample 0:
time = 0
flags = 1
data = length 6, hash 6D3881D1
sample 1:
time = 23219
flags = 1
data = length 272, hash E2040CE0
sample 2:
time = 46439
flags = 1
data = length 476, hash E09EC12F
sample 3:
time = 69659
flags = 1
data = length 445, hash D23AB210
sample 4:
time = 92879
flags = 1
data = length 487, hash F68FF5DD
sample 5:
time = 116099
flags = 1
data = length 446, hash 62477362
sample 6:
time = 139319
flags = 1
data = length 429, hash BA59B5B5
sample 7:
time = 162539
flags = 1
data = length 431, hash 1A0A41B3
sample 8:
time = 185759
flags = 1
data = length 538, hash 9F604E03
sample 9:
time = 208979
flags = 1
data = length 485, hash 94C855CD
sample 10:
time = 232199
flags = 1
data = length 460, hash F6AEAF79
sample 11:
time = 255419
flags = 1
data = length 444, hash F513A8A9
sample 12:
time = 278639
flags = 1
data = length 436, hash 2E976590
sample 13:
time = 301859
flags = 1
data = length 451, hash 45B8B663
sample 14:
time = 325079
flags = 536870913
data = length 187, hash 833755BD
tracksEnded = true
testdata/src/test/assets/extractordumps/mp4/sample_with_color_info.mp4.1.dump
0 → 100644
View file @
85e4137b
seekMap:
isSeekable = true
duration = 298333
getPosition(0) = [[timeUs=0, position=36]]
getPosition(1) = [[timeUs=0, position=36]]
getPosition(149166) = [[timeUs=0, position=36]]
getPosition(298333) = [[timeUs=0, position=36]]
numberOfTracks = 2
track 0:
total output bytes = 122447
sample count = 9
format 0:
id = 1
sampleMimeType = video/dolby-vision
codecs = hev1.08.04
maxInputSize = 40550
width = 1920
height = 1080
frameRate = 30.167633
rotationDegrees = 90
colorInfo:
colorSpace = 6
colorRange = 2
colorTransfer = 7
hdrStaticInfo = length 0, hash 0
initializationData:
data = length 526, hash 7B3FC433
sample 0:
time = 0
flags = 1
data = length 40520, hash 6B3C7ED3
sample 1:
time = 133333
flags = 0
data = length 11652, hash 24B95831
sample 2:
time = 66666
flags = 0
data = length 9546, hash A8965647
sample 3:
time = 33333
flags = 0
data = length 7587, hash 624A0ECE
sample 4:
time = 100000
flags = 0
data = length 8584, hash 8F104D88
sample 5:
time = 266666
flags = 0
data = length 18275, hash E7639088
sample 6:
time = 200000
flags = 0
data = length 12112, hash 7CCEBA45
sample 7:
time = 166666
flags = 0
data = length 7180, hash 4E965EBB
sample 8:
time = 233333
flags = 536870912
data = length 6991, hash 84F4EA41
track 1:
total output bytes = 4794
sample count = 11
format 0:
id = 2
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
maxInputSize = 568
channelCount = 2
sampleRate = 44100
encoderPadding = 2204
language = und
initializationData:
data = length 2, hash 5FF
sample 0:
time = 92879
flags = 1
data = length 487, hash F68FF5DD
sample 1:
time = 116099
flags = 1
data = length 446, hash 62477362
sample 2:
time = 139319
flags = 1
data = length 429, hash BA59B5B5
sample 3:
time = 162539
flags = 1
data = length 431, hash 1A0A41B3
sample 4:
time = 185759
flags = 1
data = length 538, hash 9F604E03
sample 5:
time = 208979
flags = 1
data = length 485, hash 94C855CD
sample 6:
time = 232199
flags = 1
data = length 460, hash F6AEAF79
sample 7:
time = 255419
flags = 1
data = length 444, hash F513A8A9
sample 8:
time = 278639
flags = 1
data = length 436, hash 2E976590
sample 9:
time = 301859
flags = 1
data = length 451, hash 45B8B663
sample 10:
time = 325079
flags = 536870913
data = length 187, hash 833755BD
tracksEnded = true
testdata/src/test/assets/extractordumps/mp4/sample_with_color_info.mp4.2.dump
0 → 100644
View file @
85e4137b
seekMap:
isSeekable = true
duration = 298333
getPosition(0) = [[timeUs=0, position=36]]
getPosition(1) = [[timeUs=0, position=36]]
getPosition(149166) = [[timeUs=0, position=36]]
getPosition(298333) = [[timeUs=0, position=36]]
numberOfTracks = 2
track 0:
total output bytes = 122447
sample count = 9
format 0:
id = 1
sampleMimeType = video/dolby-vision
codecs = hev1.08.04
maxInputSize = 40550
width = 1920
height = 1080
frameRate = 30.167633
rotationDegrees = 90
colorInfo:
colorSpace = 6
colorRange = 2
colorTransfer = 7
hdrStaticInfo = length 0, hash 0
initializationData:
data = length 526, hash 7B3FC433
sample 0:
time = 0
flags = 1
data = length 40520, hash 6B3C7ED3
sample 1:
time = 133333
flags = 0
data = length 11652, hash 24B95831
sample 2:
time = 66666
flags = 0
data = length 9546, hash A8965647
sample 3:
time = 33333
flags = 0
data = length 7587, hash 624A0ECE
sample 4:
time = 100000
flags = 0
data = length 8584, hash 8F104D88
sample 5:
time = 266666
flags = 0
data = length 18275, hash E7639088
sample 6:
time = 200000
flags = 0
data = length 12112, hash 7CCEBA45
sample 7:
time = 166666
flags = 0
data = length 7180, hash 4E965EBB
sample 8:
time = 233333
flags = 536870912
data = length 6991, hash 84F4EA41
track 1:
total output bytes = 3001
sample count = 7
format 0:
id = 2
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
maxInputSize = 568
channelCount = 2
sampleRate = 44100
encoderPadding = 2204
language = und
initializationData:
data = length 2, hash 5FF
sample 0:
time = 185759
flags = 1
data = length 538, hash 9F604E03
sample 1:
time = 208979
flags = 1
data = length 485, hash 94C855CD
sample 2:
time = 232199
flags = 1
data = length 460, hash F6AEAF79
sample 3:
time = 255419
flags = 1
data = length 444, hash F513A8A9
sample 4:
time = 278639
flags = 1
data = length 436, hash 2E976590
sample 5:
time = 301859
flags = 1
data = length 451, hash 45B8B663
sample 6:
time = 325079
flags = 536870913
data = length 187, hash 833755BD
tracksEnded = true
testdata/src/test/assets/extractordumps/mp4/sample_with_color_info.mp4.3.dump
0 → 100644
View file @
85e4137b
seekMap:
isSeekable = true
duration = 298333
getPosition(0) = [[timeUs=0, position=36]]
getPosition(1) = [[timeUs=0, position=36]]
getPosition(149166) = [[timeUs=0, position=36]]
getPosition(298333) = [[timeUs=0, position=36]]
numberOfTracks = 2
track 0:
total output bytes = 122447
sample count = 9
format 0:
id = 1
sampleMimeType = video/dolby-vision
codecs = hev1.08.04
maxInputSize = 40550
width = 1920
height = 1080
frameRate = 30.167633
rotationDegrees = 90
colorInfo:
colorSpace = 6
colorRange = 2
colorTransfer = 7
hdrStaticInfo = length 0, hash 0
initializationData:
data = length 526, hash 7B3FC433
sample 0:
time = 0
flags = 1
data = length 40520, hash 6B3C7ED3
sample 1:
time = 133333
flags = 0
data = length 11652, hash 24B95831
sample 2:
time = 66666
flags = 0
data = length 9546, hash A8965647
sample 3:
time = 33333
flags = 0
data = length 7587, hash 624A0ECE
sample 4:
time = 100000
flags = 0
data = length 8584, hash 8F104D88
sample 5:
time = 266666
flags = 0
data = length 18275, hash E7639088
sample 6:
time = 200000
flags = 0
data = length 12112, hash 7CCEBA45
sample 7:
time = 166666
flags = 0
data = length 7180, hash 4E965EBB
sample 8:
time = 233333
flags = 536870912
data = length 6991, hash 84F4EA41
track 1:
total output bytes = 1074
sample count = 3
format 0:
id = 2
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
maxInputSize = 568
channelCount = 2
sampleRate = 44100
encoderPadding = 2204
language = und
initializationData:
data = length 2, hash 5FF
sample 0:
time = 278639
flags = 1
data = length 436, hash 2E976590
sample 1:
time = 301859
flags = 1
data = length 451, hash 45B8B663
sample 2:
time = 325079
flags = 536870913
data = length 187, hash 833755BD
tracksEnded = true
testdata/src/test/assets/extractordumps/mp4/sample_with_color_info.mp4.unknown_length.dump
0 → 100644
View file @
85e4137b
seekMap:
isSeekable = true
duration = 298333
getPosition(0) = [[timeUs=0, position=36]]
getPosition(1) = [[timeUs=0, position=36]]
getPosition(149166) = [[timeUs=0, position=36]]
getPosition(298333) = [[timeUs=0, position=36]]
numberOfTracks = 2
track 0:
total output bytes = 122447
sample count = 9
format 0:
id = 1
sampleMimeType = video/dolby-vision
codecs = hev1.08.04
maxInputSize = 40550
width = 1920
height = 1080
frameRate = 30.167633
rotationDegrees = 90
colorInfo:
colorSpace = 6
colorRange = 2
colorTransfer = 7
hdrStaticInfo = length 0, hash 0
initializationData:
data = length 526, hash 7B3FC433
sample 0:
time = 0
flags = 1
data = length 40520, hash 6B3C7ED3
sample 1:
time = 133333
flags = 0
data = length 11652, hash 24B95831
sample 2:
time = 66666
flags = 0
data = length 9546, hash A8965647
sample 3:
time = 33333
flags = 0
data = length 7587, hash 624A0ECE
sample 4:
time = 100000
flags = 0
data = length 8584, hash 8F104D88
sample 5:
time = 266666
flags = 0
data = length 18275, hash E7639088
sample 6:
time = 200000
flags = 0
data = length 12112, hash 7CCEBA45
sample 7:
time = 166666
flags = 0
data = length 7180, hash 4E965EBB
sample 8:
time = 233333
flags = 536870912
data = length 6991, hash 84F4EA41
track 1:
total output bytes = 5993
sample count = 15
format 0:
id = 2
sampleMimeType = audio/mp4a-latm
codecs = mp4a.40.2
maxInputSize = 568
channelCount = 2
sampleRate = 44100
encoderPadding = 2204
language = und
initializationData:
data = length 2, hash 5FF
sample 0:
time = 0
flags = 1
data = length 6, hash 6D3881D1
sample 1:
time = 23219
flags = 1
data = length 272, hash E2040CE0
sample 2:
time = 46439
flags = 1
data = length 476, hash E09EC12F
sample 3:
time = 69659
flags = 1
data = length 445, hash D23AB210
sample 4:
time = 92879
flags = 1
data = length 487, hash F68FF5DD
sample 5:
time = 116099
flags = 1
data = length 446, hash 62477362
sample 6:
time = 139319
flags = 1
data = length 429, hash BA59B5B5
sample 7:
time = 162539
flags = 1
data = length 431, hash 1A0A41B3
sample 8:
time = 185759
flags = 1
data = length 538, hash 9F604E03
sample 9:
time = 208979
flags = 1
data = length 485, hash 94C855CD
sample 10:
time = 232199
flags = 1
data = length 460, hash F6AEAF79
sample 11:
time = 255419
flags = 1
data = length 444, hash F513A8A9
sample 12:
time = 278639
flags = 1
data = length 436, hash 2E976590
sample 13:
time = 301859
flags = 1
data = length 451, hash 45B8B663
sample 14:
time = 325079
flags = 536870913
data = length 187, hash 833755BD
tracksEnded = true
testdata/src/test/assets/media/mp4/sample_with_color_info.mp4
0 → 100644
View file @
85e4137b
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment