public final class

MediaCodecAdapter.Configuration

extends java.lang.Object

 java.lang.Object

↳androidx.media3.exoplayer.mediacodec.MediaCodecAdapter.Configuration

Overview

Configuration parameters for a MediaCodecAdapter.

Summary

Fields
public final MediaCodecInfocodecInfo

Information about the MediaCodec being configured.

public final MediaCryptocrypto

For DRM protected playbacks, a to use for decryption.

public final Formatformat

The Format for which the codec is being configured.

public final LoudnessCodecControllerloudnessCodecController

The LoudnessCodecController for audio codecs.

public final MediaFormatmediaFormat

The for which the codec is being configured.

public final Surfacesurface

For video decoding, the output where the object will render the decoded frames.

Methods
public static MediaCodecAdapter.ConfigurationcreateForAudioDecoding(MediaCodecInfo codecInfo, MediaFormat mediaFormat, Format format, MediaCrypto crypto, LoudnessCodecController loudnessCodecController)

Creates a configuration for audio decoding.

public static MediaCodecAdapter.ConfigurationcreateForVideoDecoding(MediaCodecInfo codecInfo, MediaFormat mediaFormat, Format format, Surface surface, MediaCrypto crypto)

Creates a configuration for video decoding.

from java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Fields

public final MediaCodecInfo codecInfo

Information about the MediaCodec being configured.

public final MediaFormat mediaFormat

The for which the codec is being configured.

public final Format format

The Format for which the codec is being configured.

public final Surface surface

For video decoding, the output where the object will render the decoded frames. This must be null if the codec is not a video decoder, or if it is configured for java.nio.ByteBuffer output.

public final MediaCrypto crypto

For DRM protected playbacks, a to use for decryption.

public final LoudnessCodecController loudnessCodecController

The LoudnessCodecController for audio codecs.

Methods

public static MediaCodecAdapter.Configuration createForAudioDecoding(MediaCodecInfo codecInfo, MediaFormat mediaFormat, Format format, MediaCrypto crypto, LoudnessCodecController loudnessCodecController)

Creates a configuration for audio decoding.

Parameters:

codecInfo: See MediaCodecAdapter.Configuration.codecInfo.
mediaFormat: See MediaCodecAdapter.Configuration.mediaFormat.
format: See MediaCodecAdapter.Configuration.format.
crypto: See MediaCodecAdapter.Configuration.crypto.
loudnessCodecController: See MediaCodecAdapter.Configuration.loudnessCodecController.

Returns:

The created instance.

public static MediaCodecAdapter.Configuration createForVideoDecoding(MediaCodecInfo codecInfo, MediaFormat mediaFormat, Format format, Surface surface, MediaCrypto crypto)

Creates a configuration for video decoding.

Parameters:

codecInfo: See MediaCodecAdapter.Configuration.codecInfo.
mediaFormat: See MediaCodecAdapter.Configuration.mediaFormat.
format: See MediaCodecAdapter.Configuration.format.
surface: See MediaCodecAdapter.Configuration.surface.
crypto: See MediaCodecAdapter.Configuration.crypto.

Returns:

The created instance.