KiteFFmpegVideoFrame
A decoded video frame, still in native memory.
The pixels are not copied here and they never reach Kotlin memory unless a renderer asks for them. That is the whole point: a 1080p frame is 3.11 MB and a 4K 10-bit frame is 24.9 MB, so copying at 60 frames a second would cost between 187 MB/s and 1.5 GB/s for nothing.
Properties
The A/53 caption bytes FFmpeg's decoder attached to this picture (#236). Unreadable side data costs this picture's captions and nothing more.
The container's crop, already checked to fit this frame.
The decoder's own reading first, because a raw HEVC or MPEG-TS stream says it only in the bitstream.
The downloaded copy's format for a VideoToolbox frame, which downloads it on first read.
The stream's own clockwise rotation, from the container's display matrix.
The peak of this frame's scene, from the Dolby Vision RPU the decoder read, in nits.
Functions
The CVPixelBuffer of a VideoToolbox frame, or null when the frame is not that kind.
Encodes a frame with readable planes as a standalone image: a CapturedFrame from KitePlayer.captureFrame, or any software frame a backend produced.
The frame's planes for texture upload, or null when the frame lives in hardware memory (use corePixelBufferOrNull there instead; downloading to feed a GPU that could wrap the surface directly would be the exact copy this path exists to avoid).