@UnstableApi
public final class AvcConfig


AVC configuration data.

Summary

Public fields

final int

The bit depth of the chroma samples, or NO_VALUE if unknown.

final int

The bit depth of the luma samples, or NO_VALUE if unknown.

final @Nullable String

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

final @C.ColorRange int

The C.ColorRange of the video, or NO_VALUE if unknown or not applicable.

final int

The C.ColorSpace of the video, or NO_VALUE if unknown or not applicable.

final int

The C.ColorTransfer of the video, or NO_VALUE if unknown or not applicable.

final int

The height of each decoded frame, or NO_VALUE if unknown.

final List<byte[]>

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

final int

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

final int

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

final float

The pixel width to height ratio.

final int

The width of each decoded frame, or NO_VALUE if unknown.

Public methods

static AvcConfig

Parses AVC configuration data.

Public fields

bitdepthChroma

public final int bitdepthChroma

The bit depth of the chroma samples, or NO_VALUE if unknown.

bitdepthLuma

public final int bitdepthLuma

The bit depth of the luma samples, or 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 codecs.

colorRange

public final @C.ColorRange int colorRange

The C.ColorRange of the video, or NO_VALUE if unknown or not applicable.

colorSpace

@C.ColorSpace
public final int colorSpace

The C.ColorSpace of the video, or NO_VALUE if unknown or not applicable.

colorTransfer

@C.ColorTransfer
public final int colorTransfer

The C.ColorTransfer of the video, or NO_VALUE if unknown or not applicable.

height

public final int height

The height of each decoded frame, or 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 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 NO_VALUE if unknown.

Public methods

parse

public static AvcConfig parse(ParsableByteArray data)

Parses AVC configuration data.

Parameters
ParsableByteArray data

A ParsableByteArray, whose position is set to the start of the AVC configuration data to parse.

Returns
AvcConfig

A parsed representation of the AVC configuration data.

Throws
androidx.media3.common.ParserException

If an error occurred parsing the data.