EncoderPreference


class EncoderPreference


Defines the configuration for an encoder, including hardware/software preference and constant quality (CQ) bitrate mode preference.

Summary

Nested types

Builder class for constructing a EncoderPreference object from specified parameters.

Constants

const Int

Only choose the encoder that supports constant quality mode.

const Int

This is the default mode.

const Int

Only use a hardware encoder.

const Int

Prefer a hardware encoder, but fall back to a software encoder.

const Int

This is the default mode.

const Int

Only use a software encoder.

const Int

Prefer a software encoder, but fall back to a hardware encoder.

Public functions

Int

Gets the preferred bitrate mode.

java-static EncoderPreference

Gets the default encoder preference.

Int

Gets the preferred encoding type.

String!

Constants

CONSTANT_QUALITY_MODE_ONLY

Added in 1.2.0-alpha01
const val CONSTANT_QUALITY_MODE_ONLY = 1: Int

Only choose the encoder that supports constant quality mode.

CONSTANT_QUALITY_MODE_PREFERRED

Added in 1.2.0-alpha01
const val CONSTANT_QUALITY_MODE_PREFERRED = 0: Int

This is the default mode. Constant quality is not enforced, but encoders with constant quality support are prioritized.

HARDWARE_ENCODER_ONLY

Added in 1.2.0-alpha01
const val HARDWARE_ENCODER_ONLY = 1: Int

Only use a hardware encoder.

HARDWARE_ENCODER_PREFERRED

Added in 1.2.0-alpha01
const val HARDWARE_ENCODER_PREFERRED = 2: Int

Prefer a hardware encoder, but fall back to a software encoder.

NO_ENCODER_PREFERENCE

Added in 1.2.0-alpha01
const val NO_ENCODER_PREFERENCE = 0: Int

This is the default mode. System will use its default behavior.

SOFTWARE_ENCODER_ONLY

Added in 1.2.0-alpha01
const val SOFTWARE_ENCODER_ONLY = 3: Int

Only use a software encoder.

SOFTWARE_ENCODER_PREFERRED

Added in 1.2.0-alpha01
const val SOFTWARE_ENCODER_PREFERRED = 4: Int

Prefer a software encoder, but fall back to a hardware encoder.

Public functions

getBitrateMode

Added in 1.2.0-alpha01
fun getBitrateMode(): Int

Gets the preferred bitrate mode.

Returns
Int

The BitrateMode.

getDefaultEncoderPreference

Added in 1.2.0-alpha01
java-static fun getDefaultEncoderPreference(): EncoderPreference

Gets the default encoder preference.

Returns
EncoderPreference

The EncoderPreference object.

getEncoderType

Added in 1.2.0-alpha01
fun getEncoderType(): Int

Gets the preferred encoding type.

Returns
Int

The EncoderType.

toString

fun toString(): String!