# CodecParameters

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

*** ** * ** ***


```
@UnstableApi
public final class CodecParameters
```

<br />

*** ** * ** ***

An immutable collection of parameters to be applied to a codec.

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters.Builder` A builder for `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters` instances. |

| ### Constants |
|---|---|
| `static final https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters` | `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters#EMPTY()` An empty `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters` instance. |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters.Builder` | `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters#buildUpon()()` Returns a new `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters.Builder` initialized with the values of this instance. |
| `boolean` | `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters#equals(java.lang.Object)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html obj)` |
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html` | `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters#get(java.lang.String)(https://developer.android.com/reference/java/lang/String.html key)` Retrieves a parameter value by its key. |
| `int` | `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters#hashCode()()` |
| `https://developer.android.com/reference/java/util/Set.html<https://developer.android.com/reference/java/lang/String.html>` | `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters#keySet()()` Returns a `https://developer.android.com/reference/java/util/Set.html` of the keys contained in this instance. |

## Constants

### EMPTY

```
public static final CodecParameters EMPTY
```

An empty `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters` instance.

## Public methods

### buildUpon

```
public CodecParameters.Builder buildUpon()
```

Returns a new `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters.Builder` initialized with the values of this instance.

### equals

```
public boolean equals(@Nullable Object obj)
```

### get

```
public @Nullable Object get(String key)
```

Retrieves a parameter value by its key.

**Note:** If the returned value is a `https://developer.android.com/reference/java/nio/ByteBuffer.html`, it must be treated as read-only. Modifying the returned `https://developer.android.com/reference/java/nio/ByteBuffer.html` will affect this `https://developer.android.com/reference/androidx/media3/exoplayer/CodecParameters` instance and may lead to unexpected behavior.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html key` | A string representing the key of the codec parameter. |

| Returns |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html` | The value of the requested parameter, or `null` if the key is not present. |

### hashCode

```
public int hashCode()
```

### keySet

```
public Set<String> keySet()
```

Returns a `https://developer.android.com/reference/java/util/Set.html` of the keys contained in this instance.