Package limn.video


package limn.video
Backend-neutral video: a pooled VideoFrame of planar YCbCr samples described by a PixelFormat layout and a VideoColor interpretation, produced by a VideoStreamSource that a VideoDecoder opened through the Videos facade, timed by VideoClock and shown by uploading it to a VideoSurface that the VideoSurfaces facade created, or, where no device conversion exists, turned into RGBA by YuvConverter.

Mirrors the audio package: the toolkit stays free of any media library and holds only the layout, the colour arithmetic and the timing policy; a backend supplies the decoders. Frames are borrowed and returned rather than allocated, because a picture is millions of bytes arriving tens of times a second.

  • Class
    Description
    Reads a sounding audio playback's position as a VideoClock.MasterClock, so pictures are timed by the device that is actually making noise rather than by the wall clock.
    Plays a video stream: a decode thread ahead of a small ring of pictures, a VideoClock timing them, and an optional audio track that becomes the clock's master.
    Where a player is in its life.
    What one pass of the decode loop did: what a host driving it needs to know to pace itself.
    The memory layout of a decoded VideoFrame: how many planes it has, what each one holds, and how each plane's sample grid is derived from the frame size.
    Decides, one candidate picture at a time, whether to show it, keep the current one, or throw it away: a player's whole timing policy, as arithmetic.
    What the caller must do with the picture it just asked about.
    A media position source on the same timeline as the pictures' presentation times.
    How the samples of a VideoFrame are to be turned into colour: which luma/chroma matrix was used to encode them, whether the codes cover the full range or the studio range, and what transfer function the encoded values carry.
    The luma/chroma matrix a stream was encoded with.
    Which codes a stream's samples occupy.
    What the decoded values are, once the matrix has been undone: numbers a display can show, or a curve that has to be inverted before they mean light.
    Opens a video input for incremental decoding.
    One decoded picture, borrowed from the producer that published it.
    How a producer reads one of its own device pictures back into memory a consumer can address, when VideoFrame.toPlanar() asks it to.
    Which of the two shapes a picture has: samples in memory, or a handle to a device allocation.
    How a producer gets a released frame's memory back.
    A producer's handle on one pooled frame: the only thing that can point a frame at memory or publish it.
    Video facade, over the installed VideoDecoders.
    A pull source of decoded pictures: the video counterpart of an incrementally decoded audio stream, obtained from a VideoDecoder and driven one picture at a time.
    The outcome of a VideoStreamSource.readFrame() call.
    How close to the target a seek is asked to land.
    A device-side picture: the destination a VideoFrame's planar samples are uploaded to, converted to colour by the backend, and composited by Canvas.drawSurface(limn.graphics.GpuSurface, float, float, float, float) as one quad in the 2D paint order, so clipping, opacity, overlays and dialogs apply to a video exactly as they apply to a rectangle.
    Video-surface facade + install-at-startup SPI (the same inversion as the image, audio and 3D facades): a neutral entry point here, the device implementation installed by the backend.
    Backend-supplied factory, installed at startup.
    Converts a decoded picture to 8-bit RGBA on the CPU: the reference implementation of the colour arithmetic, and the path used where no device conversion is available.