Expand description
Versioned, host-independent project model for alpha2.
This crate describes intent only. It contains no decoder handles, GPU resources, filesystem paths, or application-specific types.
Structs§
- Audio
Effect Load - The most audio effect state a project holds at once.
- Audio
Properties - Per-clip audio presentation controls.
- Audio
Stream Shape - An audio stream’s channel count and sample rate.
- Caption
Cue - Text shown over one timeline interval.
- Captions
- What a caption track shows: its cues, in one style.
- Clip
- A reference to a source over independent timeline and source ranges.
- Clip
Composition - A clip’s use of a
Composition, and how its time maps onto it. - Clip
Effect - One versioned runtime effect invocation: a composition’s effect or transition node, or a timeline transition.
- ClipId
- A stable timeline-clip identifier.
- Clip
Transition - A two-input transition over the overlap of two visual clips.
- Color
Pipeline - How sources’ colors come into the working space.
- Composition
- An acyclic graph of image operations with one selected output.
- Composition
Control - A node setting a composition exposes to the group nodes that use it: an effect or transition parameter of one of its nodes.
- Composition
Id - A stable composition-graph identifier.
- Composition
Node - One image operation in a
Composition. - Composition
Reads - What each composition’s output reads: the group inputs and clip nodes a walk from its output reaches, along the inputs drawing each node reads, into the compositions its group nodes draw. A group draws what its nodes would inline, so a group node needs only the ports its composition reads: a port it never reads may be left unconnected, and what a connected one reads is not drawn.
- Cubic
Bezier - A CSS
cubic-bezier(x1, y1, x2, y2)timing curve. - Ducking
- Sidechain ducking authored on the track that is attenuated.
- Effect
Resource - Host-resolved, non-media data consumed by one or more visual effects.
- Effect
Resource Id - A stable effect-resource identifier.
- EqBand
- A single equalizer section stored independently from its DSP implementation.
- Gradient
Stop - One color of a gradient.
- Imported
Captions - Cues read from a subtitle file.
- Keyframe
- One timestamped control value.
- Limiter
- Final peak limiter placed at the end of the master bus.
- Master
Audio - Project-wide master bus settings.
- Matte
- Another visual clip whose picture sets where this clip is visible.
- Media
Fingerprint - Evidence of a source’s media, each part recorded only when it was known.
- Media
Source - A host-resolved media resource.
- Merge
Layer - One layer of a
NodeOp::Merge. - NodeId
- A stable identifier of a node within one composition graph. It has no
/, which joins the IDs of the group and media nodes a step was drawn through. - Project
- A complete serializable project document.
- Project
Id - A stable project identifier.
- Project
Settings - Output-wide settings independent of a renderer or encoder.
- Rgb
- An opaque color as a color picker shows it: straight, sRGB-encoded components in the inclusive unit interval.
- Rgba
- A straight (not premultiplied), sRGB-encoded color with alpha, each
component in
0..=1. - Shape
Mask - A shape that limits where a clip is visible.
- Stream
Topology - The streams a media file carries.
- Stroke
- A shape’s outline paint. The stroke is centred on the outline.
- Text
Background - A box behind each line of text.
- Text
Outline - A band around the glyphs, drawn behind them.
- Text
Style - How text looks and where it lies: a caption track’s cues, or a text
crate::Generator. - Time
Scale - A positive rational rate of one time against another.
- Timeline
- Timeline tracks ordered from back to front for visual tracks.
- Track
- A homogeneous visual or audio timeline lane.
- Track
Audio - Per-track audio bus controls.
- TrackId
- A stable timeline-track identifier.
- Vec2
- A two-dimensional value in normalized output coordinates.
- Video
Stream Shape - A video stream’s displayed size and frame rate.
- Visual
Properties - Resolution-independent visual presentation controls for a clip.
Enums§
- Animated
- A value that is either constant or controlled by sorted keyframes.
- Audio
Effect - A serializable single-input audio effect applied to a clip or track bus.
- Blend
Space - The color space in which blend modes are evaluated.
- Cache
Intent - Whether a runtime may keep and reuse a clip’s rendered picture.
- Caption
Import Error - Why a file is not a subtitle file at all.
- Clip
Blend Mode - Artistic blend operation stored independently from a renderer implementation.
- Easing
- A timing curve from linear progress to eased progress, without a hold.
- Effect
Resource Kind - Portable effect-resource categories supported by the render ABI.
- Effect
Value - Serializable value supplied to one runtime effect parameter.
- EqBand
Kind - The filter shape of one equalizer band.
- Fade
Shape - Curve applied by a clip’s fade in and fade out.
- Generated
Shape - The outline of a
Generator::Shape. - Generator
- The picture of a generated source.
- HdrSources
- What a project does with HDR sources.
- Interpolation
- Interpolation from one keyframe to the next.
- Linear
Primaries - Named RGB primaries linear-light media may be in, each with its own white point.
- Lint
Edge - The end of a range a
LintIssueis about. - Lint
Issue - Something in a project that is valid but probably not meant.
- Lint
Owner - What a
LintIssueis about. - Loop
Mode - How each pass of a
TimeMap::Loopfollows the one before. - Mask
Mode - How a mask combines with the coverage of the masks before it.
- Mask
Shape - The outline of a
ShapeMask. - Matte
Mode - Which property of the matte clip’s picture is coverage.
- Media
Kind - The payload domain of a source.
- Missing
Frames - How an image sequence shows a frame missing from its numbering.
- Model
Error - A document invariant violation.
- Node
Input - One named input of a node, as a node’s inputs are listed.
- NodeOp
- The operation of a
CompositionNode. - Paint
- A color or gradient.
- Project
Load Error - Failure while decoding a serialized project document.
- Provider
Source - A source whose media an extension provider supplies, rather than the host’s video and image decoders.
- Spread
- What a linear or radial gradient shows outside its first and last stops.
- Text
Align - How lines of text align within it.
- TimeMap
- How a clip plays its source range over its timeline range.
- Track
Kind - The media domain accepted by a track.
Constants§
- AUDIO_
EFFECT_ STATE_ MARGIN_ MS - How long before its start, beyond the lookahead of its track’s and its own compressors, a clip’s effects are counted as holding state, in milliseconds. A mixer builds a clip’s effects for the blocks that mix the clip and drops them for the first that does not; it reads a clip early by the lookahead after it, and one block of the largest size at the lowest project rate, with the rounding of each lookahead to samples, is within this margin. A clip’s effects count until its end.
- CURRENT_
SCHEMA_ VERSION - The newest project-document schema understood by this build.
- EQ_
FREQUENCY_ RANGE_ HZ - The frequencies an EQ band may name, in hertz: from 10 Hz to just under the Nyquist frequency of the highest project rate. A band renders at most at 0.49 times the project’s own rate, so a band above that limit of the project it is in sounds at the limit.
- EQ_
Q_ RANGE - The resonances an EQ band renders.
- HDR_
PEAK_ NITS_ RANGE - Supported
ColorPipeline::hdr_peak_nits: SDR white to PQ’s ceiling. - LINE_
HEIGHT_ RANGE - The line heights text takes, as multiples of the font size.
- LOOP_
FADE_ SECONDS - How long sound fades out before, and in after, each wrap of a repeating loop.
- MAX_
AUDIO_ DELAY_ MS - Most audio a project’s effects hold in delay lines at once, in
milliseconds, summed over the effects
MAX_AUDIO_EFFECTScounts then: a compressor holds itslookahead_ms, a reverbREVERB_DELAY_MS. At the highest project rate this is under 100 MB of state. - MAX_
AUDIO_ EFFECTS - Most audio effects a project holds state for at once: its master’s, its
tracks’, and those of the clips holding state then (see
AUDIO_EFFECT_STATE_MARGIN_MS). An equalizer is one effect, whatever its bands. - MAX_
CANVAS_ DIMENSION - Largest canvas edge accepted by the portable project model.
- MAX_
CANVAS_ PIXELS - Largest total canvas area accepted before quality scaling.
- MAX_
CAPTION_ FILE_ BYTES - The largest subtitle file read, in bytes: a project document’s limit. A cue’s JSON is longer than its subtitle block, so a larger file holds more cues than a project can.
- MAX_
CAPTION_ FILE_ CUES - The most cues read from one subtitle file: a day of continuous captions at a cue every 1.3 s, and far more than a feature film’s few thousand.
- MAX_
CAPTION_ FONT_ SIZE - Largest caption font size, as a fraction of the frame’s height.
- MAX_
CHAIN_ EFFECTS - Most effects one chain holds: a clip’s, a track’s, or the master’s.
- MAX_
CLIPS - Maximum number of clips across one project, and of sources in it.
- MAX_
CLIPS_ PER_ TRACK - Maximum number of clips on one track.
- MAX_
CLIP_ MASKS - Most shape masks on one clip.
- MAX_
COMPOSITIONS - Most compositions in one project.
- MAX_
COMPOSITION_ CONTROLS - Most controls a composition exposes as a group.
- MAX_
COMPOSITION_ DEPTH - Deepest nesting of compositions: a composition that draws no other has depth one, and one that draws others, through group nodes or composition-source media nodes, is one deeper than the deepest of them. Drawing a composition recurses once per level.
- MAX_
COMPOSITION_ NODES - Most nodes in one composition.
- MAX_
COMPRESSOR_ RATIO - Largest compressor ratio.
- MAX_
ENVELOPE_ MS - Longest attack or release time, in milliseconds.
- MAX_
EQ_ BANDS - Most bands one equalizer holds.
- MAX_
EQ_ GAIN_ DB - Largest peaking gain, in decibels either way, an EQ band renders.
- MAX_
FONT_ FAMILY_ BYTES - Most bytes in a text style’s font family name.
- MAX_
FRAME_ INLINED_ NODES - Most composition nodes the clips on the timeline at one instant draw
together: each clip counts the nodes its composition and its composition
source draw once inlined, as
MAX_INLINED_NODEScounts them, and a clip showing neither counts none.MAX_INLINED_NODESbounds what the compositions compile to however often they are used; this bounds what their uses draw in one frame, so a frame never draws more than one composition of the largest size the project may hold. - MAX_
GAIN - Largest linear amplitude accepted by any authored gain.
- MAX_
GRADIENT_ STOPS - Most stops in one gradient.
- MAX_
GROUP_ INPUTS - Most inputs a composition takes as a group.
- MAX_
INLINED_ NODES - Most nodes the project’s compositions draw, summed over every composition: each node counts one, except a group node or a media node reading a composition source, which counts the nodes of the composition it draws. A composition is inlined wherever it is drawn, so this bounds what compiling the compositions makes, however their uses multiply.
- MAX_
LOOKAHEAD_ MS - Longest compressor lookahead, in milliseconds.
- MAX_
LOTTIE_ DOCUMENT_ BYTES - Largest Lottie animation a provider reads, in bytes: a Lottie JSON file, or the animation a dotLottie package unpacks to. A Lottie document is parsed whole, to as much as about 45 times its size at its densest (numbers alone), so a larger one is refused before it is parsed, and a host refuses a larger file before reading it. Within it, a document parses to at most about 750 MiB.
- MAX_
MERGE_ LAYERS - Most layers in one merge node.
- MAX_
PROJECT_ JSON_ BYTES - Largest project document accepted by
Project::from_json. - MAX_
PROVIDER_ DOCUMENT_ BYTES - Largest dotLottie package a provider reads, in bytes. A package is read
whole, and only the files a source shows are unpacked from it: its
animation, within
MAX_LOTTIE_DOCUMENT_BYTES, and that animation’s images. A larger file is refused before it is read. - MAX_
SEQUENCE_ FRAMES - Most frames an image sequence lists.
- MAX_
SVG_ DOCUMENT_ BYTES - Largest SVG document a provider reads, in bytes. An SVG document is parsed whole, to as much as about 30 times its size at its densest (elements alone), so a larger one is refused before it is parsed, and a host refuses a larger file before reading it. Within it, a document parses to at most about 960 MiB.
- MAX_
TEXT_ CONTENT_ BYTES - Most bytes of text in one caption cue or text generator.
- MAX_
TEXT_ GENERATOR_ FONT_ SIZE - Largest font size of a text generator, as a fraction of the canvas height.
- MAX_
TEXT_ OUTLINE_ WIDTH - Widest text outline, as a fraction of the font size.
- MAX_
TEXT_ PADDING - Largest text background padding, as a fraction of the font size.
- MAX_
TRACKS - Maximum number of tracks in one project.
- MAX_
TRANSITIONS_ PER_ TRACK - Maximum number of transitions on one track.
- MIN_
LEVEL_ DB - The quietest level a compressor threshold or a ducking depth names, in decibels; both are at most 0 dB.
- REVERB_
DELAY_ MS - What one reverb counts toward
MAX_AUDIO_DELAY_MS: its comb and allpass lines hold about 157 ms of audio at any rate. - SAMPLE_
RATE_ RANGE - Supported project audio sample-rate interval.
Functions§
- caption_
rows - Splits cues onto rows, each row a caption track’s worth: every cue goes
to the first row that has room for another cue (a track holds
MAX_CLIPS_PER_TRACK) and whose last cue has ended by its start. - parse_
srt - Reads SubRip (
.srt) text. - parse_
webvtt - Reads WebVTT (
.vtt) text.NOTE,STYLE, andREGIONblocks are ignored.