Class ColorInfo.Builder
- java.lang.Object
-
- com.google.android.exoplayer2.video.ColorInfo.Builder
-
- Enclosing class:
- ColorInfo
public static final class ColorInfo.Builder extends Object
BuildsColorInfoinstances.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 ColorInfobuild()Builds a newColorInfoinstance.ColorInfo.BuildersetColorRange(@com.google.android.exoplayer2.C.ColorRange int colorRange)Sets the color range.ColorInfo.BuildersetColorSpace(@com.google.android.exoplayer2.C.ColorSpace int colorSpace)Sets the color space.ColorInfo.BuildersetColorTransfer(@com.google.android.exoplayer2.C.ColorTransfer int colorTransfer)Sets the color transfer.ColorInfo.BuildersetHdrStaticInfo(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_BT2020orFormat.NO_VALUEif 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_FULLorFormat.NO_VALUEif 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_SDRorFormat.NO_VALUEif 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.
-
-