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
e8498054
authored
May 26, 2021
by
aquilescanta
Committed by
Oliver Woodman
May 27, 2021
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Add ColorInfo to extractor tests' format serialization
PiperOrigin-RevId: 375992627
parent
095e2feb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
testutils/src/main/java/com/google/android/exoplayer2/testutil/DumpableFormat.java
testutils/src/main/java/com/google/android/exoplayer2/testutil/DumpableFormat.java
View file @
e8498054
...
@@ -18,6 +18,7 @@ package com.google.android.exoplayer2.testutil;
...
@@ -18,6 +18,7 @@ package com.google.android.exoplayer2.testutil;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.google.android.exoplayer2.Format
;
import
com.google.android.exoplayer2.Format
;
import
com.google.android.exoplayer2.util.Util
;
import
com.google.android.exoplayer2.util.Util
;
import
com.google.android.exoplayer2.video.ColorInfo
;
import
com.google.common.base.Function
;
import
com.google.common.base.Function
;
import
org.checkerframework.checker.nullness.compatqual.NullableType
;
import
org.checkerframework.checker.nullness.compatqual.NullableType
;
...
@@ -48,6 +49,15 @@ public final class DumpableFormat implements Dumper.Dumpable {
...
@@ -48,6 +49,15 @@ public final class DumpableFormat implements Dumper.Dumpable {
addIfNonDefault
(
dumper
,
"frameRate"
,
format
->
format
.
frameRate
);
addIfNonDefault
(
dumper
,
"frameRate"
,
format
->
format
.
frameRate
);
addIfNonDefault
(
dumper
,
"rotationDegrees"
,
format
->
format
.
rotationDegrees
);
addIfNonDefault
(
dumper
,
"rotationDegrees"
,
format
->
format
.
rotationDegrees
);
addIfNonDefault
(
dumper
,
"pixelWidthHeightRatio"
,
format
->
format
.
pixelWidthHeightRatio
);
addIfNonDefault
(
dumper
,
"pixelWidthHeightRatio"
,
format
->
format
.
pixelWidthHeightRatio
);
@Nullable
ColorInfo
colorInfo
=
format
.
colorInfo
;
if
(
colorInfo
!=
null
)
{
dumper
.
startBlock
(
"colorInfo"
);
dumper
.
add
(
"colorSpace"
,
colorInfo
.
colorSpace
);
dumper
.
add
(
"colorRange"
,
colorInfo
.
colorRange
);
dumper
.
add
(
"colorTransfer"
,
colorInfo
.
colorTransfer
);
dumper
.
add
(
"hdrStaticInfo"
,
colorInfo
.
hdrStaticInfo
);
dumper
.
endBlock
();
}
addIfNonDefault
(
dumper
,
"channelCount"
,
format
->
format
.
channelCount
);
addIfNonDefault
(
dumper
,
"channelCount"
,
format
->
format
.
channelCount
);
addIfNonDefault
(
dumper
,
"sampleRate"
,
format
->
format
.
sampleRate
);
addIfNonDefault
(
dumper
,
"sampleRate"
,
format
->
format
.
sampleRate
);
addIfNonDefault
(
dumper
,
"pcmEncoding"
,
format
->
format
.
pcmEncoding
);
addIfNonDefault
(
dumper
,
"pcmEncoding"
,
format
->
format
.
pcmEncoding
);
...
...
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