MediaCodecInfo.EncoderCapabilities


public static final class MediaCodecInfo.EncoderCapabilities
extends Object

java.lang.Object
   ↳ android.media.MediaCodecInfo.EncoderCapabilities


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

Summary

Constants

int BITRATE_MODE_CBR

Constant bitrate mode

int BITRATE_MODE_CBR_FD

Constant bitrate mode with frame drops

int BITRATE_MODE_CQ

Constant quality mode

int BITRATE_MODE_VBR

Variable bitrate mode

Public methods

Range<Integer> getComplexityRange()

Returns the supported range of encoder complexity values.

Range<Integer> getQualityRange()

Returns the supported range of quality values.

boolean isBitrateModeSupported(int mode)

Query whether a bitrate mode is supported.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Constants

BITRATE_MODE_CBR

Added in API level 21
public static final int BITRATE_MODE_CBR

Constant bitrate mode

Constant Value: 2 (0x00000002)

BITRATE_MODE_CBR_FD

Added in API level 31
public static final int BITRATE_MODE_CBR_FD

Constant bitrate mode with frame drops

Constant Value: 3 (0x00000003)

BITRATE_MODE_CQ

Added in API level 21
public static final int BITRATE_MODE_CQ

Constant quality mode

Constant Value: 0 (0x00000000)

BITRATE_MODE_VBR

Added in API level 21
public static final int BITRATE_MODE_VBR

Variable bitrate mode

Constant Value: 1 (0x00000001)

Public methods

getComplexityRange

Added in API level 21
public Range<Integer> getComplexityRange ()

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.

Returns
Range<Integer>

getQualityRange

Added in API level 28
public Range<Integer> getQualityRange ()

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.

Returns
Range<Integer>

isBitrateModeSupported

Added in API level 21
public boolean isBitrateModeSupported (int mode)

Query whether a bitrate mode is supported.

Parameters
mode int

Returns
boolean