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.
A spec has no logic. A template adds parameters, $if, $switch, $each and {{name}},
which binding removes. 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. - template
- Templates are compose documents with typed parameters, bound to data into plain specs.
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§
- DEFAULT_
TRUE_ PEAK_ CEILING_ DBTP - The true-peak ceiling a loudness target without one takes, in dBTP: EBU R128’s.
- THEMES
- The built-in themes, by name.
Functions§
- bind_
json template::bindacross a JSON boundary:optionsis{theme?, templates?}.- compile
- Compiles
specwithfactsabout its files. - compile_
json compileacross a JSON boundary. The result is{project, assets, loudness, warnings}.- data_
schema_ json template::data_schemaacross a JSON boundary.- 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.
- lint_
json template::lintacross a JSON boundary:datamay be empty for none, andoptionsis{templates?}. Returns the issues as a JSON list.- media_
facts_ json MediaFacts::from_fingerprintacross a JSON boundary: a host’s fingerprint of a file in, its facts out.- 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.- templates_
json - The 1st-party
alpha2/templates, as a JSON list.