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::compileturns into a project document.
Structs§
- Compiled
- A compiled spec: the project, and what an export of it needs besides.
- Compose
Error - 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.
- Loudness
Target - The loudness an export normalizes to.
- Media
Facts - One media file’s shape and length.
- Required
Media - A media file a spec names.
- Requirements
- The files a spec names.
Constants§
- THEMES
- The built-in themes, by name.
Functions§
- compile
- Compiles
specwithfactsabout its files. - compile_
json compileacross 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
specnames, for a binding to describe before compiling. - requirements_
json requirementsacross a JSON boundary.