Back to Exoplayer

MediaCodecAdapter.Configuration (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/mediacodec/MediaCodecAdapter.Configuration.html

latest7.2 KB
Original Source

Package com.google.android.exoplayer2.mediacodec

Class MediaCodecAdapter.Configuration


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.

Field Summary

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. |

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. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

codecInfo

public final[MediaCodecInfo](MediaCodecInfo.html "class in com.google.android.exoplayer2.mediacodec")codecInfo

Information about the MediaCodec being configured.

- 

mediaFormat

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.

- 

format

public final[Format](../Format.html "class in com.google.android.exoplayer2")format

The Format for which the codec is being configured.

- 

surface

@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.

- 

crypto

@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.

- 

flags

public final int flags

See MediaCodec.configure(android.media.MediaFormat, android.view.Surface, android.media.MediaCrypto, int).

Method Detail

- 

createForAudioDecoding

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.

- 

createForVideoDecoding

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.