# AvcConfig

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

*** ** * ** ***


```
@UnstableApi
public final class AvcConfig
```

<br />

*** ** * ** ***

AVC configuration data.

## Summary

| ### Public fields |
|---|---|
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/AvcConfig#bitdepthChroma()` The bit depth of the chroma samples, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/AvcConfig#bitdepthLuma()` The bit depth of the luma samples, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown. |
| `final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/media3/extractor/AvcConfig#codecs()` An RFC 6381 codecs string representing the video format, or `null` if not known. |
| `final @https://developer.android.com/reference/androidx/media3/common/C.ColorRange int` | `https://developer.android.com/reference/androidx/media3/extractor/AvcConfig#colorRange()` The `https://developer.android.com/reference/androidx/media3/common/C.ColorRange` of the video, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable. |
| `final int` | `@https://developer.android.com/reference/androidx/media3/common/C.ColorSpace https://developer.android.com/reference/androidx/media3/extractor/AvcConfig#colorSpace()` The `https://developer.android.com/reference/androidx/media3/common/C.ColorSpace` of the video, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable. |
| `final int` | `@https://developer.android.com/reference/androidx/media3/common/C.ColorTransfer https://developer.android.com/reference/androidx/media3/extractor/AvcConfig#colorTransfer()` The `https://developer.android.com/reference/androidx/media3/common/C.ColorTransfer` of the video, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/AvcConfig#height()` The height of each decoded frame, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown. |
| `final https://developer.android.com/reference/java/util/List.html<byte[]>` | `https://developer.android.com/reference/androidx/media3/extractor/AvcConfig#initializationData()` List of buffers containing the codec-specific data to be provided to the decoder. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/AvcConfig#maxNumReorderFrames()` The value of `max_num_reorder_frames` read from the VUI parameters, or inferred according to the spec if absent. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/AvcConfig#nalUnitLengthFieldLength()` The length of the NAL unit length field in the bitstream's container, in bytes. |
| `final float` | `https://developer.android.com/reference/androidx/media3/extractor/AvcConfig#pixelWidthHeightRatio()` The pixel width to height ratio. |
| `final int` | `https://developer.android.com/reference/androidx/media3/extractor/AvcConfig#width()` The width of each decoded frame, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown. |

| ### Public methods |
|---|---|
| `static https://developer.android.com/reference/androidx/media3/extractor/AvcConfig` | `https://developer.android.com/reference/androidx/media3/extractor/AvcConfig#parse(androidx.media3.common.util.ParsableByteArray)(https://developer.android.com/reference/androidx/media3/common/util/ParsableByteArray data)` Parses AVC configuration data. |

## Public fields

### bitdepthChroma

```
public final int bitdepthChroma
```

The bit depth of the chroma samples, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown.

### bitdepthLuma

```
public final int bitdepthLuma
```

The bit depth of the luma samples, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown.

### codecs

```
public final @Nullable String codecs
```

An RFC 6381 codecs string representing the video format, or `null` if not known.

See `https://developer.android.com/reference/androidx/media3/common/Format#codecs()`.

### colorRange

```
public final @C.ColorRange int colorRange
```

The `https://developer.android.com/reference/androidx/media3/common/C.ColorRange` of the video, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable.

Value is one of the following:

- `Format.NO_VALUE`

<br />

### colorSpace

```
@C.ColorSpace
public final int colorSpace
```

The `https://developer.android.com/reference/androidx/media3/common/C.ColorSpace` of the video, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable.

Value is one of the following:

- `Format.NO_VALUE`

<br />

### colorTransfer

```
@C.ColorTransfer
public final int colorTransfer
```

The `https://developer.android.com/reference/androidx/media3/common/C.ColorTransfer` of the video, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown or not applicable.

Value is one of the following:

- `Format.NO_VALUE`

<br />

### height

```
public final int height
```

The height of each decoded frame, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown.

### initializationData

```
public final List<byte[]> initializationData
```

List of buffers containing the codec-specific data to be provided to the decoder.

See `https://developer.android.com/reference/androidx/media3/common/Format#initializationData()`.

### maxNumReorderFrames

```
public final int maxNumReorderFrames
```

The value of `max_num_reorder_frames` read from the VUI parameters, or inferred according to the spec if absent.

### nalUnitLengthFieldLength

```
public final int nalUnitLengthFieldLength
```

The length of the NAL unit length field in the bitstream's container, in bytes.

### pixelWidthHeightRatio

```
public final float pixelWidthHeightRatio
```

The pixel width to height ratio.

### width

```
public final int width
```

The width of each decoded frame, or `https://developer.android.com/reference/androidx/media3/common/Format#NO_VALUE()` if unknown.

## Public methods

### parse

```
public static AvcConfig parse(ParsableByteArray data)
```

Parses AVC configuration data.

| Parameters |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/util/ParsableByteArray data` | A `https://developer.android.com/reference/androidx/media3/common/util/ParsableByteArray`, whose position is set to the start of the AVC configuration data to parse. |

| Returns |
|---|---|
| `https://developer.android.com/reference/androidx/media3/extractor/AvcConfig` | A parsed representation of the AVC configuration data. |

| Throws |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/ParserException` | If an error occurred parsing the data. |