# EncoderSelector

Artifact: [androidx.media3:media3-transformer](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/transformer/EncoderSelector.java+class:androidx.media3.transformer.EncoderSelector)

*** ** * ** ***

<br />

```
@UnstableApi
interface EncoderSelector
```

<br />

*** ** * ** ***

Selector of `https://developer.android.com/reference/android/media/MediaCodec.html` encoder instances.

## Summary

| ### Constants |
|---|---|
| `const https://developer.android.com/reference/kotlin/androidx/media3/transformer/EncoderSelector!` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/EncoderSelector#DEFAULT()` Default implementation of `EncoderSelector`, which returns the preferred encoders for the given `https://developer.android.com/reference/kotlin/androidx/media3/common/MimeTypes`. |

| ### Public functions |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://developer.android.com/reference/android/media/MediaCodecInfo.html!>!` | `https://developer.android.com/reference/kotlin/androidx/media3/transformer/EncoderSelector#selectEncoderInfos(java.lang.String)(mimeType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!)` Returns a list of encoders that can encode media in the specified `mimeType`, in priority order. |

## Constants

### DEFAULT

```
const val DEFAULT: EncoderSelector!
```

Default implementation of `EncoderSelector`, which returns the preferred encoders for the given `https://developer.android.com/reference/kotlin/androidx/media3/common/MimeTypes`.

The `EncoderSelector` selection result contains only hardware encoders if they exist, or only software encoders otherwise.

## Public functions

### selectEncoderInfos

```
fun selectEncoderInfos(mimeType: String!): ImmutableList<MediaCodecInfo!>!
```

Returns a list of encoders that can encode media in the specified `mimeType`, in priority order.

| Parameters |
|---|---|
| `mimeType: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/MimeTypes` for which an encoder is required. |

| Returns |
|---|---|
| `https://guava.dev/releases/snapshot-android/api/docs/com/google/common/collect/ImmutableList.html<https://developer.android.com/reference/android/media/MediaCodecInfo.html!>!` | An immutable list of `https://developer.android.com/reference/android/media/MediaCodecInfo.html` that support the ` mimeType`. The list may be empty. |