AsyncStreamDecoder

Decodes the packets of one stream. It is the suspending form of StreamDecoder.

Properties

Link copied to clipboard

How many damaged packets and frames this decoder skipped.

Link copied to clipboard

True once the decoder gave its last frame after a drain.

Link copied to clipboard

The stream this decoder decodes.

Functions

Link copied to clipboard
open suspend override fun close()

Releases the resource. A second call waits for the first and reports the same result. A close finishes even when its caller is cancelled.

Link copied to clipboard
suspend fun flush()

Drops what the decoder holds, as after a seek.

Link copied to clipboard
suspend fun receive(): AsyncFrame?

The next decoded frame, or null when the decoder needs more input. The caller closes it.

Link copied to clipboard

Sets corruptDataSkipped back to zero.

Link copied to clipboard
suspend fun send(packet: AsyncPacket?): Boolean

Offers packet to the decoder, or the drain signal when it is null. False means the decoder did not take it: receive its frames and offer the same packet again. A packet of another runtime is refused.

Link copied to clipboard
suspend fun setSkipFrame(skip: DecoderSkip)

Tells a video decoder which frames to skip. See StreamDecoder.setSkipFrame.