ColorInfo.Builder
public final class ColorInfo.Builder
Builds ColorInfo instances.
Use buildUpon to obtain a builder representing an existing ColorInfo.
Summary
Public constructors |
|---|
Builder()Creates a new instance with default values. |
Public methods |
|
|---|---|
ColorInfo |
build()Builds a new |
ColorInfo.Builder |
@CanIgnoreReturnValueSets chroma bit depth. |
ColorInfo.Builder |
@CanIgnoreReturnValueSets the color range. |
ColorInfo.Builder |
@CanIgnoreReturnValueSets the color space. |
ColorInfo.Builder |
@CanIgnoreReturnValueSets the color transfer. |
ColorInfo.Builder |
@CanIgnoreReturnValueSets the HdrStaticInfo as defined in CTA-861.3. |
ColorInfo.Builder |
@CanIgnoreReturnValueSets the luma bit depth. |
Public constructors
Public methods
setChromaBitdepth
@CanIgnoreReturnValue
public ColorInfo.Builder setChromaBitdepth(int chromaBitdepth)
Sets chroma bit depth.
| Parameters | |
|---|---|
int chromaBitdepth |
The chromaBitdepth. The default value is |
| Returns | |
|---|---|
ColorInfo.Builder |
The builder. |
setColorRange
@CanIgnoreReturnValue
public ColorInfo.Builder setColorRange(@C.ColorRange int colorRange)
Sets the color range.
Valid values are COLOR_RANGE_LIMITED, COLOR_RANGE_FULL or NO_VALUE if unknown.
| Parameters | |
|---|---|
@C.ColorRange int colorRange |
The color range. The default value is |
| Returns | |
|---|---|
ColorInfo.Builder |
This |
setColorSpace
@CanIgnoreReturnValue
public ColorInfo.Builder setColorSpace(@C.ColorSpace int colorSpace)
Sets the color space.
Valid values are COLOR_SPACE_BT601, COLOR_SPACE_BT709, COLOR_SPACE_BT2020 or NO_VALUE if unknown.
| Parameters | |
|---|---|
@C.ColorSpace int colorSpace |
The color space. The default value is |
| Returns | |
|---|---|
ColorInfo.Builder |
This |
setColorTransfer
@CanIgnoreReturnValue
public ColorInfo.Builder setColorTransfer(@C.ColorTransfer int colorTransfer)
Sets the color transfer.
Valid values are COLOR_TRANSFER_LINEAR, COLOR_TRANSFER_HLG, COLOR_TRANSFER_ST2084, COLOR_TRANSFER_SDR or NO_VALUE if unknown.
| Parameters | |
|---|---|
@C.ColorTransfer int colorTransfer |
The color transfer. The default value is |
| Returns | |
|---|---|
ColorInfo.Builder |
This |
setHdrStaticInfo
@CanIgnoreReturnValue
public ColorInfo.Builder setHdrStaticInfo(@Nullable byte[] hdrStaticInfo)
Sets the HdrStaticInfo as defined in CTA-861.3.
| Parameters | |
|---|---|
@Nullable byte[] hdrStaticInfo |
The HdrStaticInfo. The default value is |
| Returns | |
|---|---|
ColorInfo.Builder |
This |
setLumaBitdepth
@CanIgnoreReturnValue
public ColorInfo.Builder setLumaBitdepth(int lumaBitdepth)
Sets the luma bit depth.
| Parameters | |
|---|---|
int lumaBitdepth |
The lumaBitdepth. The default value is |
| Returns | |
|---|---|
ColorInfo.Builder |
The builder. |