Class ColorInfo
- java.lang.Object
-
- com.google.android.exoplayer2.video.ColorInfo
-
- All Implemented Interfaces:
Bundleable
public final class ColorInfo extends Object implements Bundleable
Stores color info.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable
Bundleable.Creator<T extends Bundleable>
-
-
Field Summary
Fields Modifier and Type Field Description intcolorRangeThe color range of the video.intcolorSpaceThe color space of the video.intcolorTransferThe color transfer characteristics of the video.static Bundleable.Creator<ColorInfo>CREATORbyte[]hdrStaticInfoHdrStaticInfo as defined in CTA-861.3, or null if none specified.
-
Constructor Summary
Constructors Constructor Description ColorInfo(int colorSpace, int colorRange, int colorTransfer, byte[] hdrStaticInfo)Constructs the ColorInfo.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)inthashCode()static intisoColorPrimariesToColorSpace(int isoColorPrimaries)Returns theC.ColorSpacecorresponding to the given ISO color primary code, as per table A.7.21.1 in Rec.static intisoTransferCharacteristicsToColorTransfer(int isoTransferCharacteristics)Returns theC.ColorTransfercorresponding to the given ISO transfer characteristics code, as per table A.7.21.2 in Rec.BundletoBundle()Returns aBundlerepresenting the information stored in this object.StringtoString()
-
-
-
Field Detail
-
colorSpace
@ColorSpace public final int colorSpace
The color space of the video. Valid values areC.COLOR_SPACE_BT601,C.COLOR_SPACE_BT709,C.COLOR_SPACE_BT2020orFormat.NO_VALUEif unknown.
-
colorRange
@ColorRange public final int colorRange
The color range of the video. Valid values areC.COLOR_RANGE_LIMITED,C.COLOR_RANGE_FULLorFormat.NO_VALUEif unknown.
-
colorTransfer
@ColorTransfer public final int colorTransfer
The color transfer characteristics of the video. Valid values areC.COLOR_TRANSFER_HLG,C.COLOR_TRANSFER_ST2084,C.COLOR_TRANSFER_SDRorFormat.NO_VALUEif unknown.
-
hdrStaticInfo
@Nullable public final byte[] hdrStaticInfo
HdrStaticInfo as defined in CTA-861.3, or null if none specified.
-
CREATOR
public static final Bundleable.Creator<ColorInfo> CREATOR
-
-
Constructor Detail
-
ColorInfo
public ColorInfo(@ColorSpace int colorSpace, @ColorRange int colorRange, @ColorTransfer int colorTransfer, @Nullable byte[] hdrStaticInfo)
Constructs the ColorInfo.- Parameters:
colorSpace- The color space of the video.colorRange- The color range of the video.colorTransfer- The color transfer characteristics of the video.hdrStaticInfo- HdrStaticInfo as defined in CTA-861.3, or null if none specified.
-
-
Method Detail
-
isoColorPrimariesToColorSpace
@Pure @ColorSpace public static int isoColorPrimariesToColorSpace(int isoColorPrimaries)
Returns theC.ColorSpacecorresponding to the given ISO color primary code, as per table A.7.21.1 in Rec. ITU-T T.832 (03/2009), orFormat.NO_VALUEif no mapping can be made.
-
isoTransferCharacteristicsToColorTransfer
@Pure @ColorTransfer public static int isoTransferCharacteristicsToColorTransfer(int isoTransferCharacteristics)
Returns theC.ColorTransfercorresponding to the given ISO transfer characteristics code, as per table A.7.21.2 in Rec. ITU-T T.832 (03/2009), orFormat.NO_VALUEif no mapping can be made.
-
toBundle
public Bundle toBundle()
Description copied from interface:BundleableReturns aBundlerepresenting the information stored in this object.- Specified by:
toBundlein interfaceBundleable
-
-