AsyncSubtitleDecoder

Decodes subtitle packets. It is the suspending form of SubtitleDecoder.

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 decode(packet: AsyncPacket): Subtitle?

The subtitle packet holds, or null when it holds none. A packet of another runtime is refused.

Link copied to clipboard
suspend fun drain(): Subtitle?

The subtitle the decoder still holds at the end of the stream, or null.

Link copied to clipboard
suspend fun flush()

Drops what the decoder holds, as after a seek.