Expand description
The application: owns the project, undo stack, settings, player, dockable layout and wires the panels
together. Non-blocking windows (Settings, Retime, Export, Save Template, Save Profile, export/convert
progress) are plain egui::Windows โ the editor stays usable while they are open. Also executes MCP
tool calls against the live project (one undo step per mutating call).
Structsยง
- App
- Compress ๐
- Compressโฆ window state: what to shrink, how hard, and where the result goes.
- LibPreview ๐
- The libraryโs own preview player: a file, its own decoder/audio pipeline, and the duration/fps a transport needs (an assetโs own probed values, since this project is a synthetic single-clip one).
- McpJob ๐
- A blocking MCP tool job (export.video / media.convert): the reply is sent when the job finishes.
Enumsยง
- Export
Kind ๐
Constantsยง
- LAYOUT_
STEP ๐ - Marker in the undo stack for โa pane was dragged somewhere elseโ. The arrangement itself lives in
Layoutโs own (much shorter) history โ this only keeps Ctrl+Z stepping back in the right order. ponytail: once the layout history has scrolled past its 20 entries the marker undoes nothing; deepen the layout stack if that ever bites. - MEDIA_
EXTS ๐ - MUTATING_
TOOLS ๐ - Tools whose success means โone undo step + after_editโ (media.import pushes its own undo).
- PROJECT_
EXT ๐ - STOCK ๐
- The embedded stock picture, already decoded:
assets/bubble.webpconverted once to raw RGBA at card size, because nothing in the binary can decode a webp (no image crate, and ffmpeg may be missing). - STOCK_H ๐
- STOCK_W ๐
Functionsยง
- GetCursor
Pos โ - add_
mask ๐ - Give the clipโs last effect a mask, or the clip itself when it has no effects. False = there is one already, or the clip is audio (a mask shapes pixels, and audio has none).
- anim_of ๐
- The animated property
nameof a clip: inspector labels or โ: โ. - apply_
clip_ ๐fields - Apply
clip.setfields to a clip (everything exceptspeed/reverse, which the caller routes throughProject::set_speedso neighbour collisions are respected). - apply_
mask_ ๐fields - arg_
bool ๐ - arg_f64 ๐
- arg_ids ๐
- arg_str ๐
- arg_u64 ๐
- base64 ๐
- Standard base64 (RFC 4648, with padding) โ for the
render.framePNG data url. Tool path, not hot. - clamp_
canvas ๐ preview_max_widthapplied to a canvas size, keeping the aspect ratio. Must matchPlayer::set_canvas, or the GPU renders at a different shape than the player decodes at.- color_
arg ๐ - converted_
path ๐ - Where โConvert Toโฆโ writes:
<stem>_converted.<ext>next to the source, uniquified so a convert can never overwrite the source itself or a file already on disk (possibly one the timeline is using). - effect_
thumb_ ๐key - Cache key of one effect thumbnail: kind, source image and size. Changing the stock image (or the grid size) invalidates every thumbnail; two different effects never share a key.
- effect_
thumb_ ๐source - The picture the effect thumbnails are rendered from: the userโs stock image, else the embedded one.
- frame_
render_ ๐size - Render size for an image export: downscales are rendered straight at the target (the compositorโs
Scalerdoes the filtering), upscales are rendered at project size and enlarged by ffmpeg with the chosen resize flag โ rendering a 4K frame from a 1080p timeline gains nothing but time. - guarded ๐
- Run something that may panic (GPU driver, pre-render, a panel widget) without taking the editor down โ same policy as the decoder threads. None = it panicked. ponytail: the panic message goes to the default hook (stderr); the caller toasts and degrades.
- job_
window ๐ - Non-blocking progress window for background jobs (conversions, downloads): one row per job with a progress bar and Cancel. Draws nothing when there are no jobs.
- mask_
shape ๐ - mask_
slot ๐ - The mask slot of a clip, or of one of its effects (
effect= index in the effect stack). - node_
kind ๐ - โBlurโ / โColorโ / โBlendโ / โCombineโ / โMergeโ / โMatteโ / โMaskโ / โTextโ / โInputโ โ a node kind.
- parse_
ease ๐ - โLinearโ | โEaseInโ | โฆ | โcubic-bezier(x1,y1,x2,y2)โ
- preview_
canvas ๐ - Preview render size for a pane of
canvaspx atqualitypercent (25..100). Zero stays zero (nothing to render), and the aspect ratio is kept. - push_
undo_ ๐json - Push an undo snapshot (capped) and clear the redo history.
- relocate_
assets ๐ - Moved/renamed sources: re-point assets to
project_dir/<file name>when that exists (a silent black preview is the alternative); returns the paths that are still missing. - req ๐
- scrub_
time ๐ - Time a library preview scrub-bar click/drag at fractional position
frac(0..1 across the bar, unclamped so a drag past either end still reads as 0 orduration) seeks to. - step_
time ๐ - Time the library previewโs โstep back/forward one frameโ buttons seek to.
- timeline_
is_ ๐empty - Nothing to save/export: the MAIN timeline is empty.
Project::is_empty()only sees the open sequence, andmain_stashis Some exactly while one is open โ so this isexport_project().is_empty()without the clone. - write_
image ๐ - Write one rendered frame as PNG / JPG / WebP through ffmpeg (raw RGBA on stdin), resizing to
opts.sizewithopts.resizewhen the render came out at a different size.