docs/doc/reference/com/google/android/exoplayer2/mediacodec/MediaCodecAdapter.Configuration.html
Package com.google.android.exoplayer2.mediacodec
Enclosing interface:MediaCodecAdapter
public static final classMediaCodecAdapter.Configurationextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Configuration parameters for a MediaCodecAdapter.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| MediaCodecInfo | codecInfo |
Information about the MediaCodec being configured.
|
| MediaCrypto | crypto |
For DRM protected playbacks, a MediaCrypto to use for decryption.
|
| int | flags |
See MediaCodec.configure(android.media.MediaFormat, android.view.Surface, android.media.MediaCrypto, int).
|
| Format | format |
The Format for which the codec is being configured.
|
| MediaFormat | mediaFormat |
The MediaFormat for which the codec is being configured.
|
| Surface | surface |
For video decoding, the output where the object will render the decoded frames.
|
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.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public final[MediaCodecInfo](MediaCodecInfo.html "class in com.google.android.exoplayer2.mediacodec")codecInfo
Information about the MediaCodec being configured.
-
public final[MediaFormat](https://developer.android.com/reference/android/media/MediaFormat.html "class or interface in android.media")mediaFormat
The MediaFormat for which the codec is being configured.
-
public final[Format](../Format.html "class in com.google.android.exoplayer2")format
The Format for which the codec is being configured.
-
@Nullable
public final[Surface](https://developer.android.com/reference/android/view/Surface.html "class or interface in android.view")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 for ByteBuffer output.
-
@Nullable
public final[MediaCrypto](https://developer.android.com/reference/android/media/MediaCrypto.html "class or interface in android.media")crypto
For DRM protected playbacks, a MediaCrypto to use for decryption.
-
public final int flags
-
public static[MediaCodecAdapter.Configuration](MediaCodecAdapter.Configuration.html "class in com.google.android.exoplayer2.mediacodec")createForAudioDecoding([MediaCodecInfo](MediaCodecInfo.html "class in com.google.android.exoplayer2.mediacodec")codecInfo,[MediaFormat](https://developer.android.com/reference/android/media/MediaFormat.html "class or interface in android.media")mediaFormat,[Format](../Format.html "class in com.google.android.exoplayer2")format,
@Nullable[MediaCrypto](https://developer.android.com/reference/android/media/MediaCrypto.html "class or interface in android.media")crypto)
Creates a configuration for audio decoding.
Parameters:codecInfo - See codecInfo.mediaFormat - See mediaFormat.format - See format.crypto - See crypto.Returns:The created instance.
-
public static[MediaCodecAdapter.Configuration](MediaCodecAdapter.Configuration.html "class in com.google.android.exoplayer2.mediacodec")createForVideoDecoding([MediaCodecInfo](MediaCodecInfo.html "class in com.google.android.exoplayer2.mediacodec")codecInfo,[MediaFormat](https://developer.android.com/reference/android/media/MediaFormat.html "class or interface in android.media")mediaFormat,[Format](../Format.html "class in com.google.android.exoplayer2")format,
@Nullable[Surface](https://developer.android.com/reference/android/view/Surface.html "class or interface in android.view")surface,
@Nullable[MediaCrypto](https://developer.android.com/reference/android/media/MediaCrypto.html "class or interface in android.media")crypto)
Creates a configuration for video decoding.
Parameters:codecInfo - See codecInfo.mediaFormat - See mediaFormat.format - See format.surface - See surface.crypto - See crypto.Returns:The created instance.