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 MediaCodecInfocodecInfoInformation about theMediaCodecbeing configured.MediaCryptocryptoFor DRM protected playbacks, aMediaCryptoto use for decryption.intflagsFormatformatTheFormatfor which the codec is being configured.MediaFormatmediaFormatTheMediaFormatfor which the codec is being configured.SurfacesurfaceFor 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.ConfigurationcreateForAudioDecoding(MediaCodecInfo codecInfo, MediaFormat mediaFormat, Format format, MediaCrypto crypto)Creates a configuration for audio decoding.static MediaCodecAdapter.ConfigurationcreateForVideoDecoding(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 theMediaCodecbeing configured.
-
mediaFormat
public final MediaFormat mediaFormat
TheMediaFormatfor 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 forByteBufferoutput.
-
crypto
@Nullable public final MediaCrypto crypto
For DRM protected playbacks, aMediaCryptoto 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.
-
-