Skip to main content

Crate ffcine_assembly

Crate ffcine_assembly 

Source
Expand description

Assembly (roadmap step 8, docs/design.md#roadmap, docs/assembly.md): renders a whole timeline into one master with a content-keyed segment cache.

  • plan flattens the picture track into segments (one per shot, dissolve overlap and gap) and the audio tracks into one ffcine_audio mix, each keyed by a hash of its content (recipe), never by position. The mix key has nothing of the picture in it.
  • exec renders only segments missing from the cache, joins them by stream copy (one shared encoder config, every segment starting on an IDR), and muxes the audio; an audio-only change is a remux of the cached picture. Every cache entry is written atomically, so an interrupted render resumes where it stopped.
  • diff lists which segments an edit re-renders.
  • proxy finds or makes the low-res copies review renders decode.

Text (ffcine.text, via ffcine-text) is drawn in the segments it overlaps: segments are cut at text in/out points and keyed by the text they show.

Re-exports§

pub use diff::Diff;
pub use exec::Detector;
pub use exec::Grader;
pub use exec::Progress;
pub use exec::Renderer;
pub use exec::Report;
pub use plan::AudioPlan;
pub use plan::COMP_GENERATOR;
pub use plan::CompMedia;
pub use plan::Filters;
pub use plan::Plan;
pub use plan::PlanError;
pub use plan::Ramp;
pub use plan::Segment;
pub use plan::Shot;
pub use plan::Unit;
pub use plan::has_comp_clips;
pub use plan::plan;
pub use plan::plan_comp;
pub use plan::plan_with;
pub use profile::Profile;
pub use recipe::AUDIO_REVISION;
pub use recipe::FsFingerprinter;
pub use recipe::Key;
pub use recipe::RENDER_REVISION;

Modules§

comp
Compositing maths for assembly, backend-neutral and per frame: the per-shot finish (ffcine.fx.vignette/1, fade/1, flash/1, darken/1), transition curves (ffcine.transition/1), split-screen geometry (ffcine.comp.layout/1) and overlay placement (ffcine.geo.transform/1 + ffcine.comp.blend/1). exec turns these into GPU hooks and layers.
diff
ffcine diff: which segments of a new plan aren’t in the old one’s cache.
exec
Runs a Plan: renders segments missing from the cache, joins them by stream copy, mixes the audio, and muxes the master.
plan
Segment planner: flattens a timeline’s picture track into render units (one per clip, one per dissolve overlap, one per gap) and its audio tracks into one mix, each keyed by content.
profile
Render profiles: output size and aspect, and the one encoder config every segment shares, so segments join by stream copy.
proxy
Proxies for review renders: low-res copies of the sources that segments decode instead.
recipe
Content keys: a canonical JSON form of what a render unit is made of, hashed.

Structs§

TextLayer
A timeline’s text clips, ready to render per segment.