public final class C extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
C.BufferFlags
Flags which can apply to a buffer containing a media sample.
|
static interface |
C.ContentType
Represents a streaming or other media type.
|
static interface |
C.CryptoMode
Crypto modes for a codec.
|
static interface |
C.Encoding
Represents an audio encoding, or an invalid or unset value.
|
static interface |
C.PcmEncoding
Represents a PCM audio encoding, or an invalid or unset value.
|
static interface |
C.SelectionFlags
Track selection flags.
|
static interface |
C.StereoMode
The stereo mode for 360/3D/VR videos.
|
Modifier and Type | Field and Description |
---|---|
static int |
BUFFER_FLAG_DECODE_ONLY
Indicates that a buffer should be decoded but not rendered.
|
static int |
BUFFER_FLAG_ENCRYPTED
Indicates that a buffer is (at least partially) encrypted.
|
static int |
BUFFER_FLAG_END_OF_STREAM
Flag for empty buffers that signal that the end of the stream was reached.
|
static int |
BUFFER_FLAG_KEY_FRAME
Indicates that a buffer holds a synchronization sample.
|
static int |
CHANNEL_OUT_7POINT1_SURROUND |
static int |
CRYPTO_MODE_AES_CBC |
static int |
CRYPTO_MODE_AES_CTR |
static int |
CRYPTO_MODE_UNENCRYPTED |
static int |
DATA_TYPE_CUSTOM_BASE
Applications or extensions may define custom
DATA_TYPE_* constants greater than or
equal to this value. |
static int |
DATA_TYPE_DRM
A data type constant for drm or encryption data.
|
static int |
DATA_TYPE_MANIFEST
A data type constant for a manifest file.
|
static int |
DATA_TYPE_MEDIA
A data type constant for media, typically containing media samples.
|
static int |
DATA_TYPE_MEDIA_INITIALIZATION
A data type constant for media, typically containing only initialization data.
|
static int |
DATA_TYPE_TIME_SYNCHRONIZATION
A data type constant for time synchronization data.
|
static int |
DATA_TYPE_UNKNOWN
A data type constant for data of unknown or unspecified type.
|
static int |
DEFAULT_AUDIO_BUFFER_SIZE
A default size in bytes for an audio buffer.
|
static int |
DEFAULT_BUFFER_SEGMENT_SIZE
A default size in bytes for an individual allocation that forms part of a larger buffer.
|
static int |
DEFAULT_METADATA_BUFFER_SIZE
A default size in bytes for a metadata buffer.
|
static int |
DEFAULT_MUXED_BUFFER_SIZE
A default size in bytes for a muxed buffer (e.g.
|
static int |
DEFAULT_TEXT_BUFFER_SIZE
A default size in bytes for a text buffer.
|
static int |
DEFAULT_VIDEO_BUFFER_SIZE
A default size in bytes for a video buffer.
|
static int |
ENCODING_AC3 |
static int |
ENCODING_DTS |
static int |
ENCODING_DTS_HD |
static int |
ENCODING_E_AC3 |
static int |
ENCODING_INVALID |
static int |
ENCODING_PCM_16BIT |
static int |
ENCODING_PCM_24BIT
PCM encoding with 24 bits per sample.
|
static int |
ENCODING_PCM_32BIT
PCM encoding with 32 bits per sample.
|
static int |
ENCODING_PCM_8BIT |
static int |
INDEX_UNSET
Represents an unset or unknown index.
|
static int |
LENGTH_UNSET
Represents an unset or unknown length.
|
static long |
MICROS_PER_SECOND
The number of microseconds in one second.
|
static int |
MSG_CUSTOM_BASE
Applications or extensions may define custom
MSG_* constants greater than or equal to
this value. |
static int |
MSG_SET_PLAYBACK_PARAMS
The type of a message that can be passed to an audio
Renderer via
ExoPlayer.sendMessages(com.google.android.exoplayer2.ExoPlayer.ExoPlayerMessage...) or ExoPlayer.blockingSendMessages(com.google.android.exoplayer2.ExoPlayer.ExoPlayerMessage...) . |
static int |
MSG_SET_SURFACE
The type of a message that can be passed to a video
Renderer via
ExoPlayer.sendMessages(com.google.android.exoplayer2.ExoPlayer.ExoPlayerMessage...) or ExoPlayer.blockingSendMessages(com.google.android.exoplayer2.ExoPlayer.ExoPlayerMessage...) . |
static int |
MSG_SET_VOLUME
The type of a message that can be passed to an audio
Renderer via
ExoPlayer.sendMessages(com.google.android.exoplayer2.ExoPlayer.ExoPlayerMessage...) or ExoPlayer.blockingSendMessages(com.google.android.exoplayer2.ExoPlayer.ExoPlayerMessage...) . |
static long |
NANOS_PER_SECOND
The number of nanoseconds in one second.
|
static UUID |
PLAYREADY_UUID
UUID for the PlayReady DRM scheme.
|
static int |
POSITION_UNSET
Represents an unset or unknown position.
|
static int |
RESULT_BUFFER_READ
A return value for methods where a buffer was read.
|
static int |
RESULT_END_OF_INPUT
A return value for methods where the end of an input was encountered.
|
static int |
RESULT_FORMAT_READ
A return value for methods where a format was read.
|
static int |
RESULT_MAX_LENGTH_EXCEEDED
A return value for methods where the length of parsed data exceeds the maximum length allowed.
|
static int |
RESULT_NOTHING_READ
A return value for methods where nothing was read.
|
static int |
SELECTION_FLAG_AUTOSELECT
Indicates that the player may choose to play the track in absence of an explicit user
preference.
|
static int |
SELECTION_FLAG_DEFAULT
Indicates that the track should be selected if user preferences do not state otherwise.
|
static int |
SELECTION_FLAG_FORCED
Indicates that the track must be displayed.
|
static int |
SELECTION_REASON_ADAPTIVE
A selection reason constant for an adaptive track selection.
|
static int |
SELECTION_REASON_CUSTOM_BASE
Applications or extensions may define custom
SELECTION_REASON_* constants greater than
or equal to this value. |
static int |
SELECTION_REASON_INITIAL
A selection reason constant for an initial track selection.
|
static int |
SELECTION_REASON_MANUAL
A selection reason constant for an manual (i.e.
|
static int |
SELECTION_REASON_TRICK_PLAY
A selection reason constant for a trick play track selection.
|
static int |
SELECTION_REASON_UNKNOWN
A selection reason constant for selections whose reasons are unknown or unspecified.
|
static int |
STEREO_MODE_LEFT_RIGHT
Indicates Left-Right stereo layout, used with 360/3D/VR videos.
|
static int |
STEREO_MODE_MONO
Indicates Monoscopic stereo layout, used with 360/3D/VR videos.
|
static int |
STEREO_MODE_TOP_BOTTOM
Indicates Top-Bottom stereo layout, used with 360/3D/VR videos.
|
static long |
TIME_END_OF_SOURCE
Special constant representing a time corresponding to the end of a source.
|
static long |
TIME_UNSET
Special constant representing an unset or unknown time or duration.
|
static int |
TRACK_TYPE_AUDIO
A type constant for audio tracks.
|
static int |
TRACK_TYPE_CUSTOM_BASE
Applications or extensions may define custom
TRACK_TYPE_* constants greater than or
equal to this value. |
static int |
TRACK_TYPE_DEFAULT
A type constant for tracks of some default type, where the type itself is unknown.
|
static int |
TRACK_TYPE_METADATA
A type constant for metadata tracks.
|
static int |
TRACK_TYPE_TEXT
A type constant for text tracks.
|
static int |
TRACK_TYPE_UNKNOWN
A type constant for tracks of unknown type.
|
static int |
TRACK_TYPE_VIDEO
A type constant for video tracks.
|
static int |
TYPE_DASH
Value returned by
Util.inferContentType(String) for DASH manifests. |
static int |
TYPE_HLS
Value returned by
Util.inferContentType(String) for HLS manifests. |
static int |
TYPE_OTHER
Value returned by
Util.inferContentType(String) for files other than DASH, HLS or
Smooth Streaming manifests. |
static int |
TYPE_SS
Value returned by
Util.inferContentType(String) for Smooth Streaming manifests. |
static String |
UTF8_NAME
The name of the UTF-8 charset.
|
static UUID |
UUID_NIL
The Nil UUID as defined by
RFC4122.
|
static UUID |
WIDEVINE_UUID
UUID for the Widevine DRM scheme.
|
Modifier and Type | Method and Description |
---|---|
static long |
msToUs(long timeMs)
Converts a time in milliseconds to the corresponding time in microseconds, preserving
TIME_UNSET values. |
static long |
usToMs(long timeUs)
Converts a time in microseconds to the corresponding time in milliseconds, preserving
TIME_UNSET values. |
public static final long TIME_END_OF_SOURCE
public static final long TIME_UNSET
public static final int INDEX_UNSET
public static final int POSITION_UNSET
public static final int LENGTH_UNSET
public static final long MICROS_PER_SECOND
public static final long NANOS_PER_SECOND
public static final String UTF8_NAME
public static final int CRYPTO_MODE_UNENCRYPTED
public static final int CRYPTO_MODE_AES_CTR
public static final int CRYPTO_MODE_AES_CBC
public static final int ENCODING_INVALID
public static final int ENCODING_PCM_8BIT
public static final int ENCODING_PCM_16BIT
public static final int ENCODING_PCM_24BIT
public static final int ENCODING_PCM_32BIT
public static final int ENCODING_AC3
AudioFormat.ENCODING_AC3
,
Constant Field Valuespublic static final int ENCODING_E_AC3
AudioFormat.ENCODING_E_AC3
,
Constant Field Valuespublic static final int ENCODING_DTS
AudioFormat.ENCODING_DTS
,
Constant Field Valuespublic static final int ENCODING_DTS_HD
AudioFormat.ENCODING_DTS_HD
,
Constant Field Valuespublic static final int CHANNEL_OUT_7POINT1_SURROUND
AudioFormat.CHANNEL_OUT_7POINT1_SURROUND
public static final int BUFFER_FLAG_KEY_FRAME
public static final int BUFFER_FLAG_END_OF_STREAM
public static final int BUFFER_FLAG_ENCRYPTED
public static final int BUFFER_FLAG_DECODE_ONLY
public static final int SELECTION_FLAG_DEFAULT
public static final int SELECTION_FLAG_FORCED
public static final int SELECTION_FLAG_AUTOSELECT
public static final int TYPE_DASH
Util.inferContentType(String)
for DASH manifests.public static final int TYPE_SS
Util.inferContentType(String)
for Smooth Streaming manifests.public static final int TYPE_HLS
Util.inferContentType(String)
for HLS manifests.public static final int TYPE_OTHER
Util.inferContentType(String)
for files other than DASH, HLS or
Smooth Streaming manifests.public static final int RESULT_END_OF_INPUT
public static final int RESULT_MAX_LENGTH_EXCEEDED
public static final int RESULT_NOTHING_READ
public static final int RESULT_BUFFER_READ
public static final int RESULT_FORMAT_READ
public static final int DATA_TYPE_UNKNOWN
public static final int DATA_TYPE_MEDIA
public static final int DATA_TYPE_MEDIA_INITIALIZATION
public static final int DATA_TYPE_DRM
public static final int DATA_TYPE_MANIFEST
public static final int DATA_TYPE_TIME_SYNCHRONIZATION
public static final int DATA_TYPE_CUSTOM_BASE
DATA_TYPE_*
constants greater than or
equal to this value.public static final int TRACK_TYPE_UNKNOWN
public static final int TRACK_TYPE_DEFAULT
public static final int TRACK_TYPE_AUDIO
public static final int TRACK_TYPE_VIDEO
public static final int TRACK_TYPE_TEXT
public static final int TRACK_TYPE_METADATA
public static final int TRACK_TYPE_CUSTOM_BASE
TRACK_TYPE_*
constants greater than or
equal to this value.public static final int SELECTION_REASON_UNKNOWN
public static final int SELECTION_REASON_INITIAL
public static final int SELECTION_REASON_MANUAL
public static final int SELECTION_REASON_ADAPTIVE
public static final int SELECTION_REASON_TRICK_PLAY
public static final int SELECTION_REASON_CUSTOM_BASE
SELECTION_REASON_*
constants greater than
or equal to this value.public static final int DEFAULT_BUFFER_SEGMENT_SIZE
public static final int DEFAULT_VIDEO_BUFFER_SIZE
public static final int DEFAULT_AUDIO_BUFFER_SIZE
public static final int DEFAULT_TEXT_BUFFER_SIZE
public static final int DEFAULT_METADATA_BUFFER_SIZE
public static final int DEFAULT_MUXED_BUFFER_SIZE
public static final UUID WIDEVINE_UUID
public static final UUID PLAYREADY_UUID
PlayReady is supported on all AndroidTV devices. Note that most other Android devices do not provide PlayReady support.
public static final int MSG_SET_SURFACE
Renderer
via
ExoPlayer.sendMessages(com.google.android.exoplayer2.ExoPlayer.ExoPlayerMessage...)
or ExoPlayer.blockingSendMessages(com.google.android.exoplayer2.ExoPlayer.ExoPlayerMessage...)
. The message object
should be the target Surface
, or null.public static final int MSG_SET_VOLUME
Renderer
via
ExoPlayer.sendMessages(com.google.android.exoplayer2.ExoPlayer.ExoPlayerMessage...)
or ExoPlayer.blockingSendMessages(com.google.android.exoplayer2.ExoPlayer.ExoPlayerMessage...)
. The message object
should be a Float
with 0 being silence and 1 being unity gain.public static final int MSG_SET_PLAYBACK_PARAMS
Renderer
via
ExoPlayer.sendMessages(com.google.android.exoplayer2.ExoPlayer.ExoPlayerMessage...)
or ExoPlayer.blockingSendMessages(com.google.android.exoplayer2.ExoPlayer.ExoPlayerMessage...)
. The message object
should be a PlaybackParams
, which will be used to configure the
underlying AudioTrack
. The message object should not be modified by the
caller after it has been passedpublic static final int MSG_CUSTOM_BASE
MSG_*
constants greater than or equal to
this value.public static final int STEREO_MODE_MONO
public static final int STEREO_MODE_TOP_BOTTOM
public static final int STEREO_MODE_LEFT_RIGHT
public static long usToMs(long timeUs)
TIME_UNSET
values.timeUs
- The time in microseconds.public static long msToUs(long timeMs)
TIME_UNSET
values.timeMs
- The time in milliseconds.