#[non_exhaustive]pub enum ProviderSource {
Svg,
AnimatedImage,
Lottie {
animation: Option<String>,
},
ImageSequence {
frames: Vec<Option<String>>,
frame_rate: FrameRate,
start_number: u64,
missing: MissingFrames,
primaries: Option<LinearPrimaries>,
},
Exr {
primaries: Option<LinearPrimaries>,
},
Latex {
latex: String,
font_size: f32,
color: Rgba,
display: bool,
},
Pdf {
page: u32,
background: Rgba,
},
}Expand description
A source whose media an extension provider supplies, not the host’s video and image decoders.
A host picks the provider by probing the bytes at import, never by file name, and records it here so every host opens the source the same way. The engine does not read it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Svg
A static SVG document, rasterized at its shown size. The source’s kind is image.
AnimatedImage
A GIF, animated WebP, or APNG: one cycle of frames, each with its own duration.
Repetition is the clip’s. The source’s kind is video.
Lottie
A Lottie animation (JSON file or dotLottie package), evaluated at its own frames. The
source’s kind is video.
Fields
ImageSequence
Still images played in order at a fixed rate. The source’s kind is video.
Fields
frames: Vec<Option<String>>Each frame’s locator, in play order. null marks a missing number, allowed only when
missing says how to show it.
missing: MissingFramesHow a missing frame is shown.
primaries: Option<LinearPrimaries>The primaries of OpenEXR frames’ linear RGB, overriding the first frame’s chromaticities. Only for OpenEXR frames.
Exr
A still OpenEXR image: linear-light RGB(A), read at half precision. The source’s kind is
image.
Fields
primaries: Option<LinearPrimaries>The primaries of its linear RGB, overriding the file’s chromaticities (BT.709 when the file has none, as OpenEXR defines).
Latex
A LaTeX math formula typeset with the bundled STIX Two Math font. The source’s kind is
image, and it has no locator or fingerprint since it reads no file. A formula that uses
a character the font lacks, such as Hangul in \text, does not open.
Fields
latex: StringMath-mode LaTeX without $ delimiters. Non-empty, at most MAX_LATEX_BYTES bytes.
font_size: f32Pixels per em, above 0 and at most MAX_LATEX_FONT_SIZE.
One page of a PDF document. The source’s kind is image.
Fields
page: u32The page shown, counted from 1, at most MAX_PDF_PAGES. The first when absent.
Implementations§
Source§impl ProviderSource
impl ProviderSource
Sourcepub const fn reads_file(&self) -> bool
pub const fn reads_file(&self) -> bool
Whether the provider reads a file of the source’s own. One that does not, such as LaTeX, holds its content in these settings, so its source has no locator or fingerprint.