VideoDecoder

Decodes one video stream: packets in through send, frames out through receive. The engine closes it.

Properties

Link copied to clipboard
abstract val hardware: HwdecStatus

Whether this decoder runs in hardware or in software, which the playback statistics report.

Link copied to clipboard
abstract val isDrained: Boolean

True once receive has reported the end of the stream, and until the next flush.

Link copied to clipboard
open val output: FrameShape?

What this decoder's frames will be, or null when it cannot say before they exist. The engine checks it against the attached renderer, and a null skips the check: the renderer's refusal of the first frame is then the only answer, as before.

Functions

Link copied to clipboard
expect abstract fun close()
Link copied to clipboard
abstract suspend fun flush(newGeneration: Generation)

Discards all internal state and enters newGeneration.

Link copied to clipboard
abstract suspend fun receive(): VideoFrame?
Link copied to clipboard
abstract suspend fun send(packet: PlayerPacket?): Boolean

Offers a packet. A null packet starts the drain that flushes the decoder's internal delay.

Link copied to clipboard

Whether to skip the frames no other frame is predicted from, from the next packet send offers until the next call (#468).