Back to Exoplayer

ColorInfo.Builder (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/video/ColorInfo.Builder.html

latest4.6 KB
Original Source

Package com.google.android.exoplayer2.video

Class ColorInfo.Builder


public static final classColorInfo.Builderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

Builds ColorInfo instances.

Use ColorInfo.buildUpon() to obtain a builder representing an existing ColorInfo.

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 | | --- | --- | --- | | ColorInfo | build() | Builds a new ColorInfo instance. | | ColorInfo.Builder | setColorRange​(@com.google.android.exoplayer2.C.ColorRange int colorRange) | Sets the color range. | | ColorInfo.Builder | setColorSpace​(@com.google.android.exoplayer2.C.ColorSpace int colorSpace) | Sets the color space. | | ColorInfo.Builder | setColorTransfer​(@com.google.android.exoplayer2.C.ColorTransfer int colorTransfer) | Sets the color transfer. | | ColorInfo.Builder | setHdrStaticInfo​(byte[] hdrStaticInfo) | Sets the HdrStaticInfo as defined in CTA-861.3. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

Builder

public Builder()

Creates a new instance with default values.

Method Detail

- 

setColorSpace

@CanIgnoreReturnValue
public[ColorInfo.Builder](ColorInfo.Builder.html "class in com.google.android.exoplayer2.video")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_BT2020 or Format.NO_VALUE if unknown.

Parameters:colorSpace - The color space. The default value is Format.NO_VALUE.Returns:This Builder.

- 

setColorRange

@CanIgnoreReturnValue
public[ColorInfo.Builder](ColorInfo.Builder.html "class in com.google.android.exoplayer2.video")setColorRange​(@com.google.android.exoplayer2.C.ColorRange int colorRange)

Sets the color range.

Valid values are C.COLOR_RANGE_LIMITED, C.COLOR_RANGE_FULL or Format.NO_VALUE if unknown.

Parameters:colorRange - The color range. The default value is Format.NO_VALUE.Returns:This Builder.

- 

setColorTransfer

@CanIgnoreReturnValue
public[ColorInfo.Builder](ColorInfo.Builder.html "class in com.google.android.exoplayer2.video")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_SDR or Format.NO_VALUE if unknown.

Parameters:colorTransfer - The color transfer. The default value is Format.NO_VALUE.Returns:This Builder.

- 

setHdrStaticInfo

@CanIgnoreReturnValue
public[ColorInfo.Builder](ColorInfo.Builder.html "class in com.google.android.exoplayer2.video")setHdrStaticInfo​(@Nullable
                                          byte[] hdrStaticInfo)

Sets the HdrStaticInfo as defined in CTA-861.3. Parameters:hdrStaticInfo - The HdrStaticInfo. The default value is null.Returns:This Builder.

- 

build

public[ColorInfo](ColorInfo.html "class in com.google.android.exoplayer2.video")build()

Builds a new ColorInfo instance.