@UnstableApi
public final class HevcConfig


HEVC 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 sps_max_num_reorder_pics value.

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 C.StereoMode of the video or NO_VALUE if unknown or not applicable.

final @Nullable NalUnitUtil.H265VpsData

The parsed representation of VPS data or null if not available.

final int

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

Public methods

static HevcConfig

Parses HEVC configuration data.

static HevcConfig

Parses L-HEVC 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.

maxNumReorderPics

public final int maxNumReorderPics

The sps_max_num_reorder_pics value.

If a different value is present for each layer (due to sps_sub_layer_ordering_info_present_flag), this value is the max of the values for all the layers.

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.

stereoMode

@C.StereoMode
public final int stereoMode

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

vpsData

public final @Nullable NalUnitUtil.H265VpsData vpsData

The parsed representation of VPS data or null if not available.

width

public final int width

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

Public methods

parse

public static HevcConfig parse(ParsableByteArray data)

Parses HEVC configuration data.

Parameters
ParsableByteArray data

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

Returns
HevcConfig

A parsed representation of the HEVC configuration data.

Throws
androidx.media3.common.ParserException

If an error occurred parsing the data.

parseLayered

public static HevcConfig parseLayered(ParsableByteArray data, NalUnitUtil.H265VpsData vpsData)

Parses L-HEVC configuration data.

Parameters
ParsableByteArray data

A ParsableByteArray, whose position is set to the start of the L-HEVC configuration data to parse.

NalUnitUtil.H265VpsData vpsData

A parsed representation of VPS data.

Returns
HevcConfig

A parsed representation of the L-HEVC configuration data.

Throws
androidx.media3.common.ParserException

If an error occurred parsing the data.