Back to Exoplayer

ColorInfo (ExoPlayer library)

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

latest11.4 KB
Original Source

Package com.google.android.exoplayer2.video

Class ColorInfo

  • java.lang.Object

    • com.google.android.exoplayer2.video.ColorInfo
  • All Implemented Interfaces:Bundleable


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classColorInfoextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[Bundleable](../Bundleable.html "interface in com.google.android.exoplayer2")

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

Stores color info.

When a null ColorInfo instance is used, this often represents a generic SDR_BT709_LIMITED instance.

Nested Class Summary

Nested Classes | Modifier and Type | Class | Description | | --- | --- | --- | | static class | ColorInfo.Builder | Deprecated.

Builds ColorInfo instances. |

- 

Nested classes/interfaces inherited from interface com.google.android.exoplayer2.Bundleable

Bundleable.Creator<T extends Bundleable>

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | @com.google.android.exoplayer2.C.ColorRange int | colorRange | Deprecated.

The C.ColorRange. | | @com.google.android.exoplayer2.C.ColorSpace int | colorSpace | Deprecated.

The C.ColorSpace. | | @com.google.android.exoplayer2.C.ColorTransfer int | colorTransfer | Deprecated.

The C.ColorTransfer. | | static Bundleable.Creator<ColorInfo> | CREATOR | Deprecated. | | byte[] | hdrStaticInfo | Deprecated.

HdrStaticInfo as defined in CTA-861.3, or null if none specified. | | static ColorInfo | SDR_BT709_LIMITED | Deprecated.

Color info representing SDR BT.709 limited range, which is a common SDR video color format. | | static ColorInfo | SRGB_BT709_FULL | Deprecated.

Color info representing SDR sRGB in accordance with DataSpace.DATASPACE_SRGB, which is a common SDR image color format. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | ColorInfo​(@com.google.android.exoplayer2.C.ColorSpace int colorSpace, @com.google.android.exoplayer2.C.ColorRange int colorRange, @com.google.android.exoplayer2.C.ColorTransfer int colorTransfer, byte[] hdrStaticInfo) | Deprecated. Use ColorInfo.Builder.

|

Method Summary

All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | ColorInfo.Builder | buildUpon() | Deprecated.

Returns a ColorInfo.Builder initialized with the values of this instance. | | boolean | equals​(Object obj) | Deprecated. | | int | hashCode() | Deprecated. | | static @com.google.android.exoplayer2.C.ColorSpace int | isoColorPrimariesToColorSpace​(int isoColorPrimaries) | Deprecated.

Returns the C.ColorSpace corresponding to the given ISO color primary code, as per table A.7.21.1 in Rec. | | static @com.google.android.exoplayer2.C.ColorTransfer int | isoTransferCharacteristicsToColorTransfer​(int isoTransferCharacteristics) | Deprecated.

Returns the C.ColorTransfer corresponding to the given ISO transfer characteristics code, as per table A.7.21.2 in Rec. | | static boolean | isTransferHdr​(ColorInfo colorInfo) | Deprecated.

Returns whether the ColorInfo uses an HDR C.ColorTransfer. | | boolean | isValid() | Deprecated.

Returns whether this instance is valid. | | Bundle | toBundle() | Deprecated.

Returns a Bundle representing the information stored in this object. | | String | toLogString() | Deprecated.

Returns a prettier String than toString(), intended for logging. | | String | toString() | Deprecated. |

- 

Methods inherited from class java.lang.Object

clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Field Detail

- 

SDR_BT709_LIMITED

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

Deprecated.

Color info representing SDR BT.709 limited range, which is a common SDR video color format.

- 

SRGB_BT709_FULL

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

Deprecated.

Color info representing SDR sRGB in accordance with DataSpace.DATASPACE_SRGB, which is a common SDR image color format.

- 

colorSpace

public final @com.google.android.exoplayer2.C.ColorSpace int colorSpace

Deprecated.

The C.ColorSpace.

- 

colorRange

public final @com.google.android.exoplayer2.C.ColorRange int colorRange

Deprecated.

The C.ColorRange.

- 

colorTransfer

public final @com.google.android.exoplayer2.C.ColorTransfer int colorTransfer

Deprecated.

The C.ColorTransfer.

- 

hdrStaticInfo

@Nullable
public final byte[] hdrStaticInfo

Deprecated.

HdrStaticInfo as defined in CTA-861.3, or null if none specified.

- 

CREATOR

public static final[Bundleable.Creator](../Bundleable.Creator.html "interface in com.google.android.exoplayer2")<[ColorInfo](ColorInfo.html "class in com.google.android.exoplayer2.video")> CREATOR

Deprecated.

Constructor Detail

- 

ColorInfo

[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public ColorInfo​(@com.google.android.exoplayer2.C.ColorSpace int colorSpace,
                 @com.google.android.exoplayer2.C.ColorRange int colorRange,
                 @com.google.android.exoplayer2.C.ColorTransfer int colorTransfer,
                 @Nullable
                 byte[] hdrStaticInfo)

Deprecated. Use ColorInfo.Builder.

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
public static @com.google.android.exoplayer2.C.ColorSpace int isoColorPrimariesToColorSpace​(int isoColorPrimaries)

Deprecated.

Returns the C.ColorSpace corresponding to the given ISO color primary code, as per table A.7.21.1 in Rec. ITU-T T.832 (03/2009), or Format.NO_VALUE if no mapping can be made.

- 

isoTransferCharacteristicsToColorTransfer

@Pure
public static @com.google.android.exoplayer2.C.ColorTransfer int isoTransferCharacteristicsToColorTransfer​(int isoTransferCharacteristics)

Deprecated.

Returns the C.ColorTransfer corresponding to the given ISO transfer characteristics code, as per table A.7.21.2 in Rec. ITU-T T.832 (03/2009), or Format.NO_VALUE if no mapping can be made.

- 

isTransferHdr

public static boolean isTransferHdr​(@Nullable[ColorInfo](ColorInfo.html "class in com.google.android.exoplayer2.video")colorInfo)

Deprecated.

Returns whether the ColorInfo uses an HDR C.ColorTransfer.

C.COLOR_TRANSFER_LINEAR is not considered to be an HDR C.ColorTransfer, because it may represent either SDR or HDR contents.

- 

buildUpon

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

Deprecated.

Returns a ColorInfo.Builder initialized with the values of this instance.

- 

isValid

public boolean isValid()

Deprecated.

Returns whether this instance is valid.

This instance is valid if no members are Format.NO_VALUE.

- 

toLogString

public[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")toLogString()

Deprecated.

Returns a prettier String than toString(), intended for logging. See Also:Format.toLogString(Format)

- 

equals

public boolean equals​(@Nullable[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")obj)

Deprecated. Overrides:equals in class Object

- 

toString

public[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")toString()

Deprecated. Overrides:toString in class Object

- 

hashCode

public int hashCode()

Deprecated. Overrides:hashCode in class Object

- 

toBundle

public[Bundle](https://developer.android.com/reference/android/os/Bundle.html "class or interface in android.os")toBundle()

Deprecated.

Description copied from interface: Bundleable

Returns a Bundle representing the information stored in this object. Specified by:toBundle in interface Bundleable