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 |
isBitrateModeSupported(mode: Int) Query whether a bitrate mode is supported. |
Constants
BITRATE_MODE_CBR
static val BITRATE_MODE_CBR: Int
Constant bitrate mode
Value: 2
BITRATE_MODE_CBR_FD
static val BITRATE_MODE_CBR_FD: Int
Constant bitrate mode with frame drops
Value: 3
BITRATE_MODE_CQ
static val BITRATE_MODE_CQ: Int
Constant quality mode
Value: 0
BITRATE_MODE_VBR
static val BITRATE_MODE_VBR: Int
Variable bitrate mode
Value: 1
Public methods
getComplexityRange
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
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
fun isBitrateModeSupported(mode: Int): Boolean
Query whether a bitrate mode is supported.