ColorInfo.Builder


public final class ColorInfo.Builder


Builds ColorInfo instances.

Use buildUpon to obtain a builder representing an existing .

Summary

Public constructors

Creates a new instance with default values.

Public methods

ColorInfo

Builds a new ColorInfo instance.

ColorInfo.Builder

Sets chroma bit depth.

ColorInfo.Builder

Sets the color range.

ColorInfo.Builder

Sets the color space.

ColorInfo.Builder

Sets the color transfer.

ColorInfo.Builder

Sets the HdrStaticInfo as defined in CTA-861.3.

ColorInfo.Builder

Sets the luma bit depth.

Public constructors

Builder

public Builder()

Creates a new instance with default values.

Public methods

build

public ColorInfo build()

Builds a new ColorInfo instance.

setChromaBitdepth

@CanIgnoreReturnValue
public ColorInfo.Builder setChromaBitdepth(int chromaBitdepth)

Sets chroma bit depth.

Parameters
int chromaBitdepth

The chromaBitdepth. The default value is NO_VALUE.

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 NO_VALUE.

Returns
ColorInfo.Builder

This Builder.

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 NO_VALUE.

Returns
ColorInfo.Builder

This Builder.

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 NO_VALUE.

Returns
ColorInfo.Builder

This Builder.

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 null.

Returns
ColorInfo.Builder

This Builder.

setLumaBitdepth

@CanIgnoreReturnValue
public ColorInfo.Builder setLumaBitdepth(int lumaBitdepth)

Sets the luma bit depth.

Parameters
int lumaBitdepth

The lumaBitdepth. The default value is NO_VALUE.

Returns
ColorInfo.Builder

The builder.