CodecSpecificDataUtil.MediaCodecProfileAndLevel


public final class CodecSpecificDataUtil.MediaCodecProfileAndLevel


A tuple of profile and level constants for MediaCodec.

This is similar to MediaCodecInfo.CodecProfileLevel, except it:

Summary

Constants

static final CodecSpecificDataUtil.MediaCodecProfileAndLevel

An instance that represents a profile and level combination not representable with MediaCodecInfo.CodecProfileLevel constants.

Public fields

final boolean
final int
final int

Public constructors

MediaCodecProfileAndLevel(int profile, int level)

Constructs an instance with values from MediaCodecInfo.CodecProfileLevel.

Public methods

int

Returns the level value, which will be a constant from MediaCodecInfo.CodecProfileLevel.

int

Returns the profile value, which will be a constant from MediaCodecInfo.CodecProfileLevel.

boolean

Returns whether the profile and level represented by this instance can be represented by MediaCodecInfo.CodecProfileLevel constants.

Constants

UNSUPPORTABLE

public static final CodecSpecificDataUtil.MediaCodecProfileAndLevel UNSUPPORTABLE

An instance that represents a profile and level combination not representable with MediaCodecInfo.CodecProfileLevel constants.

Public fields

isSupportableByMediaCodec

public final boolean isSupportableByMediaCodec

level

public final int level

profile

public final int profile

Public constructors

MediaCodecProfileAndLevel

public MediaCodecProfileAndLevel(int profile, int level)

Constructs an instance with values from MediaCodecInfo.CodecProfileLevel.

Public methods

getLevel

public int getLevel()

Returns the level value, which will be a constant from MediaCodecInfo.CodecProfileLevel.

Callers must check isSupportableByMediaCodec returns true before calling this method.

getProfile

public int getProfile()

Returns the profile value, which will be a constant from MediaCodecInfo.CodecProfileLevel.

Callers must check isSupportableByMediaCodec returns true before calling this method.

isSupportableByMediaCodec

public boolean isSupportableByMediaCodec()

Returns whether the profile and level represented by this instance can be represented by MediaCodecInfo.CodecProfileLevel constants.

This is based on the set of constants available when this library was compiled. It is not related to the SDK_INT of the current device.