Expand description
Extension providers for formats the host’s video and image decoders do not read.
A provider probes bytes (never a file name) and opens a source that returns frames by source time. The host registers providers in priority order; the engine and renderer never see them. Each format is a cargo feature, and a build without one reports that format as unsupported.
Structs§
- Animated
Image Provider - Reads GIF, animated WebP, and APNG. Still files of those formats are left to the host.
- ExrProvider
- Reads still OpenEXR images.
- Linear
Color - The primaries of linear-light media and where they came from.
- Lottie
Provider - Reads Lottie JSON and dotLottie packages.
- NoResources
- A resolver with nothing registered.
- PdfProvider
- Reads pages of PDF documents.
- Probe
Report - What probing a file finds.
- Progress
Watch - Ends a
watch_progresswatch, restoring the one before it. - Registry
- The providers a host’s build includes, highest priority first.
- SvgProvider
- Reads static SVG documents.
- Visual
Frame - One frame of a source.
Enums§
- Color
Origin - Where a source’s color description comes from.
- Diagnostic
- Something a provider did that the user should know about.
- Extension
Error - Why a provider could not answer.
- Format
- A format a provider reads.
- Frame
Pixels - A frame’s tightly packed pixels, in the source’s precision. Shared with the source’s cache, so repeated frames cost no copy.
- Timing
- When a source’s frames are shown, in source time.
Constants§
- DEFAULT_
FRAME_ BUDGET - Decoded bytes an animated source or an image sequence keeps between requests.
- MAX_
ANIMATION_ FRAMES - Most frames an animated image may have.
- MAX_
ANIMATION_ PIXELS - Most pixels all of an animated image’s frames may cover together. About a thousand 1080p frames, roughly ten seconds of native decoding.
- MAX_
CANVAS_ PIXELS - Largest canvas a provider opens, in pixels (8K UHD).
- MAX_
CANVAS_ SIDE - Largest canvas side a provider opens, in pixels.
- MAX_
NORMALIZED_ DELAY_ MS - Frame delays at or below this are shown for
NORMALIZED_DELAY_MSand reported. This catches GIF delays of 0 and 1 hundredths while 60 fps (16 or 17 ms) plays as declared. - MAX_
SOURCE_ IMAGE_ PIXELS - Most pixels the raster images inside one source may decode to together. An SVG counts every
image draw per render (an image reused through
<use>counts twice); Lottie counts its assets once at open. - NORMALIZED_
DELAY_ MS - What a delay of
MAX_NORMALIZED_DELAY_MSor less becomes.
Traits§
- Resource
Resolver - Supplies bytes a source needs besides its own (sequence frames, SVG fonts and images).
Parsers may call it from other threads, hence
Send + Sync. - Visual
Provider - Reads one family of formats.
- Visual
Source - A source a provider opened: asked for frames by source time.
Functions§
- check_
canvas - Refuses a canvas larger than a provider opens.
- check_
document_ size - Refuses a source file of
lengthbytes larger than itsdocument_limit. - check_
image_ pixels - Refuses images that together decode to more than
MAX_SOURCE_IMAGE_PIXELS. - document_
limit - The most bytes a provider reads of a whole-file format (SVG, Lottie, dotLottie, PDF), with a
name for the file kind;
Nonefor streamed formats.headis the file’s start, used to tell a dotLottie ZIP from Lottie JSON. - open_
latex - Typesets
latexatfont_sizepixels per em. The canvas covers the formula’s box and any ink past it, in whole pixels. - open_
sequence - Opens an image sequence of
framesin play order (Nonefor a gap). Only the first frame is read here;primariesoverrides OpenEXR color. - premultiply
- Premultiplies straight RGBA8 in place, rounding to nearest.
- watch_
progress - Calls
progressedeach time a provider call on this thread gets further, until the watch drops.
Type Aliases§
- Shared
Resolver - A resolver a source may keep, such as an image sequence that reads frames on demand.