Package-level declarations

Types

Link copied to clipboard

Measurements over a whole file, decoded here rather than played.

Link copied to clipboard

Creates audio decoders.

Link copied to clipboard
class KiteFFmpegMediaBackend(onWarning: (PlaybackWarning) -> Unit = {}, decoderOptions: Map<String, String> = emptyMap(), lowDelayDecode: Boolean = false) : MediaBackend

The FFmpeg backend, as one session-shaped object.

Link copied to clipboard

Converts sample rates with FFmpeg's libswresample, through the aresample filter of the KiteFFmpeg filter graph. Set it in AudioConfig.resampler.

Link copied to clipboard

The engine's source and decoders, over KiteFFmpeg.

Link copied to clipboard

Creates the platform-selected decoder and, where policy allows, its replay-safe software fallback.

Link copied to clipboard

A decoded video frame, still in native memory.

Link copied to clipboard

Paints this backend's video frames into a web destination as RGBA, inside the codec module.

Link copied to clipboard

The standalone image formats a snapshot can take. Both encoders are in every KiteFFmpeg build.

Link copied to clipboard

Turns a decoded CPU-readable frame into tightly packed RGBA on JVM and Android.

Turns a decoded frame into RGBA, on the CPU.

Link copied to clipboard
data class Thumbnail(val position: Duration, val width: Int, val height: Int, val bytes: ByteArray, val format: SnapshotFormat)

One preview image: a complete file in format, width by height pixels, taken at position. Two thumbnails are equal when every field is, the contents of bytes included.

Link copied to clipboard
object Thumbnails

Seek previews and library grids: images at positions, scaled and encoded in one call.

Link copied to clipboard
class UploadPlanes(val width: Int, val height: Int, val format: PlayerPixelFormat, val planes: List<UploadPlanes.UploadPlane>)

What a GPU renderer needs from a frame, in the backend's own words. The output module defines the renderer seam and never sees this backend; a consumer that owns both maps these two answers onto it in a handful of lines. The memcpy discipline lives HERE, once: a hardware frame crosses as its CVPixelBuffer with no copy at all, and a software frame crosses as its planes copied out whole (stride times rows, one memcpy each) still in their native pixel format, which is the law: YUV until the GPU, never RGBA on the CPU.

Link copied to clipboard
data class Waveform(val bucketDuration: Duration, val peaks: FloatArray, val rms: FloatArray)

A file drawn as peaks and rms, one entry per bucket of bucketDuration, both in 0..1 and mono-mixed. A bucket nothing was decoded into reads zero in both. Two waveforms are equal when every field is, the contents of both arrays included.

Link copied to clipboard
object Waveforms

Audio apps draw the file. This decodes it into the shape they draw.

Functions

Link copied to clipboard

The CVPixelBuffer of a VideoToolbox frame, or null when the frame is not that kind.

Link copied to clipboard
fun SoftwareReadableFrame.encode(format: SnapshotFormat = SnapshotFormat.Jpeg): ByteArray

Encodes a frame with readable planes as a standalone image: a CapturedFrame from KitePlayer.captureFrame, or any software frame a backend produced.

Link copied to clipboard

The buffer's samples as interleaved float, which is what the engine's ring and every audio device want.

Link copied to clipboard

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).

Link copied to clipboard
fun MediaItem.withVideoFilter(chain: FilterChain): MediaItem

The typed route to MediaItem.videoFilter: a chain built with KiteFFmpeg's videoFilters { } lands on the item as the string the graph builder reads. No opt-in needed, because the DSL is not raw FFmpeg syntax; the raw field stays behind KitePlayerLowLevelApi for chains the typed set lacks.