KiteVideoState
The connection between a player and KiteVideo: it owns the renderer the player draws through and the one snapshot slot the draw phase reads.
val video = rememberKiteVideoState()
val player = remember { KitePlayer.create(PlayerConfig(backends = mobileBackends())) }
player.attachRenderer(video.renderer)
KiteVideo(video, Modifier.clip(RoundedCornerShape(24.dp)))Built outside composition, close renderer when done; rememberKiteVideoState does that automatically when it leaves composition. Closing is always safe while the player still holds the renderer: a closed renderer refuses frames and the engine counts them, exactly like every other renderer in this library.
Properties
Frames that published nothing for a reason other than being superseded.
The measured CPU cost of the software path per published frame. On an emulator this is provisional evidence; the numbers that count are re-taken on devices.
Frames whose picture was published for drawing.
Attach this to the player. Close it when the video surface is done (or use rememberKiteVideoState).
Frames replaced by a newer one before they could be converted.