Skip to main content

alpha2_extensions/
lib.rs

1//! Extension providers for formats the host's video and image decoders do not read.
2//!
3//! A provider probes bytes (never a file name) and opens a source that returns frames by source
4//! time. The host registers providers in priority order; the engine and renderer never see them.
5//! Each format is a cargo feature, and a build without one reports that format as unsupported.
6
7#[cfg(feature = "animated-image")]
8mod animated;
9mod api;
10mod budget;
11#[cfg(feature = "exr")]
12mod exr;
13#[cfg(feature = "lottie")]
14mod lottie;
15mod progress;
16#[cfg(any(
17    feature = "animated-image",
18    feature = "image-sequence",
19    feature = "lottie"
20))]
21mod raster;
22mod registry;
23#[cfg(feature = "image-sequence")]
24mod sequence;
25#[cfg(feature = "svg")]
26mod svg;
27#[cfg(test)]
28mod tests;
29
30#[cfg(feature = "animated-image")]
31pub use animated::AnimatedImageProvider;
32pub use api::{
33    ColorOrigin, Diagnostic, ExtensionError, Format, FramePixels, LinearColor,
34    MAX_NORMALIZED_DELAY_MS, NORMALIZED_DELAY_MS, NoResources, ProbeReport, ResourceResolver,
35    SharedResolver, Timing, VisualFrame, VisualProvider, VisualSource, premultiply,
36};
37pub use budget::{
38    DEFAULT_FRAME_BUDGET, MAX_ANIMATION_FRAMES, MAX_ANIMATION_PIXELS, MAX_CANVAS_PIXELS,
39    MAX_CANVAS_SIDE, MAX_SOURCE_IMAGE_PIXELS, check_canvas, check_document_size,
40    check_image_pixels, document_limit,
41};
42#[cfg(feature = "exr")]
43pub use exr::ExrProvider;
44#[cfg(feature = "lottie")]
45pub use lottie::LottieProvider;
46pub use progress::{ProgressWatch, watch_progress};
47pub use registry::Registry;
48#[cfg(feature = "image-sequence")]
49pub use sequence::open_sequence;
50#[cfg(feature = "svg")]
51pub use svg::SvgProvider;