public interface

Codec.DecoderFactory

 androidx.media3.transformer.Codec.DecoderFactory

Overview

A factory for decoder instances.

Summary

Fields
public static final Codec.DecoderFactoryDEFAULT

A default DecoderFactory implementation.

Methods
public CodeccreateForAudioDecoding(Format format)

Returns a Codec for audio decoding.

public CodeccreateForVideoDecoding(Format format, Surface outputSurface)

Returns a Codec for video decoding.

Fields

public static final Codec.DecoderFactory DEFAULT

A default DecoderFactory implementation.

Methods

public Codec createForAudioDecoding(Format format)

Returns a Codec for audio decoding.

Parameters:

format: The Format (of the input data) used to determine the underlying MediaCodec and its configuration values.

Returns:

A configured and started decoder wrapper.

public Codec createForVideoDecoding(Format format, Surface outputSurface)

Returns a Codec for video decoding.

Parameters:

format: The Format (of the input data) used to determine the underlying MediaCodec and its configuration values.
outputSurface: The to which the decoder output is rendered.

Returns:

A configured and started decoder wrapper.