ColorInfo.Builder


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 functions

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

Builder()

Creates a new instance with default values.

Public functions

build

fun build(): ColorInfo!

Builds a new ColorInfo instance.

setChromaBitdepth

@CanIgnoreReturnValue
fun setChromaBitdepth(chromaBitdepth: Int): ColorInfo.Builder!

Sets chroma bit depth.

Parameters
chromaBitdepth: Int

The chromaBitdepth. The default value is NO_VALUE.

Returns
ColorInfo.Builder!

The builder.

setColorRange

@CanIgnoreReturnValue
fun setColorRange(colorRange: @C.ColorRange Int): ColorInfo.Builder!

Sets the color range.

Valid values are COLOR_RANGE_LIMITED, COLOR_RANGE_FULL or NO_VALUE if unknown.

Parameters
colorRange: @C.ColorRange Int

The color range. The default value is NO_VALUE.

Returns
ColorInfo.Builder!

This Builder.

setColorSpace

@CanIgnoreReturnValue
fun setColorSpace(@C.ColorSpace colorSpace: Int): ColorInfo.Builder!

Sets the color space.

Valid values are COLOR_SPACE_BT601, COLOR_SPACE_BT709, COLOR_SPACE_BT2020 or NO_VALUE if unknown.

Parameters
@C.ColorSpace colorSpace: Int

The color space. The default value is NO_VALUE.

Returns
ColorInfo.Builder!

This Builder.

setColorTransfer

@CanIgnoreReturnValue
fun setColorTransfer(@C.ColorTransfer colorTransfer: Int): ColorInfo.Builder!

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 colorTransfer: Int

The color transfer. The default value is NO_VALUE.

Returns
ColorInfo.Builder!

This Builder.

setHdrStaticInfo

@CanIgnoreReturnValue
fun setHdrStaticInfo(hdrStaticInfo: ByteArray?): ColorInfo.Builder!

Sets the HdrStaticInfo as defined in CTA-861.3.

Parameters
hdrStaticInfo: ByteArray?

The HdrStaticInfo. The default value is null.

Returns
ColorInfo.Builder!

This Builder.

setLumaBitdepth

@CanIgnoreReturnValue
fun setLumaBitdepth(lumaBitdepth: Int): ColorInfo.Builder!

Sets the luma bit depth.

Parameters
lumaBitdepth: Int

The lumaBitdepth. The default value is NO_VALUE.

Returns
ColorInfo.Builder!

The builder.