submit

suspend fun submit(frame: VideoFrame): Boolean

Hands a decoded frame over, suspending while the queue is full.

Suspending here is the backpressure that stops the decoder running ahead of the display. It also bounds how many hardware surfaces are held at once, which matters: a hardware decoder's pool can be as small as four buffers in total, and holding them all stalls decoding completely.