Class ColorInfo

  • All Implemented Interfaces:
    Bundleable

    @Deprecated
    public final class ColorInfo
    extends Object
    implements Bundleable
    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.

    • Field Detail

      • SDR_BT709_LIMITED

        public static final ColorInfo 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 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.
      • colorRange

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

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

        @Nullable
        public final byte[] hdrStaticInfo
        Deprecated.
        HdrStaticInfo as defined in CTA-861.3, or null if none specified.
    • Constructor Detail

      • ColorInfo

        @Deprecated
        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.
        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.
      • isValid

        public boolean isValid()
        Deprecated.
        Returns whether this instance is valid.

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

      • equals

        public boolean equals​(@Nullable
                              Object obj)
        Deprecated.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class Object
      • toBundle

        public Bundle toBundle()
        Deprecated.
        Description copied from interface: Bundleable
        Returns a Bundle representing the information stored in this object.
        Specified by:
        toBundle in interface Bundleable