Package-level declarations
Types
The two tiers of the animation upscaler: a port of Anime4K v3.2's CNN x2 networks, by bloc97, under the MIT licence.
One coherent reading of the selected audio output's presentation clock.
How the player handles sound: which track to pick, the pitch law, the downmix, the volume ceiling, the equaliser, ReplayGain and the resampler. A fresh player starts from these values, and the setters on KitePlayer change most of them while it plays.
The fields of an AudioConfig, set in an audio { } block. Each one is the field of that name.
What an item's sound is, as the platform's own sound processing wants to know it (#446).
An audio output device that a player can play through.
The engine's audio half: a device, a ring, and the clock derived from them.
A stretch of one audio track to scan, in the stream's own timeline.
What one scanAudio call covered.
Receives the decoded audio of scanAudio, one block at a time, in media order.
The two implementations the engine builds its pipeline from.
How much to read ahead, when to declare that playback can start, and how long to wait for a source that stopped answering.
The fields of a BufferPolicy, set in a buffer { } block. Each one is the field of that name.
A screenshot: the newest presented frame, plane-copied at the moment of presentation, owned outright by the caller. This is the documented use of SoftwareReadableFrame: every plane here is a copy taken before the renderer took ownership, so nothing the decoder or the renderer does afterwards can touch it, and close has nothing to release.
One chapter of the current media item, read from the container's own table and surfaced on the facade with io.github.yuroyami.kiteplayer.KitePlayer.chapterAt, seekToChapter and PlayerEvent.ChapterChanged.
One trace event as one line of JSON, in the Chrome trace event format that Chrome's trace viewer and Perfetto open.
What the demuxer does with a packet that the container marks as damaged.
Whether interlaced video is deinterlaced, which removes the combing that DVD rips and broadcast captures otherwise show on every moving edge.
Typed settings for opening a container. The backend applies every field, or refuses the open with a typed error. It never ignores one. Each default is the backend's own default, so DemuxPolicy() changes nothing.
What a Dolby Vision video stream is, as its container declares it.
How a multichannel mix is folded into fewer speakers.
A ten-band graphic equaliser, in dB per band.
A clock the caller owns, which playback follows once it is set with KitePlayer.setExternalClock. Synchronised playback across devices is the use: each player follows the position that its group agreed on.
How playback follows an ExternalClock.
How a MediaItem whose file is still being written is played (#430).
The epoch a piece of state belongs to, within the timeline that produced it.
What SubtitleConfig.hearingImpairedNotes does with the notes of hearing-impaired subtitles (#493).
Whether to decode on a hardware device, and what to do when one is not available.
How the current video track is being decoded.
The byte cache: one contiguous RAM window over an MediaIo's bytes. Reads pull readChunkBytes at a time and append to the window; a seek that lands inside the window is served from RAM without touching the source, which is what makes a small seek-back free on a network stream. The window keeps at least backWindowBytes behind the cursor before anything is evicted, and forwardWindowBytes in total; Progress.bufferedRanges reports the window, time-mapped.
The fields of an IoCachePolicy, set in an ioCache { } block. Each one is the field of that name.
Which keyframe a SeekMode.Keyframe seek lands on, since it does not decode forward to the exact target.
The player.
Marks API that hands FFmpeg's own strings straight through to a backend.
The evidence behind a sink's audio presentation timing.
A position playback announces when it crosses it. Set with io.github.yuroyami.kiteplayer.KitePlayer.setMarkers, announced as PlayerEvent.MarkerReached. id is the application's own name for it and means nothing to the engine.
Which clock is actually in charge right now, as opposed to which was requested.
The subtitles SubtitleConfig.withMatchingAudio lets the player choose by itself under audio in a preferred subtitle language (#506). Audio in any other language, or in none it names, is subtitled as ever.
Reads media bytes from anywhere Kotlin can reach.
Makes a fresh MediaIo for one playback session.
Turns a URI into a MediaIo when it knows how, at open time (the Ktor half). Explicitly configured through PlayerConfig.network or supplied by an installed optional provider. The engine consults it when a MediaItem has no MediaItem.io of its own. Returning null from an explicit resolver passes the URI through to the backend untouched, which is what keeps local files on FFmpeg's own fast path.
What to play.
Builds a MediaItem one setting at a time. Each call has the name of the field it sets, every call is optional, and each returns this builder.
One programme of the media: tracks that play together, such as one channel of a DVB recording or an IPTV multiplex, which carries several channels in one transport stream (#505).
The source of wall time for the engine.
How media bytes arrive over a network, and how the engine caches them.
The fields of a NetworkConfig, set in a network { } block. Each one is the field of that name.
Rows and columns at the edges of a stored picture that are not part of the image (#497).
How a picture is drawn (#428): mirrored left to right first when mirrored, then turned clockwise by rotationDegrees, 0, 90, 180 or 270, as VideoFrame.mirrored and VideoFrame.rotationDegrees describe a frame's own. See VideoTransform.orient.
A failure that stopped playback.
What a suspending player command throws when playback failed.
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.
Diagnostics, for an overlay or a bug report.
What the player is doing.
Something went wrong and playback continued.
Everything that is decided when the player is created.
The fields of a PlayerConfig, set in a PlayerConfig { } block. Each one is the field of that name.
Keeps a block of one config builder from setting the fields of the builder around it.
Something that happened, as opposed to something that is.
Everything needed to come back to where playback was: the queue, the item, the position and every setting. Taken with KitePlayer.memento, handed back to KitePlayer.restore. A value the application stores however it likes; no serialisation is imposed. asProperties is a flat string form for applications that keep key-value text, and fromProperties reads it back.
Everything about the player that changes rarely, as one immutable value.
A playlist that cannot become a queue: one that cannot be read, that is no playlist, that names nothing, or that names itself, directly or through a list it names. uri is the list's address.
How far the demuxer reads into a container before playback starts, to find its streams.
How the player moves from one queue item to the next. See docs/gapless-queue.md.
The fields of a QueueConfig, set in a queue { } block. Each one is the field of that name.
What a queue does with an item that cannot be opened. See QueueConfig.onItemFailure.
How much work a renderer spends on the picture beyond decoding it correctly.
Which loudness measurement to honour, when the container carries one.
Where the second subtitle track sits on the picture (#494).
When to stop playing on its own.
A server's answer status, 401 or 403, to a request for uri that an open item's reader made (#453). See MediaIo.takeRefusal.
Which way KitePlayer.stepFrame moves a paused picture.
What the two front speakers play (#462), as a player's audio menu offers it. It acts on the output after the downmix, so a surround film folded to two speakers obeys it too, and only the first two channels move, as with the balance. A change while playing crossfades, so it never clicks, and it is heard once the audio already buffered has played, as a balance change is.
The seek bar picture for a stretch of the item (#433): the region of image at x, y, width by height pixels, which stands for the item from start up to end. image is the whole grid image as the stream serves it, a JPEG, PNG or WebP that mimeType names when the stream says, so the application decodes it with its platform's image decoder and draws that region. A region of 0, 0 and a zero size stands for the whole image, for a stream that does not cut its images into tiles.
One version of the media at another quality, such as one variant of an HLS master playlist. Tracks.variants lists them, and KitePlayer.selectVariant plays one of them.
Which subtitle track to pick, when to show its cues, and how large to draw them.
The fields of a SubtitleConfig, set in a subtitles { } block. Each one is the field of that name.
An external subtitle file added alongside a media item.
Text whose encoding nobody stated, read as the player reads a subtitle file (#423): by its byte-order mark, as UTF-8 when its bytes are valid UTF-8, and otherwise in the single-byte table its bytes read most likely in, such as windows-1251 for Russian or windows-1252 for French. An internet radio station's song titles arrive this way, often not in UTF-8, as mpv found.
The pictures a stream carries for a seek bar's preview (#433): a DASH adaptation set of thumbnail tiles, an HLS image playlist, or a WebVTT thumbnail file the item names in MediaItem.thumbnails. Each image is a grid of tiles, one tile for each stretch of time. Tracks.thumbnails lists the set, and KitePlayer.thumbnailAt gives the tile for a position.
A WebVTT thumbnail file for an item (#433), as many web players publish: each cue's text names an image, relative to the file, and a region of it, sprite.jpg#xywh=0,0,160,90, for the cue's time. uri is where the file is, and io, when set, reads it instead, as SubtitleSource.io does. The images are read through the file's own reader, or else the player's network, with the item's headers for an image on the item's own server.
One warning, with the engine clock's reading when it was emitted.
What happened to one KitePlayer.selectTrack call.
One selectable track.
The tracks of the current media item, and which of them are selected.
What an adaptive stream's picture is drawn into, which the player's choice of variant follows. See DemuxPolicy.fit.
The picture controls a viewer expects from a real player: brightness, contrast, saturation, hue and gamma, live, without touching the decoder (mpv's eq). The engine owns the value and every attached renderer is told it, exactly like VideoScale; the renderers apply it per drawn frame, which is why a change is instant and free of pipeline work.
What the screen shows of the video's dynamic range, as the renderer reports it.
The engine's video half: a frame queue, the presentation schedule, and the drop and repeat decision.
How the picture occupies the surface it is drawn into.
The kernel a renderer resamples the picture with when it is not drawn at its own size.
The viewer's framing controls, on top of VideoScale: force a display aspect the container did not declare (mpv's video-aspect-override), magnify (mpv's video-zoom), and pan the magnified picture (mpv's video-pan-x/-y). The engine owns the value and every renderer is told it, the same delivery law as VideoScale and VideoAdjustments; the renderers fold it into the same one-pass geometry that letterboxes, so it costs nothing per frame.
Functions
An item read through io, with label used as its URI in logs and on screen. The FFmpeg backend also reads the label's extension to recognise an HLS playlist.
Reads what KitePlayer.open would publish about media, through backend alone.
Plays bytes already in memory. Each open has its own cursor and close state, with no array copy. Keep bytes unchanged while any reader is open. Size is known and positions from zero through the array size are seekable. Invalid slices or positions throw IllegalArgumentException; reads and seeks after close throw IllegalStateException. A zero-length read returns zero, even at EOF.
Builds a PlayerConfig in a block, so a nested setting does not need its type named.