# Format.Builder

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

*** ** * ** ***


```
@UnstableApi
public final class Format.Builder
```

<br />

*** ** * ** ***

Builds `https://developer.android.com/reference/androidx/media3/common/Format` instances.

Use Format#buildUpon() to obtain a builder representing an existing `https://developer.android.com/reference/androidx/media3/common/Format`.

When building formats, populate all fields whose values are known and relevant to the type of format being constructed. See the `https://developer.android.com/reference/androidx/media3/common/Format` Javadoc for information about which fields should be set for different types of format.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder#Builder()()` Creates a new instance with default values. |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format` | `https://developer.android.com/reference/androidx/media3/common/Format.Builder#build()()` |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setAccessibilityChannel(int)(int accessibilityChannel)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#accessibilityChannel()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setAuxiliaryTrackType(int)(@https://developer.android.com/reference/androidx/media3/common/C.AuxiliaryTrackType int auxiliaryTrackType)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#auxiliaryTrackType()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setAverageBitrate(int)(int averageBitrate)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#averageBitrate()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setChannelCount(int)(int channelCount)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#channelCount()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setChannelMask(int)(int channelMask)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#channelMask()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setCodecs(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html codecs)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#codecs()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setColorInfo(androidx.media3.common.ColorInfo)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/ColorInfo colorInfo)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#colorInfo()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setContainerMimeType(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html containerMimeType)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#containerMimeType()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setCryptoType(int)(@https://developer.android.com/reference/androidx/media3/common/C.CryptoType int cryptoType)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#cryptoType()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setCueReplacementBehavior(int)( @https://developer.android.com/reference/androidx/media3/common/Format.CueReplacementBehavior int cueReplacementBehavior )` Sets `https://developer.android.com/reference/androidx/media3/common/Format#cueReplacementBehavior()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://developer.android.com/reference/androidx/media3/common/util/UnstableApi @https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setCustomData(java.lang.Object)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html customData)` Sets the opaque object `https://developer.android.com/reference/androidx/media3/common/Format#customData()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setDecodedHeight(int)(int decodedHeight)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#decodedHeight()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setDecodedWidth(int)(int decodedWidth)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#decodedWidth()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setDrmInitData(androidx.media3.common.DrmInitData)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/DrmInitData drmInitData)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#drmInitData()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setEncoderDelay(int)(int encoderDelay)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#encoderDelay()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setEncoderPadding(int)(int encoderPadding)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#encoderPadding()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setFrameRate(float)(float frameRate)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#frameRate()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setHeight(int)(int height)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#height()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setId(int)(int id)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#id()` to `https://developer.android.com/reference/java/lang/Integer.html#toString()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setId(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html id)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#id()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setInitializationData(java.util.List<byte[]>)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/util/List.html<byte[]> initializationData)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#initializationData()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setLabel(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html label)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#label()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setLabels(java.util.List<androidx.media3.common.Label>)(https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/common/Label> labels)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#labels()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setLanguage(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html language)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#language()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setMaxInputSize(int)(int maxInputSize)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#maxInputSize()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setMaxNumReorderSamples(int)(int maxNumReorderSamples)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#maxNumReorderSamples()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setMaxSubLayers(int)(int maxSubLayers)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#maxSubLayers()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setMetadata(androidx.media3.common.Metadata)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/Metadata metadata)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#metadata()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setMirrorHorizontal(boolean)(boolean mirrorHorizontal)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#mirrorHorizontal()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setPcmEncoding(int)(@https://developer.android.com/reference/androidx/media3/common/C.PcmEncoding int pcmEncoding)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#pcmEncoding()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setPeakBitrate(int)(int peakBitrate)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#peakBitrate()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://developer.android.com/reference/androidx/media3/common/util/UnstableApi @https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setPixelFormat(int)(int pixelFormat)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#pixelFormat()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setPixelWidthHeightRatio(float)(float pixelWidthHeightRatio)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#pixelWidthHeightRatio()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://developer.android.com/reference/androidx/media3/common/util/UnstableApi @https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setPrimaryTrackGroupId(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html primaryTrackGroupId)` Sets the `https://developer.android.com/reference/androidx/media3/common/TrackGroup#id()` of the primary `https://developer.android.com/reference/androidx/media3/common/TrackGroup` this format is embedded into. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setProjectionData(byte[])(@https://developer.android.com/reference/androidx/annotation/Nullable byte[] projectionData)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#projectionData()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setRoleFlags(int)(@https://developer.android.com/reference/androidx/media3/common/C.RoleFlags int roleFlags)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#roleFlags()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setRotationDegrees(int)(int rotationDegrees)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#rotationDegrees()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setSampleMimeType(java.lang.String)(@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html sampleMimeType)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#sampleMimeType()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setSampleRate(int)(int sampleRate)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#sampleRate()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setSelectionFlags(int)(@https://developer.android.com/reference/androidx/media3/common/C.SelectionFlags int selectionFlags)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#selectionFlags()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setSelectionPriority(float)(float selectionPriority)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#selectionPriority()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setStereoMode(int)(@https://developer.android.com/reference/androidx/media3/common/C.StereoMode int stereoMode)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#stereoMode()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setSubsampleOffsetUs(long)(long subsampleOffsetUs)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#subsampleOffsetUs()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setTileCountHorizontal(int)(int tileCountHorizontal)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#tileCountHorizontal()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setTileCountVertical(int)(int tileCountVertical)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#tileCountVertical()`. |
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/androidx/media3/common/Format.Builder#setWidth(int)(int width)` Sets `https://developer.android.com/reference/androidx/media3/common/Format#width()`. |

## Public constructors

### Builder

```
public Builder()
```

Creates a new instance with default values.

## Public methods

### build

```
public Format build()
```

### setAccessibilityChannel

```
@CanIgnoreReturnValue
public Format.Builder setAccessibilityChannel(int accessibilityChannel)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#accessibilityChannel()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `int accessibilityChannel` | The `https://developer.android.com/reference/androidx/media3/common/Format#accessibilityChannel()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setAuxiliaryTrackType

```
@CanIgnoreReturnValue
public Format.Builder setAuxiliaryTrackType(@C.AuxiliaryTrackType int auxiliaryTrackType)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#auxiliaryTrackType()`. The default value is `https://developer.android.com/reference/androidx/media3/common/C#AUXILIARY_TRACK_TYPE_UNDEFINED()`.

This must be set to a value other than `https://developer.android.com/reference/androidx/media3/common/C#AUXILIARY_TRACK_TYPE_UNDEFINED()` only when `https://developer.android.com/reference/androidx/media3/common/Format.Builder#setRoleFlags(int)` contains `https://developer.android.com/reference/androidx/media3/common/C#ROLE_FLAG_AUXILIARY()`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/common/C.AuxiliaryTrackType int auxiliaryTrackType` | The `https://developer.android.com/reference/androidx/media3/common/Format#auxiliaryTrackType()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setAverageBitrate

```
@CanIgnoreReturnValue
public Format.Builder setAverageBitrate(int averageBitrate)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#averageBitrate()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `int averageBitrate` | The `https://developer.android.com/reference/androidx/media3/common/Format#averageBitrate()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setChannelCount

```
@CanIgnoreReturnValue
public Format.Builder setChannelCount(int channelCount)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#channelCount()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

If both the channel count and the `https://developer.android.com/reference/androidx/media3/common/Format.Builder#setChannelMask(int)` are set (i.e. not `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`), the number of set bits in the channel mask must equal the channel count.

| Parameters |
|---|---|
| `int channelCount` | The `https://developer.android.com/reference/androidx/media3/common/Format#channelCount()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setChannelMask

```
@CanIgnoreReturnValue
public Format.Builder setChannelMask(int channelMask)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#channelMask()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

If both the `https://developer.android.com/reference/androidx/media3/common/Format.Builder#setChannelCount(int)` and the channel mask are set (i.e. not `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`), the number of set bits in the channel mask must equal the channel count.

| Parameters |
|---|---|
| `int channelMask` | The `https://developer.android.com/reference/androidx/media3/common/Format#channelMask()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setCodecs

```
@CanIgnoreReturnValue
public Format.Builder setCodecs(@Nullable String codecs)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#codecs()`. The default value is `null`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html codecs` | The `https://developer.android.com/reference/androidx/media3/common/Format#codecs()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setColorInfo

```
@CanIgnoreReturnValue
public Format.Builder setColorInfo(@Nullable ColorInfo colorInfo)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#colorInfo()`. The default value is `null`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/ColorInfo colorInfo` | The `https://developer.android.com/reference/androidx/media3/common/Format#colorInfo()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setContainerMimeType

```
@CanIgnoreReturnValue
public Format.Builder setContainerMimeType(@Nullable String containerMimeType)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#containerMimeType()`. The default value is `null`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html containerMimeType` | The `https://developer.android.com/reference/androidx/media3/common/Format#containerMimeType()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setCryptoType

```
@CanIgnoreReturnValue
public Format.Builder setCryptoType(@C.CryptoType int cryptoType)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#cryptoType()`. The default value is `https://developer.android.com/reference/androidx/media3/common/C#CRYPTO_TYPE_NONE()`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/common/C.CryptoType int cryptoType` | The `https://developer.android.com/reference/androidx/media3/common/C.CryptoType`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setCueReplacementBehavior

```
@CanIgnoreReturnValue
public Format.Builder setCueReplacementBehavior(
    @Format.CueReplacementBehavior int cueReplacementBehavior
)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#cueReplacementBehavior()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#CUE_REPLACEMENT_BEHAVIOR_MERGE()`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/common/Format.CueReplacementBehavior int cueReplacementBehavior` | The `https://developer.android.com/reference/androidx/media3/common/Format.CueReplacementBehavior`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setCustomData

```
@UnstableApi
@CanIgnoreReturnValue
public Format.Builder setCustomData(@Nullable Object customData)
```

Sets the opaque object `https://developer.android.com/reference/androidx/media3/common/Format#customData()`. The default value is null.

This value is not included in serialized `https://developer.android.com/reference/android/os/Bundle.html` instances of this class that are used to transfer data to other processes.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html customData` | The `https://developer.android.com/reference/androidx/media3/common/Format#customData()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setDecodedHeight

```
@CanIgnoreReturnValue
public Format.Builder setDecodedHeight(int decodedHeight)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#decodedHeight()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `int decodedHeight` | The `https://developer.android.com/reference/androidx/media3/common/Format#decodedHeight()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setDecodedWidth

```
@CanIgnoreReturnValue
public Format.Builder setDecodedWidth(int decodedWidth)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#decodedWidth()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `int decodedWidth` | The `https://developer.android.com/reference/androidx/media3/common/Format#decodedWidth()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setDrmInitData

```
@CanIgnoreReturnValue
public Format.Builder setDrmInitData(@Nullable DrmInitData drmInitData)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#drmInitData()`. The default value is `null`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/DrmInitData drmInitData` | The `https://developer.android.com/reference/androidx/media3/common/Format#drmInitData()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setEncoderDelay

```
@CanIgnoreReturnValue
public Format.Builder setEncoderDelay(int encoderDelay)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#encoderDelay()`. The default value is 0.

| Parameters |
|---|---|
| `int encoderDelay` | The `https://developer.android.com/reference/androidx/media3/common/Format#encoderDelay()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setEncoderPadding

```
@CanIgnoreReturnValue
public Format.Builder setEncoderPadding(int encoderPadding)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#encoderPadding()`. The default value is 0.

| Parameters |
|---|---|
| `int encoderPadding` | The `https://developer.android.com/reference/androidx/media3/common/Format#encoderPadding()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setFrameRate

```
@CanIgnoreReturnValue
public Format.Builder setFrameRate(float frameRate)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#frameRate()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `float frameRate` | The `https://developer.android.com/reference/androidx/media3/common/Format#frameRate()`, which must be positive or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setHeight

```
@CanIgnoreReturnValue
public Format.Builder setHeight(int height)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#height()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `int height` | The `https://developer.android.com/reference/androidx/media3/common/Format#height()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setId

```
@CanIgnoreReturnValue
public Format.Builder setId(int id)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#id()` to `https://developer.android.com/reference/java/lang/Integer.html#toString()`. The default value is `null`.

| Parameters |
|---|---|
| `int id` | The `https://developer.android.com/reference/androidx/media3/common/Format#id()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setId

```
@CanIgnoreReturnValue
public Format.Builder setId(@Nullable String id)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#id()`. The default value is `null`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html id` | The `https://developer.android.com/reference/androidx/media3/common/Format#id()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setInitializationData

```
@CanIgnoreReturnValue
public Format.Builder setInitializationData(@Nullable List<byte[]> initializationData)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#initializationData()`. The default value is `null`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/util/List.html<byte[]> initializationData` | The `https://developer.android.com/reference/androidx/media3/common/Format#initializationData()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setLabel

```
@CanIgnoreReturnValue
public Format.Builder setLabel(@Nullable String label)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#label()`. The default value is `null`.

If both this default label and a list of `https://developer.android.com/reference/androidx/media3/common/Format.Builder#setLabels(java.util.List<androidx.media3.common.Label>)` are set, this default label must be part of label list.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html label` | The `https://developer.android.com/reference/androidx/media3/common/Format#label()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setLabels

```
@CanIgnoreReturnValue
public Format.Builder setLabels(List<Label> labels)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#labels()`. The default value is an empty list.

If both the default `https://developer.android.com/reference/androidx/media3/common/Format.Builder#setLabel(java.lang.String)` and this list are set, the default label must be part of this list of labels.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/media3/common/Label> labels` | The `https://developer.android.com/reference/androidx/media3/common/Format#labels()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setLanguage

```
@CanIgnoreReturnValue
public Format.Builder setLanguage(@Nullable String language)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#language()`. The default value is `null`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html language` | The `https://developer.android.com/reference/androidx/media3/common/Format#language()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setMaxInputSize

```
@CanIgnoreReturnValue
public Format.Builder setMaxInputSize(int maxInputSize)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#maxInputSize()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `int maxInputSize` | The `https://developer.android.com/reference/androidx/media3/common/Format#maxInputSize()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setMaxNumReorderSamples

```
@CanIgnoreReturnValue
public Format.Builder setMaxNumReorderSamples(int maxNumReorderSamples)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#maxNumReorderSamples()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `int maxNumReorderSamples` | `https://developer.android.com/reference/androidx/media3/common/Format#maxNumReorderSamples()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setMaxSubLayers

```
@CanIgnoreReturnValue
public Format.Builder setMaxSubLayers(int maxSubLayers)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#maxSubLayers()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `int maxSubLayers` | The `https://developer.android.com/reference/androidx/media3/common/Format#maxSubLayers()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setMetadata

```
@CanIgnoreReturnValue
public Format.Builder setMetadata(@Nullable Metadata metadata)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#metadata()`. The default value is `null`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/androidx/media3/common/Metadata metadata` | The `https://developer.android.com/reference/androidx/media3/common/Format#metadata()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setMirrorHorizontal

```
@CanIgnoreReturnValue
public Format.Builder setMirrorHorizontal(boolean mirrorHorizontal)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#mirrorHorizontal()`. The default value is `false`.

| Parameters |
|---|---|
| `boolean mirrorHorizontal` | The `https://developer.android.com/reference/androidx/media3/common/Format#mirrorHorizontal()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setPcmEncoding

```
@CanIgnoreReturnValue
public Format.Builder setPcmEncoding(@C.PcmEncoding int pcmEncoding)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#pcmEncoding()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/common/C.PcmEncoding int pcmEncoding` | The `https://developer.android.com/reference/androidx/media3/common/Format#pcmEncoding()`. Value is one of the following: - `Format.NO_VALUE` <br /> |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setPeakBitrate

```
@CanIgnoreReturnValue
public Format.Builder setPeakBitrate(int peakBitrate)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#peakBitrate()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `int peakBitrate` | The `https://developer.android.com/reference/androidx/media3/common/Format#peakBitrate()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setPixelFormat

```
@UnstableApi
@CanIgnoreReturnValue
public Format.Builder setPixelFormat(int pixelFormat)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#pixelFormat()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `int pixelFormat` | The `https://developer.android.com/reference/androidx/media3/common/Format#pixelFormat()`. Typically one of the `https://developer.android.com/reference/android/hardware/HardwareBuffer.html` format constants. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setPixelWidthHeightRatio

```
@CanIgnoreReturnValue
public Format.Builder setPixelWidthHeightRatio(float pixelWidthHeightRatio)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#pixelWidthHeightRatio()`. The default value is 1.0f.

| Parameters |
|---|---|
| `float pixelWidthHeightRatio` | The `https://developer.android.com/reference/androidx/media3/common/Format#pixelWidthHeightRatio()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setPrimaryTrackGroupId

```
@UnstableApi
@CanIgnoreReturnValue
public Format.Builder setPrimaryTrackGroupId(@Nullable String primaryTrackGroupId)
```

Sets the `https://developer.android.com/reference/androidx/media3/common/TrackGroup#id()` of the primary `https://developer.android.com/reference/androidx/media3/common/TrackGroup` this format is embedded into.

If `null`, the format is not known to be embedded in another stream. The default value is `null`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html primaryTrackGroupId` | The `https://developer.android.com/reference/androidx/media3/common/TrackGroup#id()` of the primary `https://developer.android.com/reference/androidx/media3/common/TrackGroup` this format is embedded into. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setProjectionData

```
@CanIgnoreReturnValue
public Format.Builder setProjectionData(@Nullable byte[] projectionData)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#projectionData()`. The default value is `null`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable byte[] projectionData` | The `https://developer.android.com/reference/androidx/media3/common/Format#projectionData()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setRoleFlags

```
@CanIgnoreReturnValue
public Format.Builder setRoleFlags(@C.RoleFlags int roleFlags)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#roleFlags()`. The default value is 0.

When `roleFlags` includes `https://developer.android.com/reference/androidx/media3/common/C#ROLE_FLAG_AUXILIARY()`, then the specific `https://developer.android.com/reference/androidx/media3/common/C.AuxiliaryTrackType` can also be `https://developer.android.com/reference/androidx/media3/common/Format.Builder#setAuxiliaryTrackType(int)`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/common/C.RoleFlags int roleFlags` | The `https://developer.android.com/reference/androidx/media3/common/Format#roleFlags()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setRotationDegrees

```
@CanIgnoreReturnValue
public Format.Builder setRotationDegrees(int rotationDegrees)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#rotationDegrees()`. The default value is 0.

| Parameters |
|---|---|
| `int rotationDegrees` | The `https://developer.android.com/reference/androidx/media3/common/Format#rotationDegrees()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setSampleMimeType

```
@CanIgnoreReturnValue
public Format.Builder setSampleMimeType(@Nullable String sampleMimeType)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#sampleMimeType()`. The default value is `null`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html sampleMimeType` | `https://developer.android.com/reference/androidx/media3/common/Format#sampleMimeType()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setSampleRate

```
@CanIgnoreReturnValue
public Format.Builder setSampleRate(int sampleRate)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#sampleRate()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `int sampleRate` | The `https://developer.android.com/reference/androidx/media3/common/Format#sampleRate()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setSelectionFlags

```
@CanIgnoreReturnValue
public Format.Builder setSelectionFlags(@C.SelectionFlags int selectionFlags)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#selectionFlags()`. The default value is 0.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/common/C.SelectionFlags int selectionFlags` | The `https://developer.android.com/reference/androidx/media3/common/Format#selectionFlags()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setSelectionPriority

```
@CanIgnoreReturnValue
public Format.Builder setSelectionPriority(float selectionPriority)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#selectionPriority()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `float selectionPriority` | The `https://developer.android.com/reference/androidx/media3/common/Format#selectionPriority()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setStereoMode

```
@CanIgnoreReturnValue
public Format.Builder setStereoMode(@C.StereoMode int stereoMode)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#stereoMode()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/media3/common/C.StereoMode int stereoMode` | The `https://developer.android.com/reference/androidx/media3/common/Format#stereoMode()`. Value is one of the following: - `Format.NO_VALUE` <br /> |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setSubsampleOffsetUs

```
@CanIgnoreReturnValue
public Format.Builder setSubsampleOffsetUs(long subsampleOffsetUs)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#subsampleOffsetUs()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#OFFSET_SAMPLE_RELATIVE()`.

| Parameters |
|---|---|
| `long subsampleOffsetUs` | The `https://developer.android.com/reference/androidx/media3/common/Format#subsampleOffsetUs()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setTileCountHorizontal

```
@CanIgnoreReturnValue
public Format.Builder setTileCountHorizontal(int tileCountHorizontal)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#tileCountHorizontal()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `int tileCountHorizontal` | The `https://developer.android.com/reference/androidx/media3/common/Format#tileCountHorizontal()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setTileCountVertical

```
@CanIgnoreReturnValue
public Format.Builder setTileCountVertical(int tileCountVertical)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#tileCountVertical()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `int tileCountVertical` | The `https://developer.android.com/reference/androidx/media3/common/Format#tileCountVertical()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |

### setWidth

```
@CanIgnoreReturnValue
public Format.Builder setWidth(int width)
```

Sets `https://developer.android.com/reference/androidx/media3/common/Format#width()`. The default value is `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()`.

| Parameters |
|---|---|
| `int width` | The `https://developer.android.com/reference/androidx/media3/common/Format#width()`. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/Format.Builder` | The builder. |