MediaCodecAdapter.Configuration


class MediaCodecAdapter.Configuration


Configuration parameters for a MediaCodecAdapter.

Summary

Public functions

java-static MediaCodecAdapter.Configuration!
createForAudioDecoding(
    codecInfo: MediaCodecInfo!,
    mediaFormat: MediaFormat!,
    format: Format!,
    crypto: MediaCrypto?
)

Creates a configuration for audio decoding.

java-static MediaCodecAdapter.Configuration!
createForVideoDecoding(
    codecInfo: MediaCodecInfo!,
    mediaFormat: MediaFormat!,
    format: Format!,
    surface: Surface?,
    crypto: MediaCrypto?
)

Creates a configuration for video decoding.

Public properties

MediaCodecInfo!

Information about the MediaCodec being configured.

MediaCrypto?

For DRM protected playbacks, a MediaCrypto to use for decryption.

Int

See configure.

Format!

The Format for which the codec is being configured.

MediaFormat!

The MediaFormat for which the codec is being configured.

Surface?

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

Public functions

createForAudioDecoding

java-static fun createForAudioDecoding(
    codecInfo: MediaCodecInfo!,
    mediaFormat: MediaFormat!,
    format: Format!,
    crypto: MediaCrypto?
): MediaCodecAdapter.Configuration!

Creates a configuration for audio decoding.

Parameters
codecInfo: MediaCodecInfo!

See codecInfo.

mediaFormat: MediaFormat!

See mediaFormat.

format: Format!

See format.

crypto: MediaCrypto?

See crypto.

Returns
MediaCodecAdapter.Configuration!

The created instance.

createForVideoDecoding

java-static fun createForVideoDecoding(
    codecInfo: MediaCodecInfo!,
    mediaFormat: MediaFormat!,
    format: Format!,
    surface: Surface?,
    crypto: MediaCrypto?
): MediaCodecAdapter.Configuration!

Creates a configuration for video decoding.

Parameters
codecInfo: MediaCodecInfo!

See codecInfo.

mediaFormat: MediaFormat!

See mediaFormat.

format: Format!

See format.

surface: Surface?

See surface.

crypto: MediaCrypto?

See crypto.

Returns
MediaCodecAdapter.Configuration!

The created instance.

Public properties

codecInfo

val codecInfoMediaCodecInfo!

Information about the MediaCodec being configured.

crypto

val cryptoMediaCrypto?

For DRM protected playbacks, a MediaCrypto to use for decryption.

flags

val flagsInt

See configure.

format

val formatFormat!

The Format for which the codec is being configured.

mediaFormat

val mediaFormatMediaFormat!

The MediaFormat for which the codec is being configured.

surface

val surfaceSurface?

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 ByteBuffer output.