Class ColorInfo.Builder
- java.lang.Object
-
- com.google.android.exoplayer2.video.ColorInfo.Builder
-
- Enclosing class:
- ColorInfo
public static final class ColorInfo.Builder extends Object
BuildsColorInfo
instances.Use
ColorInfo.buildUpon()
to obtain a builder representing an existingColorInfo
.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Creates a new instance with default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorInfo
build()
Builds a newColorInfo
instance.ColorInfo.Builder
setColorRange(@com.google.android.exoplayer2.C.ColorRange int colorRange)
Sets the color range.ColorInfo.Builder
setColorSpace(@com.google.android.exoplayer2.C.ColorSpace int colorSpace)
Sets the color space.ColorInfo.Builder
setColorTransfer(@com.google.android.exoplayer2.C.ColorTransfer int colorTransfer)
Sets the color transfer.ColorInfo.Builder
setHdrStaticInfo(byte[] hdrStaticInfo)
Sets the HdrStaticInfo as defined in CTA-861.3.
-
-
-
Method Detail
-
setColorSpace
@CanIgnoreReturnValue public ColorInfo.Builder setColorSpace(@com.google.android.exoplayer2.C.ColorSpace int colorSpace)
Sets the color space.Valid values are
C.COLOR_SPACE_BT601
,C.COLOR_SPACE_BT709
,C.COLOR_SPACE_BT2020
orFormat.NO_VALUE
if unknown.- Parameters:
colorSpace
- The color space. The default value isFormat.NO_VALUE
.- Returns:
- This
Builder
.
-
setColorRange
@CanIgnoreReturnValue public ColorInfo.Builder setColorRange(@com.google.android.exoplayer2.C.ColorRange int colorRange)
Sets the color range.Valid values are
C.COLOR_RANGE_LIMITED
,C.COLOR_RANGE_FULL
orFormat.NO_VALUE
if unknown.- Parameters:
colorRange
- The color range. The default value isFormat.NO_VALUE
.- Returns:
- This
Builder
.
-
setColorTransfer
@CanIgnoreReturnValue public ColorInfo.Builder setColorTransfer(@com.google.android.exoplayer2.C.ColorTransfer int colorTransfer)
Sets the color transfer.Valid values are
C.COLOR_TRANSFER_LINEAR
,C.COLOR_TRANSFER_HLG
,C.COLOR_TRANSFER_ST2084
,C.COLOR_TRANSFER_SDR
orFormat.NO_VALUE
if unknown.- Parameters:
colorTransfer
- The color transfer. The default value isFormat.NO_VALUE
.- Returns:
- This
Builder
.
-
setHdrStaticInfo
@CanIgnoreReturnValue public ColorInfo.Builder setHdrStaticInfo(@Nullable byte[] hdrStaticInfo)
Sets the HdrStaticInfo as defined in CTA-861.3.- Parameters:
hdrStaticInfo
- The HdrStaticInfo. The default value isnull
.- Returns:
- This
Builder
.
-
-