BackendSession

One opened media item: the cursor over its packets, and the decoders that can consume them.

The factory lists are ordered best first and may be empty, which is how a backend says it cannot decode a kind of stream at all. The engine tries them in order for each selected stream and deselects a stream whose every candidate refuses.

Closing the session closes the source and everything the backend opened with it. Decoders the engine created from the factories are the engine's to close, and it closes them before this.

Properties

Link copied to clipboard

Audio decoder factories, best first. Empty when this backend decodes no audio.

Link copied to clipboard

The packet cursor over the opened item.

Link copied to clipboard

Factories for the subtitle formats this backend can decode over the packet path. The engine asks the first factory that accepts the selected subtitle stream; an empty list means subtitle tracks cannot be selected on this backend.

Link copied to clipboard

Video decoder factories, best first. Empty when this backend decodes no video.

Functions

Link copied to clipboard
expect abstract fun close()
Link copied to clipboard
open fun setWarningSink(sink: (PlaybackWarning) -> Unit)

Where the engine installs its warning reporter after open, so backend degradations (a hardware-to-software fallback, colour approximation) surface as io.github.yuroyami.kiteplayer.PlayerEvent.Warning instead of dying in a backend-private default. A backend with nothing to report keeps the empty default; a backend that already has an application-level listener calls both.