PlaybackProfile
class PlaybackProfile
A playback preset as data: one named intent compiled into the two places configuration actually goes, the PlayerConfig this player reads and the decoder option strings a backend passes to its decoders.
The engine stays backend-agnostic, so decoderOptions are plain av_opt_set strings here; the FFmpeg backend accepts them at construction (KiteFFmpegMediaBackend(decoderOptions)) and applies them through its typed layer. A profile is a VALUE: toString prints exactly what it compiles to, which is what the diagnostics dump carries (law 4).
@OptIn(KitePlayerLowLevelApi::class) // decoderOptions is low-level API
fun scrubbingPlayer(): KitePlayer {
val profile = PlaybackProfile.Scrubbing
return KitePlayer.create(
profile.applyTo(PlayerConfig(backends = Backends(
backend = KiteFFmpegMediaBackend(decoderOptions = profile.decoderOptions),
output = mobileBackends().output,
))),
)
}Content copied to clipboard