public final class C extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
C.AudioContentType
Content types for
AudioAttributes . |
static interface |
C.AudioFlags
Flags for
AudioAttributes . |
static interface |
C.AudioFocusGain
Audio focus types.
|
static interface |
C.AudioUsage
Usage types for
AudioAttributes . |
static interface |
C.BufferFlags
Flags which can apply to a buffer containing a media sample.
|
static interface |
C.ColorRange
Video color range.
|
static interface |
C.ColorSpace
Video colorspaces.
|
static interface |
C.ColorTransfer
Video color transfer characteristics.
|
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.NetworkType
Network connection type.
|
static interface |
C.PcmEncoding
Represents a PCM audio encoding, or an invalid or unset value.
|
static interface |
C.Projection
Video projection types.
|
static interface |
C.SelectionFlags
Track selection flags.
|
static interface |
C.StereoMode
The stereo mode for 360/3D/VR videos.
|
static interface |
C.StreamType
Stream types for an
AudioTrack . |
static interface |
C.VideoScalingMode
Video scaling modes for
MediaCodec -based Renderer s. |
Modifier and Type | Field and Description |
---|---|
static String |
ASCII_NAME
The name of the ASCII charset.
|
static int |
AUDIO_SESSION_ID_UNSET
Represents an unset
AudioTrack session identifier. |
static int |
AUDIOFOCUS_GAIN |
static int |
AUDIOFOCUS_GAIN_TRANSIENT |
static int |
AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE |
static int |
AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK |
static int |
AUDIOFOCUS_NONE |
static int |
BITS_PER_BYTE
The number of bits per byte.
|
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 |
BUFFER_FLAG_LAST_SAMPLE
Indicates that a buffer is known to contain the last media sample of the stream.
|
static int |
BYTES_PER_FLOAT
The number of bytes per float.
|
static String |
CENC_TYPE_cbc1
"cbc1" scheme type name as defined in ISO/IEC 23001-7:2016.
|
static String |
CENC_TYPE_cbcs
"cbcs" scheme type name as defined in ISO/IEC 23001-7:2016.
|
static String |
CENC_TYPE_cenc
"cenc" scheme type name as defined in ISO/IEC 23001-7:2016.
|
static String |
CENC_TYPE_cens
"cens" scheme type name as defined in ISO/IEC 23001-7:2016.
|
static UUID |
CLEARKEY_UUID
UUID for the ClearKey DRM scheme.
|
static int |
COLOR_RANGE_FULL |
static int |
COLOR_RANGE_LIMITED |
static int |
COLOR_SPACE_BT2020 |
static int |
COLOR_SPACE_BT601 |
static int |
COLOR_SPACE_BT709 |
static int |
COLOR_TRANSFER_HLG |
static int |
COLOR_TRANSFER_SDR |
static int |
COLOR_TRANSFER_ST2084 |
static UUID |
COMMON_PSSH_UUID
UUID for the W3C
Common PSSH
box.
|
static int |
CONTENT_TYPE_MOVIE |
static int |
CONTENT_TYPE_MUSIC |
static int |
CONTENT_TYPE_SONIFICATION |
static int |
CONTENT_TYPE_SPEECH |
static int |
CONTENT_TYPE_UNKNOWN |
static int |
CRYPTO_MODE_AES_CBC |
static int |
CRYPTO_MODE_AES_CTR |
static int |
CRYPTO_MODE_UNENCRYPTED |
static int |
DATA_TYPE_AD
A data type constant for ads loader data.
|
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_MEDIA_PROGRESSIVE_LIVE
A data type constant for live progressive media streams, typically containing media samples.
|
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_CAMERA_MOTION_BUFFER_SIZE
A default size in bytes for a camera motion 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_DOLBY_TRUEHD |
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 |
ENCODING_PCM_A_LAW
Audio encoding for A-law.
|
static int |
ENCODING_PCM_FLOAT |
static int |
ENCODING_PCM_MU_LAW
Audio encoding for mu-law.
|
static int |
FLAG_AUDIBILITY_ENFORCED |
static int |
INDEX_UNSET
Represents an unset or unknown index.
|
static String |
LANGUAGE_UNDETERMINED
Represents an undetermined language as an ISO 639 alpha-3 language code.
|
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 that can be passed to
Renderer s. |
static int |
MSG_SET_AUDIO_ATTRIBUTES
A type of a message that can be passed to an audio
Renderer via ExoPlayer#createMessage(Target) . |
static int |
MSG_SET_AUX_EFFECT_INFO
A type of a message that can be passed to an audio
Renderer via ExoPlayer#createMessage(Target) . |
static int |
MSG_SET_CAMERA_MOTION_LISTENER
The type of a message that can be passed to a camera motion
Renderer via ExoPlayer#createMessage(Target) . |
static int |
MSG_SET_SCALING_MODE
The type of a message that can be passed to a
MediaCodec -based video Renderer
via ExoPlayer#createMessage(Target) . |
static int |
MSG_SET_SURFACE
The type of a message that can be passed to a video
Renderer via ExoPlayer#createMessage(Target) . |
static int |
MSG_SET_VIDEO_FRAME_METADATA_LISTENER
The type of a message that can be passed to a video
Renderer via ExoPlayer#createMessage(Target) . |
static int |
MSG_SET_VOLUME
A type of a message that can be passed to an audio
Renderer via ExoPlayer#createMessage(Target) . |
static long |
NANOS_PER_SECOND
The number of nanoseconds in one second.
|
static int |
NETWORK_TYPE_2G
Network type for a 2G cellular connection.
|
static int |
NETWORK_TYPE_3G
Network type for a 3G cellular connection.
|
static int |
NETWORK_TYPE_4G
Network type for a 4G cellular connection.
|
static int |
NETWORK_TYPE_CELLULAR_UNKNOWN
Network type for cellular connections which cannot be mapped to one of
NETWORK_TYPE_2G , NETWORK_TYPE_3G , or NETWORK_TYPE_4G . |
static int |
NETWORK_TYPE_ETHERNET
Network type for an Ethernet connection.
|
static int |
NETWORK_TYPE_OFFLINE
No network connection.
|
static int |
NETWORK_TYPE_OTHER
Network type for other connections which are not Wifi or cellular (e.g.
|
static int |
NETWORK_TYPE_UNKNOWN
Unknown network type.
|
static int |
NETWORK_TYPE_WIFI
Network type for a Wifi connection.
|
static int |
PERCENTAGE_UNSET
Represents an unset or unknown percentage.
|
static UUID |
PLAYREADY_UUID
UUID for the PlayReady DRM scheme.
|
static int |
POSITION_UNSET
Represents an unset or unknown position.
|
static int |
PRIORITY_DOWNLOAD
Priority for media downloading.
|
static int |
PRIORITY_PLAYBACK
Priority for media playback.
|
static int |
PROJECTION_CUBEMAP
Cube map projection.
|
static int |
PROJECTION_EQUIRECTANGULAR
Equirectangular spherical projection.
|
static int |
PROJECTION_MESH
3-D mesh projection.
|
static int |
PROJECTION_RECTANGULAR
Conventional rectangular projection.
|
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 String |
SANS_SERIF_NAME
The name of the sans-serif font family.
|
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 String |
SERIF_NAME
The name of the serif font family.
|
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_STEREO_MESH
Indicates a stereo layout where the left and right eyes have separate meshes,
used with 360/3D/VR videos.
|
static int |
STEREO_MODE_TOP_BOTTOM
Indicates Top-Bottom stereo layout, used with 360/3D/VR videos.
|
static int |
STREAM_TYPE_ALARM |
static int |
STREAM_TYPE_DEFAULT
The default stream type used by audio renderers.
|
static int |
STREAM_TYPE_DTMF |
static int |
STREAM_TYPE_MUSIC |
static int |
STREAM_TYPE_NOTIFICATION |
static int |
STREAM_TYPE_RING |
static int |
STREAM_TYPE_SYSTEM |
static int |
STREAM_TYPE_USE_DEFAULT |
static int |
STREAM_TYPE_VOICE_CALL |
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_CAMERA_MOTION
A type constant for camera motion 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_NONE
A type constant for a dummy or empty track.
|
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 int |
USAGE_ALARM |
static int |
USAGE_ASSISTANCE_ACCESSIBILITY |
static int |
USAGE_ASSISTANCE_NAVIGATION_GUIDANCE |
static int |
USAGE_ASSISTANCE_SONIFICATION |
static int |
USAGE_ASSISTANT |
static int |
USAGE_GAME |
static int |
USAGE_MEDIA |
static int |
USAGE_NOTIFICATION |
static int |
USAGE_NOTIFICATION_COMMUNICATION_DELAYED |
static int |
USAGE_NOTIFICATION_COMMUNICATION_INSTANT |
static int |
USAGE_NOTIFICATION_COMMUNICATION_REQUEST |
static int |
USAGE_NOTIFICATION_EVENT |
static int |
USAGE_NOTIFICATION_RINGTONE |
static int |
USAGE_UNKNOWN |
static int |
USAGE_VOICE_COMMUNICATION |
static int |
USAGE_VOICE_COMMUNICATION_SIGNALLING |
static String |
UTF16_NAME
The name of the UTF-16 charset.
|
static String |
UTF8_NAME
The name of the UTF-8 charset.
|
static UUID |
UUID_NIL
The Nil UUID as defined by
RFC4122.
|
static int |
VIDEO_SCALING_MODE_DEFAULT
A default video scaling mode for
MediaCodec -based Renderer s. |
static int |
VIDEO_SCALING_MODE_SCALE_TO_FIT |
static int |
VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING |
static UUID |
WIDEVINE_UUID
UUID for the Widevine DRM scheme.
|
Modifier and Type | Method and 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. |
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 int PERCENTAGE_UNSET
public static final long MICROS_PER_SECOND
public static final long NANOS_PER_SECOND
public static final int BITS_PER_BYTE
public static final int BYTES_PER_FLOAT
public static final String ASCII_NAME
public static final String UTF8_NAME
public static final String UTF16_NAME
public static final String SERIF_NAME
public static final String SANS_SERIF_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 AUDIO_SESSION_ID_UNSET
AudioTrack
session identifier. Equal to
AudioManager.AUDIO_SESSION_ID_GENERATE
.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_PCM_FLOAT
public static final int ENCODING_PCM_MU_LAW
public static final int ENCODING_PCM_A_LAW
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 ENCODING_DOLBY_TRUEHD
public static final int STREAM_TYPE_ALARM
AudioManager.STREAM_ALARM
,
Constant Field Valuespublic static final int STREAM_TYPE_DTMF
AudioManager.STREAM_DTMF
,
Constant Field Valuespublic static final int STREAM_TYPE_MUSIC
AudioManager.STREAM_MUSIC
,
Constant Field Valuespublic static final int STREAM_TYPE_NOTIFICATION
public static final int STREAM_TYPE_RING
AudioManager.STREAM_RING
,
Constant Field Valuespublic static final int STREAM_TYPE_SYSTEM
AudioManager.STREAM_SYSTEM
,
Constant Field Valuespublic static final int STREAM_TYPE_VOICE_CALL
public static final int STREAM_TYPE_USE_DEFAULT
public static final int STREAM_TYPE_DEFAULT
public static final int CONTENT_TYPE_MOVIE
public static final int CONTENT_TYPE_MUSIC
public static final int CONTENT_TYPE_SONIFICATION
public static final int CONTENT_TYPE_SPEECH
public static final int CONTENT_TYPE_UNKNOWN
public static final int FLAG_AUDIBILITY_ENFORCED
public static final int USAGE_ALARM
AudioAttributes.USAGE_ALARM
,
Constant Field Valuespublic static final int USAGE_ASSISTANCE_ACCESSIBILITY
public static final int USAGE_ASSISTANCE_NAVIGATION_GUIDANCE
public static final int USAGE_ASSISTANCE_SONIFICATION
public static final int USAGE_ASSISTANT
public static final int USAGE_GAME
AudioAttributes.USAGE_GAME
,
Constant Field Valuespublic static final int USAGE_MEDIA
AudioAttributes.USAGE_MEDIA
,
Constant Field Valuespublic static final int USAGE_NOTIFICATION
public static final int USAGE_NOTIFICATION_COMMUNICATION_DELAYED
public static final int USAGE_NOTIFICATION_COMMUNICATION_INSTANT
public static final int USAGE_NOTIFICATION_COMMUNICATION_REQUEST
public static final int USAGE_NOTIFICATION_EVENT
public static final int USAGE_NOTIFICATION_RINGTONE
public static final int USAGE_UNKNOWN
public static final int USAGE_VOICE_COMMUNICATION
public static final int USAGE_VOICE_COMMUNICATION_SIGNALLING
public static final int AUDIOFOCUS_NONE
public static final int AUDIOFOCUS_GAIN
public static final int AUDIOFOCUS_GAIN_TRANSIENT
public static final int AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK
public static final int AUDIOFOCUS_GAIN_TRANSIENT_EXCLUSIVE
public static final int BUFFER_FLAG_KEY_FRAME
public static final int BUFFER_FLAG_END_OF_STREAM
public static final int BUFFER_FLAG_LAST_SAMPLE
public static final int BUFFER_FLAG_ENCRYPTED
public static final int BUFFER_FLAG_DECODE_ONLY
public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT
public static final int VIDEO_SCALING_MODE_SCALE_TO_FIT_WITH_CROPPING
public static final int VIDEO_SCALING_MODE_DEFAULT
MediaCodec
-based Renderer
s.public static final int SELECTION_FLAG_DEFAULT
public static final int SELECTION_FLAG_FORCED
public static final int SELECTION_FLAG_AUTOSELECT
public static final String LANGUAGE_UNDETERMINED
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_AD
public static final int DATA_TYPE_MEDIA_PROGRESSIVE_LIVE
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_CAMERA_MOTION
public static final int TRACK_TYPE_NONE
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_CAMERA_MOTION_BUFFER_SIZE
public static final int DEFAULT_MUXED_BUFFER_SIZE
public static final String CENC_TYPE_cenc
public static final String CENC_TYPE_cbc1
public static final String CENC_TYPE_cens
public static final String CENC_TYPE_cbcs
public static final UUID COMMON_PSSH_UUID
public static final UUID CLEARKEY_UUID
ClearKey is supported on Android devices running Android 5.0 (API Level 21) and up.
public static final UUID WIDEVINE_UUID
Widevine is supported on Android devices running Android 4.3 (API Level 18) and up.
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#createMessage(Target)
. The message payload should be the target Surface
, or
null.public static final int MSG_SET_VOLUME
Renderer
via ExoPlayer#createMessage(Target)
. The message payload should be a Float
with 0 being
silence and 1 being unity gain.public static final int MSG_SET_AUDIO_ATTRIBUTES
Renderer
via ExoPlayer#createMessage(Target)
. The message payload should be an AudioAttributes
instance that will configure the
underlying audio track. If not set, the default audio attributes will be used. They are
suitable for general media playback.
Setting the audio attributes during playback may introduce a short gap in audio output as the audio track is recreated. A new audio session id will also be generated.
If tunneling is enabled by the track selector, the specified audio attributes will be ignored, but they will take effect if audio is later played without tunneling.
If the device is running a build before platform API version 21, audio attributes cannot be
set directly on the underlying audio track. In this case, the usage will be mapped onto an
equivalent stream type using Util.getStreamTypeForAudioUsage(int)
.
To get audio attributes that are equivalent to a legacy stream type, pass the stream type to
Util.getAudioUsageForStreamType(int)
and use the returned C.AudioUsage
to build
an audio attributes instance.
public static final int MSG_SET_SCALING_MODE
MediaCodec
-based video Renderer
via ExoPlayer#createMessage(Target)
. The message payload should be one of the integer
scaling modes in C.VideoScalingMode
.
Note that the scaling mode only applies if the Surface
targeted by the renderer is
owned by a SurfaceView
.
public static final int MSG_SET_AUX_EFFECT_INFO
Renderer
via ExoPlayer#createMessage(Target)
. The message payload should be an AuxEffectInfo
instance representing an auxiliary audio effect for the underlying audio track.public static final int MSG_SET_VIDEO_FRAME_METADATA_LISTENER
Renderer
via ExoPlayer#createMessage(Target)
. The message payload should be a VideoFrameMetadataListener
instance, or null.public static final int MSG_SET_CAMERA_MOTION_LISTENER
Renderer
via ExoPlayer#createMessage(Target)
. The message payload should be a CameraMotionListener
instance, or null.public static final int MSG_CUSTOM_BASE
MSG_*
constants that can be passed to
Renderer
s. These custom constants must be 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 final int STEREO_MODE_STEREO_MESH
public static final int COLOR_SPACE_BT709
public static final int COLOR_SPACE_BT601
public static final int COLOR_SPACE_BT2020
public static final int COLOR_TRANSFER_SDR
public static final int COLOR_TRANSFER_ST2084
public static final int COLOR_TRANSFER_HLG
public static final int COLOR_RANGE_LIMITED
public static final int COLOR_RANGE_FULL
public static final int PROJECTION_RECTANGULAR
public static final int PROJECTION_EQUIRECTANGULAR
public static final int PROJECTION_CUBEMAP
public static final int PROJECTION_MESH
public static final int PRIORITY_PLAYBACK
Larger values indicate higher priorities.
public static final int PRIORITY_DOWNLOAD
Larger values indicate higher priorities.
public static final int NETWORK_TYPE_UNKNOWN
public static final int NETWORK_TYPE_OFFLINE
public static final int NETWORK_TYPE_WIFI
public static final int NETWORK_TYPE_2G
public static final int NETWORK_TYPE_3G
public static final int NETWORK_TYPE_4G
public static final int NETWORK_TYPE_CELLULAR_UNKNOWN
NETWORK_TYPE_2G
, NETWORK_TYPE_3G
, or NETWORK_TYPE_4G
.public static final int NETWORK_TYPE_ETHERNET
public static final int NETWORK_TYPE_OTHER
public static long usToMs(long timeUs)
TIME_UNSET
and TIME_END_OF_SOURCE
values.timeUs
- The time in microseconds.public static long msToUs(long timeMs)
TIME_UNSET
values and TIME_END_OF_SOURCE
values.timeMs
- The time in milliseconds.public static int generateAudioSessionIdV21(Context context)
AudioManager.ERROR
if an error
occurred in which case audio playback may fail.AudioManager.generateAudioSessionId()