#[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, rather than the host’s video and image decoders.
A host picks the provider by probing the bytes at import, never by a file name, and records it here with the settings the source needs, so every host opens the source the same way. The engine does not read it: a provider source needs frames like any video or image source.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Svg
A static SVG document, rasterized at the size it is shown. 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, from a Lottie JSON file or a 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 is a number missing
from the sequence, allowed only when missing says how to show
it.
missing: MissingFramesHow a missing frame is shown.
primaries: Option<LinearPrimaries>The primaries OpenEXR frames’ linear RGB is in, overriding what the first frame’s chromaticities say. 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 its linear RGB is in, overriding what the file’s chromaticities say (BT.709 when it says nothing, 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
listed twice, and a missing frame only with a policy for it.