Class MediaCodecAdapter.Configuration
- java.lang.Object
-
- com.google.android.exoplayer2.mediacodec.MediaCodecAdapter.Configuration
-
- Enclosing interface:
- MediaCodecAdapter
public static final class MediaCodecAdapter.Configuration extends Object
Configuration parameters for aMediaCodecAdapter
.
-
-
Field Summary
Fields Modifier and Type Field Description MediaCodecInfo
codecInfo
Information about theMediaCodec
being configured.MediaCrypto
crypto
For DRM protected playbacks, aMediaCrypto
to use for decryption.int
flags
Format
format
TheFormat
for which the codec is being configured.MediaFormat
mediaFormat
TheMediaFormat
for which the codec is being configured.Surface
surface
For video decoding, the output where the object will render the decoded frames.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MediaCodecAdapter.Configuration
createForAudioDecoding(MediaCodecInfo codecInfo, MediaFormat mediaFormat, Format format, MediaCrypto crypto)
Creates a configuration for audio decoding.static MediaCodecAdapter.Configuration
createForVideoDecoding(MediaCodecInfo codecInfo, MediaFormat mediaFormat, Format format, Surface surface, MediaCrypto crypto)
Creates a configuration for video decoding.
-
-
-
Field Detail
-
codecInfo
public final MediaCodecInfo codecInfo
Information about theMediaCodec
being configured.
-
mediaFormat
public final MediaFormat mediaFormat
TheMediaFormat
for which the codec is being configured.
-
surface
@Nullable public final Surface surface
For video decoding, the output where the object will render the decoded frames. This must be null if the codec is not a video decoder, or if it is configured forByteBuffer
output.
-
crypto
@Nullable public final MediaCrypto crypto
For DRM protected playbacks, aMediaCrypto
to use for decryption.
-
flags
public final int flags
-
-
Method Detail
-
createForAudioDecoding
public static MediaCodecAdapter.Configuration createForAudioDecoding(MediaCodecInfo codecInfo, MediaFormat mediaFormat, Format format, @Nullable MediaCrypto crypto)
Creates a configuration for audio decoding.- Parameters:
codecInfo
- SeecodecInfo
.mediaFormat
- SeemediaFormat
.format
- Seeformat
.crypto
- Seecrypto
.- Returns:
- The created instance.
-
createForVideoDecoding
public static MediaCodecAdapter.Configuration createForVideoDecoding(MediaCodecInfo codecInfo, MediaFormat mediaFormat, Format format, @Nullable Surface surface, @Nullable MediaCrypto crypto)
Creates a configuration for video decoding.- Parameters:
codecInfo
- SeecodecInfo
.mediaFormat
- SeemediaFormat
.format
- Seeformat
.surface
- Seesurface
.crypto
- Seecrypto
.- Returns:
- The created instance.
-
-