@UnstableApi
interface ImageDecoder : Decoder

Known direct subclasses
BitmapFactoryImageDecoder

An image decoder that uses BitmapFactory to decode images.


A Decoder implementation for images.

Summary

Nested types

A factory for image decoders.

Public functions

ImageOutputBuffer?

Returns the next decoded Bitmap in an ImageOutputBuffer.

Unit

Queues an DecoderInputBuffer to the decoder.

Inherited functions

From androidx.media3.decoder.Decoder
I?

Dequeues the next input buffer to be filled and queued to the decoder.

Unit

Flushes the decoder.

String!

Returns the name of the decoder.

Unit

Releases the decoder.

Unit
setOutputStartTimeUs(outputStartTimeUs: Long)

Sets the timestamp from which output buffers should be produced, in microseconds.

Public functions

dequeueOutputBuffer

fun dequeueOutputBuffer(): ImageOutputBuffer?

Returns the next decoded Bitmap in an ImageOutputBuffer.

Returns
ImageOutputBuffer?

The output buffer, or null if an output buffer isn't available.

Throws
androidx.media3.exoplayer.image.ImageDecoderException

If a decoder error has occurred.

queueInputBuffer

fun queueInputBuffer(inputBuffer: DecoderInputBuffer!): Unit

Queues an DecoderInputBuffer to the decoder.

Parameters
inputBuffer: DecoderInputBuffer!

The input buffer containing the byte data corresponding to the image(s).

Throws
androidx.media3.exoplayer.image.ImageDecoderException

If a decoder error has occurred.