Back to Exoplayer

MediaCodecSelector (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/mediacodec/MediaCodecSelector.html

latest3.2 KB
Original Source

Package com.google.android.exoplayer2.mediacodec

Interface MediaCodecSelector


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public interfaceMediaCodecSelector

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

Selector of MediaCodec instances.

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static MediaCodecSelector | DEFAULT | Deprecated.

Default implementation of MediaCodecSelector, which returns the preferred decoder for the given format. |

Method Summary

All Methods Instance Methods Abstract Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | List<MediaCodecInfo> | getDecoderInfos​(String mimeType, boolean requiresSecureDecoder, boolean requiresTunnelingDecoder) | Deprecated.

Returns a list of decoders that can decode media in the specified MIME type, in priority order. |

Field Detail

- 

DEFAULT

static final[MediaCodecSelector](MediaCodecSelector.html "interface in com.google.android.exoplayer2.mediacodec")DEFAULT

Deprecated.

Default implementation of MediaCodecSelector, which returns the preferred decoder for the given format.

Method Detail

- 

getDecoderInfos

[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[MediaCodecInfo](MediaCodecInfo.html "class in com.google.android.exoplayer2.mediacodec")> getDecoderInfos​([String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")mimeType,
                                     boolean requiresSecureDecoder,
                                     boolean requiresTunnelingDecoder)
                              throws[MediaCodecUtil.DecoderQueryException](MediaCodecUtil.DecoderQueryException.html "class in com.google.android.exoplayer2.mediacodec")

Deprecated.

Returns a list of decoders that can decode media in the specified MIME type, in priority order. Parameters:mimeType - The MIME type for which a decoder is required.requiresSecureDecoder - Whether a secure decoder is required.requiresTunnelingDecoder - Whether a tunneling decoder is required.Returns:An unmodifiable list of MediaCodecInfos corresponding to decoders. May be empty.Throws:MediaCodecUtil.DecoderQueryException - Thrown if there was an error querying decoders.