Added in API level 21

EncoderCapabilities


class EncoderCapabilities
kotlin.Any
   ↳ android.media.MediaCodecInfo.EncoderCapabilities

A class that supports querying the encoding capabilities of a codec.

Summary

Constants
static Int

Constant bitrate mode

static Int

Constant bitrate mode with frame drops

static Int

Constant quality mode

static Int

Variable bitrate mode

Public methods
Range<Int!>!

Returns the supported range of encoder complexity values.

Range<Int!>!

Returns the supported range of quality values.

Boolean

Query whether a bitrate mode is supported.

Constants

BITRATE_MODE_CBR

Added in API level 21
static val BITRATE_MODE_CBR: Int

Constant bitrate mode

Value: 2

BITRATE_MODE_CBR_FD

Added in API level 31
static val BITRATE_MODE_CBR_FD: Int

Constant bitrate mode with frame drops

Value: 3

BITRATE_MODE_CQ

Added in API level 21
static val BITRATE_MODE_CQ: Int

Constant quality mode

Value: 0

BITRATE_MODE_VBR

Added in API level 21
static val BITRATE_MODE_VBR: Int

Variable bitrate mode

Value: 1

Public methods

getComplexityRange

Added in API level 21
fun getComplexityRange(): Range<Int!>!

Returns the supported range of encoder complexity values.

Some codecs may support multiple complexity levels, where higher complexity values use more encoder tools (e.g. perform more intensive calculations) to improve the quality or the compression ratio. Use a lower value to save power and/or time.

getQualityRange

Added in API level 28
fun getQualityRange(): Range<Int!>!

Returns the supported range of quality values. Quality is implementation-specific. As a general rule, a higher quality setting results in a better image quality and a lower compression ratio.

isBitrateModeSupported

Added in API level 21
fun isBitrateModeSupported(mode: Int): Boolean

Query whether a bitrate mode is supported.