Skip to main content

Crate alpha2_compose

Crate alpha2_compose 

Source
Expand description

Compose specs: a video described by intent, compiled into a plain project document.

compile turns a VideoSpec into an alpha2_model::Project that alpha2_model::Project::validate accepts, plus the export options the project does not hold.

Compiling is pure and reads no files. Facts about the files a spec names come in as Facts, gathered by a binding from requirements. The same spec, facts, fonts and compiler version give a byte-identical project.

The spec is data without logic (no loops, conditions or expressions); components that take any number of inputs are Rust code here.

Re-exports§

pub use spec::COMPOSE_VERSION;
pub use spec::VideoSpec;

Modules§

spec
The compose spec: a video described by intent, which crate::compile turns into a project document.

Structs§

Compiled
A compiled spec: the project, and what an export of it needs besides.
ComposeError
Why a spec does not compile, and where.
Facts
What the compiler knows of the files a spec names, keyed by the path the spec gives.
LoudnessTarget
The loudness an export normalizes to.
MediaFacts
One media file’s shape and length.
RequiredMedia
A media file a spec names.
Requirements
The files a spec names.

Constants§

THEMES
The built-in themes, by name.

Functions§

compile
Compiles spec with facts about its files.
compile_json
compile across a JSON boundary. The result is {project, assets, loudness, warnings}.
kind_of_path
What a file holds by its extension: a still for image formats the host decodes, sound for audio-only formats, video otherwise. Formats read by extension providers (animated GIF, SVG, OpenEXR) are not guessed.
parse_facts
Parses facts from JSON.
parse_spec
Parses a spec from JSON, naming where an unparsable value lies.
requirements
The files spec names, for a binding to describe before compiling.
requirements_json
requirements across a JSON boundary.