VideoEncoderConfiguration


@ExperimentalApi
public final class VideoEncoderConfiguration


The complete configuration of a Video Encoder, including which android.media.MediaCodec is used, the settings to apply, and the bitrate to use.

Summary

Public fields

final Format

The Format the codec described by this configuration produces.

final boolean

Whether this is a fallback configuration.

final VideoEncoderSettings

The VideoEncoderSettings used to configure the codec described by this configuration.

Public constructors

VideoEncoderConfiguration(
    VideoEncoderSettings videoEncoderSettings,
    Format format,
    boolean isFallback
)

Creates an instance.

Public methods

boolean
int
String

Public fields

format

public final Format format

The Format the codec described by this configuration produces.

sampleMimeType is always set. width, height, frameRate and averageBitrate are NO_VALUE if not configured.

isFallback

public final boolean isFallback

Whether this is a fallback configuration.

videoEncoderSettings

public final VideoEncoderSettings videoEncoderSettings

The VideoEncoderSettings used to configure the codec described by this configuration.

Public constructors

VideoEncoderConfiguration

public VideoEncoderConfiguration(
    VideoEncoderSettings videoEncoderSettings,
    Format format,
    boolean isFallback
)

Creates an instance.

format must have a non-null sampleMimeType. It may optionally specify the resolution (width, height, and frameRate) and bitrate (averageBitrate); unset fields must be left at NO_VALUE, and any set resolution or bitrate fields must be strictly positive (with all three resolution fields set together).

Parameters
VideoEncoderSettings videoEncoderSettings

The VideoEncoderSettings used to configure the encoder.

Format format

The Format of the encoded video stream.

boolean isFallback

Whether this is a fallback configuration.

Throws
java.lang.IllegalArgumentException

If sampleMimeType is null, if only a subset of resolution fields (width, height, frameRate) are set, or if any set resolution or bitrate field is not strictly positive.

Public methods

equals

public boolean equals(@Nullable Object o)

hashCode

public int hashCode()

toString

public String toString()