#[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>,
},
}Expand description
A source whose media an extension provider supplies instead of 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).
Implementations§
Source§impl ProviderSource
impl ProviderSource
Sourcepub fn is_valid(&self) -> bool
pub fn is_valid(&self) -> bool
Whether the settings are coherent: a Lottie animation ID is not empty, and an image
sequence lists at most MAX_SEQUENCE_FRAMES frames, the first present, no locator empty
or repeated, and a missing frame only with a policy for it.