Package com.castlabs.sdk.base.subtitles.utilities

# Class Constants

java.lang.Object
com.castlabs.sdk.base.subtitles.utilities.Constants

public final class Constants extends Object
Defines constants used by the library.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static @interface`
  `Constants.AudioAllowedCapturePolicy`
  Capture policies for `AudioAttributes`.
  `static @interface`
  `Constants.AudioFlags`
  Flags for `AudioAttributes`.
  `static @interface`
  `Constants.AudioFocusGain`
  Audio focus types.
  `static @interface`
  `Constants.AudioUsage`
  Usage types for `AudioAttributes`.
  `static @interface`
  `Constants.BufferFlags`
  Flags which can apply to a buffer containing a media sample.
  `static @interface`
  `Constants.CryptoMode`
  Crypto modes for a codec.
  `static @interface`
  `Constants.RoleFlags`
  Track role flags.
  `static @interface`
  `Constants.SelectionFlags`
  Track selection flags.
  `static @interface`
  `Constants.TrackType`
  `static @interface`
  `Constants.VideoOutputMode`
  Video decoder output modes.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `ALLOW_CAPTURE_BY_ALL`
  See `AudioAttributes.ALLOW_CAPTURE_BY_ALL`.
  `static final int`
  `ALLOW_CAPTURE_BY_NONE`
  See `AudioAttributes.ALLOW_CAPTURE_BY_NONE`.
  `static final int`
  `ALLOW_CAPTURE_BY_SYSTEM`
  See `AudioAttributes.ALLOW_CAPTURE_BY_SYSTEM`.
  `static final String`
  `ASCII_NAME`
  The name of the ASCII charset.
  `static final int`
  `AUDIOFOCUS_GAIN`
  `static final int`
  `AUDIOFOCUS_GAIN_TRANSIENT`
  `static final int`
  `AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE`
  `static final int`
  `AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK`
  `static final int`
  `AUDIOFOCUS_NONE`
  `static final int`
  `BITS_PER_BYTE`
  The number of bits per byte.
  `static final int`
  `BUFFER_FLAG_DECODE_ONLY`
  Indicates that a buffer should be decoded but not rendered.
  `static final int`
  `BUFFER_FLAG_ENCRYPTED`
  Indicates that a buffer is (at least partially) encrypted.
  `static final int`
  `BUFFER_FLAG_END_OF_STREAM`
  Flag for empty buffers that signal that the end of the stream was reached.
  `static final int`
  `BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA`
  Indicates that a buffer has supplemental data.
  `static final int`
  `BUFFER_FLAG_KEY_FRAME`
  Indicates that a buffer holds a synchronization sample.
  `static final int`
  `BUFFER_FLAG_LAST_SAMPLE`
  Indicates that a buffer is known to contain the last media sample of the stream.
  `static final int`
  `BYTES_PER_FLOAT`
  The number of bytes per float.
  `static final UUID`
  `CLEARKEY_UUID`
  UUID for the ClearKey DRM scheme.
  `static final UUID`
  `COMMON_PSSH_UUID`
  UUID for the W3C Common PSSH box.
  `static final int`
  `CRYPTO_MODE_AES_CBC`
  `static final int`
  `CRYPTO_MODE_AES_CTR`
  `static final int`
  `CRYPTO_MODE_UNENCRYPTED`
  `static final int`
  `ENCODING_INVALID`
  `static final int`
  `FLAG_AUDIBILITY_ENFORCED`
  `static final int`
  `INDEX_UNSET`
  Represents an unset or unknown index.
  `static final String`
  `ISO88591_NAME`
  The name of the ISO-8859-1 charset.
  `static final String`
  `LANGUAGE_UNDETERMINED`
  Represents an undetermined language as an ISO 639-2 language code.
  `static final int`
  `LENGTH_UNSET`
  Represents an unset or unknown length.
  `static final long`
  `MICROS_PER_SECOND`
  The number of microseconds in one second.
  `static final long`
  `MILLIS_PER_SECOND`
  The number of milliseconds in one second.
  `static final long`
  `NANOS_PER_SECOND`
  The number of nanoseconds in one second.
  `static final int`
  `PERCENTAGE_UNSET`
  Represents an unset or unknown percentage.
  `static final UUID`
  `PLAYREADY_UUID`
  UUID for the PlayReady DRM scheme.
  `static final int`
  `POSITION_UNSET`
  Represents an unset or unknown position.
  `static final int`
  `ROLE_FLAG_ALTERNATE`
  Indicates an alternate track.
  `static final int`
  `ROLE_FLAG_CAPTION`
  Indicates the track contains captions.
  `static final int`
  `ROLE_FLAG_COMMENTARY`
  Indicates the track contains commentary, for example from the director.
  `static final int`
  `ROLE_FLAG_DESCRIBES_MUSIC_AND_SOUND`
  Indicates the track contains a textual description of music and sound.
  `static final int`
  `ROLE_FLAG_DESCRIBES_VIDEO`
  Indicates the track contains an audio or textual description of a video track.
  `static final int`
  `ROLE_FLAG_DUB`
  Indicates the track is in a different language from the original, for example dubbed audio or translated captions.
  `static final int`
  `ROLE_FLAG_EASY_TO_READ`
  Indicates the track contains a text that has been edited for ease of reading.
  `static final int`
  `ROLE_FLAG_EMERGENCY`
  Indicates the track contains information about a current emergency.
  `static final int`
  `ROLE_FLAG_ENHANCED_DIALOG_INTELLIGIBILITY`
  Indicates the track is designed for improved intelligibility of dialogue.
  `static final int`
  `ROLE_FLAG_MAIN`
  Indicates a main track.
  `static final int`
  `ROLE_FLAG_SIGN`
  Indicates the track contains a visual sign-language interpretation of an audio track.
  `static final int`
  `ROLE_FLAG_SUBTITLE`
  Indicates the track contains subtitles.
  `static final int`
  `ROLE_FLAG_SUPPLEMENTARY`
  Indicates a supplementary track, meaning the track has lower importance than the main track(s).
  `static final int`
  `ROLE_FLAG_TRANSCRIBES_DIALOG`
  Indicates the track contains a transcription of spoken dialog.
  `static final int`
  `ROLE_FLAG_TRICK_PLAY`
  Indicates the track is intended for trick play.
  `static final String`
  `SANS_SERIF_NAME`
  The name of the sans-serif font family.
  `static final int`
  `SELECTION_FLAG_AUTOSELECT`
  Indicates that the player may choose to play the track in absence of an explicit user preference.
  `static final int`
  `SELECTION_FLAG_DEFAULT`
  Indicates that the track should be selected if user preferences do not state otherwise.
  `static final int`
  `SELECTION_FLAG_FORCED`
  Indicates that the track must be displayed.
  `static final int`
  `SELECTION_REASON_ADAPTIVE`
  A selection reason constant for an adaptive track selection.
  `static final int`
  `SELECTION_REASON_CUSTOM_BASE`
  Applications or extensions may define custom `SELECTION_REASON_*` constants greater than or equal to this value.
  `static final int`
  `SELECTION_REASON_INITIAL`
  A selection reason constant for an initial track selection.
  `static final int`
  `SELECTION_REASON_MANUAL`
  A selection reason constant for an manual (i.e.
  `static final int`
  `SELECTION_REASON_TRICK_PLAY`
  A selection reason constant for a trick play track selection.
  `static final int`
  `SELECTION_REASON_UNKNOWN`
  A selection reason constant for selections whose reasons are unknown or unspecified.
  `static final String`
  `SERIF_NAME`
  The name of the serif font family.
  `static final long`
  `TIME_END_OF_SOURCE`
  Special constant representing a time corresponding to the end of a source.
  `static final long`
  `TIME_UNSET`
  Special constant representing an unset or unknown time or duration.
  `static final int`
  `TRACK_TYPE_AUDIO`
  A type constant for audio tracks.
  `static final int`
  `TRACK_TYPE_CAMERA_MOTION`
  A type constant for camera motion tracks.
  `static final int`
  `TRACK_TYPE_CUSTOM_BASE`
  Applications or extensions may define custom `TRACK_TYPE_*` constants greater than or equal to this value.
  `static final int`
  `TRACK_TYPE_DEFAULT`
  A type constant for tracks of some default type, where the type itself is unknown.
  `static final int`
  `TRACK_TYPE_METADATA`
  A type constant for metadata tracks.
  `static final int`
  `TRACK_TYPE_NONE`
  A type constant for a dummy or empty track.
  `static final int`
  `TRACK_TYPE_TEXT`
  A type constant for text tracks.
  `static final int`
  `TRACK_TYPE_UNKNOWN`
  A type constant for tracks of unknown type.
  `static final int`
  `TRACK_TYPE_VIDEO`
  A type constant for video tracks.
  `static final int`
  `USAGE_ALARM`
  `static final int`
  `USAGE_ASSISTANCE_ACCESSIBILITY`
  `static final int`
  `USAGE_ASSISTANCE_NAVIGATION_GUIDANCE`
  `static final int`
  `USAGE_ASSISTANCE_SONIFICATION`
  `static final int`
  `USAGE_ASSISTANT`
  `static final int`
  `USAGE_GAME`
  `static final int`
  `USAGE_MEDIA`
  `static final int`
  `USAGE_NOTIFICATION`
  `static final int`
  `USAGE_NOTIFICATION_COMMUNICATION_DELAYED`
  `static final int`
  `USAGE_NOTIFICATION_COMMUNICATION_INSTANT`
  `static final int`
  `USAGE_NOTIFICATION_COMMUNICATION_REQUEST`
  `static final int`
  `USAGE_NOTIFICATION_EVENT`
  `static final int`
  `USAGE_NOTIFICATION_RINGTONE`
  `static final int`
  `USAGE_UNKNOWN`
  `static final int`
  `USAGE_VOICE_COMMUNICATION`
  `static final int`
  `USAGE_VOICE_COMMUNICATION_SIGNALLING`
  `static final String`
  `UTF16_NAME`
  The name of the UTF-16 charset.
  `static final String`
  `UTF16LE_NAME`
  The name of the UTF-16 little-endian charset.
  `static final String`
  `UTF8_NAME`
  The name of the UTF-8 charset.
  `static final UUID`
  `UUID_NIL`
  The Nil UUID as defined by RFC4122.
  `static final int`
  `VIDEO_OUTPUT_MODE_NONE`
  Video decoder output mode is not set.
  `static final int`
  `VIDEO_OUTPUT_MODE_SURFACE_YUV`
  Video decoder output mode that renders 4:2:0 YUV planes directly to a surface.
  `static final int`
  `VIDEO_OUTPUT_MODE_YUV`
  Video decoder output mode that outputs raw 4:2:0 YUV planes.
  `static final UUID`
  `WIDEVINE_UUID`
  UUID for the Widevine DRM scheme.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static int`
  `generateAudioSessionIdV21(Context context)`
  Returns a newly generated audio session identifier, or `AudioManager.ERROR` if an error occurred in which case audio playback may fail.
  `static long`
  `msToUs(long timeMs)`
  Converts a time in milliseconds to the corresponding time in microseconds, preserving `TIME_UNSET` values and `TIME_END_OF_SOURCE` values.
  `static long`
  `usToMs(long timeUs)`
  Converts a time in microseconds to the corresponding time in milliseconds, preserving `TIME_UNSET` and `TIME_END_OF_SOURCE` values.

  ### Methods inherited from class java.lang.Object

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

- ## Field Details

  - ### TIME_END_OF_SOURCE

    public static final long TIME_END_OF_SOURCE
    Special constant representing a time corresponding to the end of a source. Suitable for use in any time base.
    See Also:
      - Constant Field Values

  - ### TIME_UNSET

    public static final long TIME_UNSET
    Special constant representing an unset or unknown time or duration. Suitable for use in any time base.
    See Also:
      - Constant Field Values

  - ### INDEX_UNSET

    public static final int INDEX_UNSET
    Represents an unset or unknown index.
    See Also:
      - Constant Field Values

  - ### POSITION_UNSET

    public static final int POSITION_UNSET
    Represents an unset or unknown position.
    See Also:
      - Constant Field Values

  - ### LENGTH_UNSET

    public static final int LENGTH_UNSET
    Represents an unset or unknown length.
    See Also:
      - Constant Field Values

  - ### PERCENTAGE_UNSET

    public static final int PERCENTAGE_UNSET
    Represents an unset or unknown percentage.
    See Also:
      - Constant Field Values

  - ### MILLIS_PER_SECOND

    public static final long MILLIS_PER_SECOND
    The number of milliseconds in one second.
    See Also:
      - Constant Field Values

  - ### MICROS_PER_SECOND

    public static final long MICROS_PER_SECOND
    The number of microseconds in one second.
    See Also:
      - Constant Field Values

  - ### NANOS_PER_SECOND

    public static final long NANOS_PER_SECOND
    The number of nanoseconds in one second.
    See Also:
      - Constant Field Values

  - ### BITS_PER_BYTE

    public static final int BITS_PER_BYTE
    The number of bits per byte.
    See Also:
      - Constant Field Values

  - ### BYTES_PER_FLOAT

    public static final int BYTES_PER_FLOAT
    The number of bytes per float.
    See Also:
      - Constant Field Values

  - ### ASCII_NAME

    public static final String ASCII_NAME
    The name of the ASCII charset.
    See Also:
      - Constant Field Values

  - ### UTF8_NAME

    public static final String UTF8_NAME
    The name of the UTF-8 charset.
    See Also:
      - Constant Field Values

  - ### ISO88591_NAME

    public static final String ISO88591_NAME
    The name of the ISO-8859-1 charset.
    See Also:
      - Constant Field Values

  - ### UTF16_NAME

    public static final String UTF16_NAME
    The name of the UTF-16 charset.
    See Also:
      - Constant Field Values

  - ### UTF16LE_NAME

    public static final String UTF16LE_NAME
    The name of the UTF-16 little-endian charset.
    See Also:
      - Constant Field Values

  - ### SERIF_NAME

    public static final String SERIF_NAME
    The name of the serif font family.
    See Also:
      - Constant Field Values

  - ### SANS_SERIF_NAME

    public static final String SANS_SERIF_NAME
    The name of the sans-serif font family.
    See Also:
      - Constant Field Values

  - ### TRACK_TYPE_UNKNOWN

    public static final int TRACK_TYPE_UNKNOWN
    A type constant for tracks of unknown type.
    See Also:
      - Constant Field Values

  - ### TRACK_TYPE_DEFAULT

    public static final int TRACK_TYPE_DEFAULT
    A type constant for tracks of some default type, where the type itself is unknown.
    See Also:
      - Constant Field Values

  - ### TRACK_TYPE_AUDIO

    public static final int TRACK_TYPE_AUDIO
    A type constant for audio tracks.
    See Also:
      - Constant Field Values

  - ### TRACK_TYPE_VIDEO

    public static final int TRACK_TYPE_VIDEO
    A type constant for video tracks.
    See Also:
      - Constant Field Values

  - ### TRACK_TYPE_TEXT

    public static final int TRACK_TYPE_TEXT
    A type constant for text tracks.
    See Also:
      - Constant Field Values

  - ### TRACK_TYPE_METADATA

    public static final int TRACK_TYPE_METADATA
    A type constant for metadata tracks.
    See Also:
      - Constant Field Values

  - ### TRACK_TYPE_CAMERA_MOTION

    public static final int TRACK_TYPE_CAMERA_MOTION
    A type constant for camera motion tracks.
    See Also:
      - Constant Field Values

  - ### TRACK_TYPE_NONE

    public static final int TRACK_TYPE_NONE
    A type constant for a dummy or empty track.
    See Also:
      - Constant Field Values

  - ### TRACK_TYPE_CUSTOM_BASE

    public static final int TRACK_TYPE_CUSTOM_BASE
    Applications or extensions may define custom `TRACK_TYPE_*` constants greater than or equal to this value.
    See Also:
      - Constant Field Values

  - ### SELECTION_REASON_UNKNOWN

    public static final int SELECTION_REASON_UNKNOWN
    A selection reason constant for selections whose reasons are unknown or unspecified.
    See Also:
      - Constant Field Values

  - ### SELECTION_REASON_INITIAL

    public static final int SELECTION_REASON_INITIAL
    A selection reason constant for an initial track selection.
    See Also:
      - Constant Field Values

  - ### SELECTION_REASON_MANUAL

    public static final int SELECTION_REASON_MANUAL
    A selection reason constant for an manual (i.e. user initiated) track selection.
    See Also:
      - Constant Field Values

  - ### SELECTION_REASON_ADAPTIVE

    public static final int SELECTION_REASON_ADAPTIVE
    A selection reason constant for an adaptive track selection.
    See Also:
      - Constant Field Values

  - ### SELECTION_REASON_TRICK_PLAY

    public static final int SELECTION_REASON_TRICK_PLAY
    A selection reason constant for a trick play track selection.
    See Also:
      - Constant Field Values

  - ### SELECTION_REASON_CUSTOM_BASE

    public static final int SELECTION_REASON_CUSTOM_BASE
    Applications or extensions may define custom `SELECTION_REASON_*` constants greater than or equal to this value.
    See Also:
      - Constant Field Values

  - ### CRYPTO_MODE_UNENCRYPTED

    public static final int CRYPTO_MODE_UNENCRYPTED
    See Also:
      - `MediaCodec.CRYPTO_MODE_UNENCRYPTED`
      - Constant Field Values

  - ### CRYPTO_MODE_AES_CTR

    public static final int CRYPTO_MODE_AES_CTR
    See Also:
      - `MediaCodec.CRYPTO_MODE_AES_CTR`
      - Constant Field Values

  - ### CRYPTO_MODE_AES_CBC

    public static final int CRYPTO_MODE_AES_CBC
    See Also:
      - `MediaCodec.CRYPTO_MODE_AES_CBC`
      - Constant Field Values

  - ### ENCODING_INVALID

    public static final int ENCODING_INVALID
    See Also:
      - Constant Field Values

  - ### FLAG_AUDIBILITY_ENFORCED

    public static final int FLAG_AUDIBILITY_ENFORCED
    See Also:
      - `AudioAttributes.FLAG_AUDIBILITY_ENFORCED`
      - Constant Field Values

  - ### USAGE_ALARM

    public static final int USAGE_ALARM
    See Also:
      - `AudioAttributes.USAGE_ALARM`
      - Constant Field Values

  - ### USAGE_ASSISTANCE_ACCESSIBILITY

    public static final int USAGE_ASSISTANCE_ACCESSIBILITY
    See Also:
      - `AudioAttributes.USAGE_ASSISTANCE_ACCESSIBILITY`
      - Constant Field Values

  - ### USAGE_ASSISTANCE_NAVIGATION_GUIDANCE

    public static final int USAGE_ASSISTANCE_NAVIGATION_GUIDANCE
    See Also:
      - `AudioAttributes.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE`
      - Constant Field Values

  - ### USAGE_ASSISTANCE_SONIFICATION

    public static final int USAGE_ASSISTANCE_SONIFICATION
    See Also:
      - `AudioAttributes.USAGE_ASSISTANCE_SONIFICATION`
      - Constant Field Values

  - ### USAGE_ASSISTANT

    public static final int USAGE_ASSISTANT
    See Also:
      - `AudioAttributes.USAGE_ASSISTANT`
      - Constant Field Values

  - ### USAGE_GAME

    public static final int USAGE_GAME
    See Also:
      - `AudioAttributes.USAGE_GAME`
      - Constant Field Values

  - ### USAGE_MEDIA

    public static final int USAGE_MEDIA
    See Also:
      - `AudioAttributes.USAGE_MEDIA`
      - Constant Field Values

  - ### USAGE_NOTIFICATION

    public static final int USAGE_NOTIFICATION
    See Also:
      - `AudioAttributes.USAGE_NOTIFICATION`
      - Constant Field Values

  - ### USAGE_NOTIFICATION_COMMUNICATION_DELAYED

    public static final int USAGE_NOTIFICATION_COMMUNICATION_DELAYED
    See Also:
      - `AudioAttributes.USAGE_NOTIFICATION_COMMUNICATION_DELAYED`
      - Constant Field Values

  - ### USAGE_NOTIFICATION_COMMUNICATION_INSTANT

    public static final int USAGE_NOTIFICATION_COMMUNICATION_INSTANT
    See Also:
      - `AudioAttributes.USAGE_NOTIFICATION_COMMUNICATION_INSTANT`
      - Constant Field Values

  - ### USAGE_NOTIFICATION_COMMUNICATION_REQUEST

    public static final int USAGE_NOTIFICATION_COMMUNICATION_REQUEST
    See Also:
      - `AudioAttributes.USAGE_NOTIFICATION_COMMUNICATION_REQUEST`
      - Constant Field Values

  - ### USAGE_NOTIFICATION_EVENT

    public static final int USAGE_NOTIFICATION_EVENT
    See Also:
      - `AudioAttributes.USAGE_NOTIFICATION_EVENT`
      - Constant Field Values

  - ### USAGE_NOTIFICATION_RINGTONE

    public static final int USAGE_NOTIFICATION_RINGTONE
    See Also:
      - `AudioAttributes.USAGE_NOTIFICATION_RINGTONE`
      - Constant Field Values

  - ### USAGE_UNKNOWN

    public static final int USAGE_UNKNOWN
    See Also:
      - `AudioAttributes.USAGE_UNKNOWN`
      - Constant Field Values

  - ### USAGE_VOICE_COMMUNICATION

    public static final int USAGE_VOICE_COMMUNICATION
    See Also:
      - `AudioAttributes.USAGE_VOICE_COMMUNICATION`
      - Constant Field Values

  - ### USAGE_VOICE_COMMUNICATION_SIGNALLING

    public static final int USAGE_VOICE_COMMUNICATION_SIGNALLING
    See Also:
      - `AudioAttributes.USAGE_VOICE_COMMUNICATION_SIGNALLING`
      - Constant Field Values

  - ### ALLOW_CAPTURE_BY_ALL

    public static final int ALLOW_CAPTURE_BY_ALL
    See `AudioAttributes.ALLOW_CAPTURE_BY_ALL`.
    See Also:
      - Constant Field Values

  - ### ALLOW_CAPTURE_BY_NONE

    public static final int ALLOW_CAPTURE_BY_NONE
    See `AudioAttributes.ALLOW_CAPTURE_BY_NONE`.
    See Also:
      - Constant Field Values

  - ### ALLOW_CAPTURE_BY_SYSTEM

    public static final int ALLOW_CAPTURE_BY_SYSTEM
    See `AudioAttributes.ALLOW_CAPTURE_BY_SYSTEM`.
    See Also:
      - Constant Field Values

  - ### AUDIOFOCUS_NONE

    public static final int AUDIOFOCUS_NONE
    See Also:
      - `AudioManager.AUDIOFOCUS_NONE`
      - Constant Field Values

  - ### AUDIOFOCUS_GAIN

    public static final int AUDIOFOCUS_GAIN
    See Also:
      - `AudioManager.AUDIOFOCUS_GAIN`
      - Constant Field Values

  - ### AUDIOFOCUS_GAIN_TRANSIENT

    public static final int AUDIOFOCUS_GAIN_TRANSIENT
    See Also:
      - `AudioManager.AUDIOFOCUS_GAIN_TRANSIENT`
      - Constant Field Values

  - ### AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK

    public static final int AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK
    See Also:
      - `AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK`
      - Constant Field Values

  - ### AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE

    public static final int AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE
    See Also:
      - `AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE`
      - Constant Field Values

  - ### BUFFER_FLAG_KEY_FRAME

    public static final int BUFFER_FLAG_KEY_FRAME
    Indicates that a buffer holds a synchronization sample.
    See Also:
      - Constant Field Values

  - ### BUFFER_FLAG_END_OF_STREAM

    public static final int BUFFER_FLAG_END_OF_STREAM
    Flag for empty buffers that signal that the end of the stream was reached.
    See Also:
      - Constant Field Values

  - ### BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA

    public static final int BUFFER_FLAG_HAS_SUPPLEMENTAL_DATA
    Indicates that a buffer has supplemental data.
    See Also:
      - Constant Field Values

  - ### BUFFER_FLAG_LAST_SAMPLE

    public static final int BUFFER_FLAG_LAST_SAMPLE
    Indicates that a buffer is known to contain the last media sample of the stream.
    See Also:
      - Constant Field Values

  - ### BUFFER_FLAG_ENCRYPTED

    public static final int BUFFER_FLAG_ENCRYPTED
    Indicates that a buffer is (at least partially) encrypted.
    See Also:
      - Constant Field Values

  - ### BUFFER_FLAG_DECODE_ONLY

    public static final int BUFFER_FLAG_DECODE_ONLY
    Indicates that a buffer should be decoded but not rendered.
    See Also:
      - Constant Field Values

  - ### VIDEO_OUTPUT_MODE_NONE

    public static final int VIDEO_OUTPUT_MODE_NONE
    Video decoder output mode is not set.
    See Also:
      - Constant Field Values

  - ### VIDEO_OUTPUT_MODE_YUV

    public static final int VIDEO_OUTPUT_MODE_YUV
    Video decoder output mode that outputs raw 4:2:0 YUV planes.
    See Also:
      - Constant Field Values

  - ### VIDEO_OUTPUT_MODE_SURFACE_YUV

    public static final int VIDEO_OUTPUT_MODE_SURFACE_YUV
    Video decoder output mode that renders 4:2:0 YUV planes directly to a surface.
    See Also:
      - Constant Field Values

  - ### SELECTION_FLAG_DEFAULT

    public static final int SELECTION_FLAG_DEFAULT
    Indicates that the track should be selected if user preferences do not state otherwise.
    See Also:
      - Constant Field Values

  - ### SELECTION_FLAG_FORCED

    public static final int SELECTION_FLAG_FORCED
    Indicates that the track must be displayed. Only applies to text tracks.
    See Also:
      - Constant Field Values

  - ### SELECTION_FLAG_AUTOSELECT

    public static final int SELECTION_FLAG_AUTOSELECT
    Indicates that the player may choose to play the track in absence of an explicit user preference.
    See Also:
      - Constant Field Values

  - ### LANGUAGE_UNDETERMINED

    public static final String LANGUAGE_UNDETERMINED
    Represents an undetermined language as an ISO 639-2 language code.
    See Also:
      - Constant Field Values

  - ### UUID_NIL

    public static final UUID UUID_NIL
    The Nil UUID as defined by RFC4122.

  - ### COMMON_PSSH_UUID

    public static final UUID COMMON_PSSH_UUID
    UUID for the W3C Common PSSH box.

  - ### CLEARKEY_UUID

    public static final UUID CLEARKEY_UUID
    UUID for the ClearKey DRM scheme.

    ClearKey is supported on Android devices running Android 5.0 (API Level 21) and up.

  - ### WIDEVINE_UUID

    public static final UUID WIDEVINE_UUID
    UUID for the Widevine DRM scheme.

    Widevine is supported on Android devices running Android 4.3 (API Level 18) and up.

  - ### PLAYREADY_UUID

    public static final UUID PLAYREADY_UUID
    UUID for the PlayReady DRM scheme.

    PlayReady is supported on all AndroidTV devices. Note that most other Android devices do not provide PlayReady support.

  - ### ROLE_FLAG_MAIN

    public static final int ROLE_FLAG_MAIN
    Indicates a main track.
    See Also:
      - Constant Field Values

  - ### ROLE_FLAG_ALTERNATE

    public static final int ROLE_FLAG_ALTERNATE
    Indicates an alternate track. For example a video track recorded from an different view point than the main track(s).
    See Also:
      - Constant Field Values

  - ### ROLE_FLAG_SUPPLEMENTARY

    public static final int ROLE_FLAG_SUPPLEMENTARY
    Indicates a supplementary track, meaning the track has lower importance than the main track(s). For example a video track that provides a visual accompaniment to a main audio track.
    See Also:
      - Constant Field Values

  - ### ROLE_FLAG_COMMENTARY

    public static final int ROLE_FLAG_COMMENTARY
    Indicates the track contains commentary, for example from the director.
    See Also:
      - Constant Field Values

  - ### ROLE_FLAG_DUB

    public static final int ROLE_FLAG_DUB
    Indicates the track is in a different language from the original, for example dubbed audio or translated captions.
    See Also:
      - Constant Field Values

  - ### ROLE_FLAG_EMERGENCY

    public static final int ROLE_FLAG_EMERGENCY
    Indicates the track contains information about a current emergency.
    See Also:
      - Constant Field Values

  - ### ROLE_FLAG_CAPTION

    public static final int ROLE_FLAG_CAPTION
    Indicates the track contains captions. This flag may be set on video tracks to indicate the presence of burned in captions.
    See Also:
      - Constant Field Values

  - ### ROLE_FLAG_SUBTITLE

    public static final int ROLE_FLAG_SUBTITLE
    Indicates the track contains subtitles. This flag may be set on video tracks to indicate the presence of burned in subtitles.
    See Also:
      - Constant Field Values

  - ### ROLE_FLAG_SIGN

    public static final int ROLE_FLAG_SIGN
    Indicates the track contains a visual sign-language interpretation of an audio track.
    See Also:
      - Constant Field Values

  - ### ROLE_FLAG_DESCRIBES_VIDEO

    public static final int ROLE_FLAG_DESCRIBES_VIDEO
    Indicates the track contains an audio or textual description of a video track.
    See Also:
      - Constant Field Values

  - ### ROLE_FLAG_DESCRIBES_MUSIC_AND_SOUND

    public static final int ROLE_FLAG_DESCRIBES_MUSIC_AND_SOUND
    Indicates the track contains a textual description of music and sound.
    See Also:
      - Constant Field Values

  - ### ROLE_FLAG_ENHANCED_DIALOG_INTELLIGIBILITY

    public static final int ROLE_FLAG_ENHANCED_DIALOG_INTELLIGIBILITY
    Indicates the track is designed for improved intelligibility of dialogue.
    See Also:
      - Constant Field Values

  - ### ROLE_FLAG_TRANSCRIBES_DIALOG

    public static final int ROLE_FLAG_TRANSCRIBES_DIALOG
    Indicates the track contains a transcription of spoken dialog.
    See Also:
      - Constant Field Values

  - ### ROLE_FLAG_EASY_TO_READ

    public static final int ROLE_FLAG_EASY_TO_READ
    Indicates the track contains a text that has been edited for ease of reading.
    See Also:
      - Constant Field Values

  - ### ROLE_FLAG_TRICK_PLAY

    public static final int ROLE_FLAG_TRICK_PLAY
    Indicates the track is intended for trick play.
    See Also:
      - Constant Field Values

- ## Method Details

  - ### usToMs

    public static long usToMs(long timeUs)
    Converts a time in microseconds to the corresponding time in milliseconds, preserving `TIME_UNSET` and `TIME_END_OF_SOURCE` values.
    Parameters:
      `timeUs` - The time in microseconds.
    Returns:
      The corresponding time in milliseconds.

  - ### msToUs

    public static long msToUs(long timeMs)
    Converts a time in milliseconds to the corresponding time in microseconds, preserving `TIME_UNSET` values and `TIME_END_OF_SOURCE` values.
    Parameters:
      `timeMs` - The time in milliseconds.
    Returns:
      The corresponding time in microseconds.

  - ### generateAudioSessionIdV21

    public static int generateAudioSessionIdV21(Context context)
    Returns a newly generated audio session identifier, or `AudioManager.ERROR` if an error occurred in which case audio playback may fail.
    See Also:
      - `AudioManager.generateAudioSessionId()`