forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on f2bee6bd5170bc7726be7deeff4c723c0bc9ff22Filtered to crates/engine/src/playback.rsClear filter

2026-08-26

🐛 fix(engine): mono sources up-mix onto wider timelines (DEBT #46)Ahmet Kaan Gümüş · d7c614b
🐛 fix(engine): mono sources up-mix onto wider timelines (DEBT #46)

widen() (audio.rs) duplicates a mono decode buffer into every timeline
channel -- the inverse of downmix(), wired into every decode site that
feeds mix() (run_ac3, run_mkv_ac3, run_sym, the AAC loop in run()).
audio_matches_probed (playback.rs) and the export-time width check
(audio.rs:open_multi_streams_speed_at_fade) both now let a 1ch source
join a wider timeline; a wider-than-timeline source stays refused.
🐛 fix(engine): reopen the audio device past a silent first sourceAhmet Kaan Gümüş · c322a69
🐛 fix(engine): reopen the audio device past a silent first source

PlaybackSession::open_project pinned the device to the first non-image
source (audio_source_of) with no check that source actually had a
track. A silent leading source (a clip with no audio) left every later
source unheard for the whole session. Now the scaffold walks forward
past a silent candidate to the first source that really opens a
device.

Regression test in audio_files.rs proves the scan reaches a second
source's audio (verified via audio_disabled_reason, since this sandbox
has no PipeWire device to tap samples from).
🐛 fix(app,engine): pay debts — audio-only fallbacks, panic-proof proxy, .part sweepAhmet Kaan Gümüş · b05a649
🐛 fix(app,engine): pay debts — audio-only fallbacks, panic-proof proxy, .part sweep

Twelve debts paid in one batch:

- engine: NoVideoTrack fallback at every video door — open_stream,
  open_project scaffold, and import() now route a video-extension file
  whose header holds no picture to the audio-only path instead of
  refusing (argv open, saved-project reload, and library import).
- engine: proxy/export worker wrapped in catch_unwind — a decoder panic
  settles the shared slot with Err instead of stranding Making/Cancelling.
- vendor/cros-codecs: AV1 setup_shear multiplies checked — malformed warp
  params are a parse error, not a process abort (live-proven on an AV1 film:
  clean PROXY FAILED notice, slot released, app alive).
- engine: startup sweep of orphan proxy .part files.
- app: Player::has_video probe cache — lane_refuses gates drops on the
  probed kind, not the extension; Silences hidden on soundless clips;
  audio import toast names rate/channels/length; stale no-session proxy
  label cleared.
- tests: audio-only mp4 fixture + gen_fixtures.sh line, 2 engine
  NoVideoTrack tests, toast/lane/view cases (246 bin + 14 audio_files).

Harness-proven this batch (runs 20260826-2306..2315): split-at-playhead
with undo, lane-remove mouse door, fade-out drag, argv audio-only open,
AV1 proxy clean failure.
✨ feat(app): drag moves the whole selection, all-or-nothingAhmet Kaan Gümüş · 33ae7d9
✨ feat(app): drag moves the whole selection, all-or-nothing

A dragged clip that is itself one of the selection's picks now carries
every other pick along by the same frame delta, in one undo step, and
the selection survives the move with its indices remapped rather than
cleared. One pick refused blocks the whole set -- nothing moves, one
notice. A clip dragged from outside the selection is unchanged.

Project::move_clip is now Project::move_selection with a selection of
one, so the existing single-clip path is byte-identical.

2026-08-21

feat: close subtitle lane gapsAhmet Kaan Gümüş · 45b9182Browse files
fix(timeline): close gap carries a linked take across, not one lane into silenceAhmet Kaan Gümüş · 7f487c1
fix(timeline): close gap carries a linked take across, not one lane into silence

Close gap was a permanent no-op for any linked A/V take: cut_regions
refused per-lane ripples that would pull a take's picture half away
from its sound half. gap_take_scope now widens the ripple to the
take's other lane whenever the same stretch is empty there too (same
start, same length, so nothing but silence moves and sync holds), and
refuses -- in words the user can act on -- when the gap doesn't match
or the other half is solid, rather than leaving the row to click into
silence.
✨ feat(timeline): a right-click on empty bench space closes the gapAhmet Kaan Gümüş · 29d8b28
✨ feat(timeline): a right-click on empty bench space closes the gap

Right-clicking a gap on a lane (video, audio, or the head/tail/middle of
one) now opens the same clip-menu surface with a single "Close gap"
item; picking it ripples every clip after the gap left on that lane
only (Premiere-style per-lane scope, repeatable per track), through
Project::cut_regions so it is one undo press like every other ripple.

engine/src/project.rs: Project::gap_at (+ private gap()) finds the
empty stretch under a frame, None for inside-a-clip or the open end of
a lane (nothing there to ripple back)
engine/src/playback.rs: PlaybackSession::gap_at forwards it
app/src/menus.rs: ContextMenu::on (Clip|Gap) replaces the clip-only idx
field so the existing menu, its scrim, and every context_menu = None
clear site cover the gap menu for free
app/src/player/timeline_edit.rs: open_gap_menu + close_gap
app/src/ui/overlays.rs: gap branch of context_card renders "Close gap"
app/src/ui/bench_stance.rs: bed's right-click hit-tests gap_at; a click
that lands on a clip leaves that clip's own menu untouched
feat(ui): the settings page shows the HDR reference the file declaredAhmet Kaan Gümüş · e88fbc8
feat(ui): the settings page shows the HDR reference the file declared

Surfaces the MaxCLL/MaxFALL and mastering-display peak the demuxers already
parse into ContentLight but nothing in the UI ever read (grep across
crates/app/src returned zero hits outside tests). Two new read-only rows
sit beside the existing HDR tonemap picker in the settings page's PROJECT
section -- "HDR reference" (mastering peak) and "Content light" (CLL/FALL) --
using the page's own row_static idiom (no cursor/hover/click) since nothing
in engine::project::Project has a field to persist an override into.

PlaybackSession gains a content_light() accessor, populated at every open
site (fresh open, saved-project reopen) by a second header-only Demuxer::open
for the light level, matching the same double-open-for-a-header trade this
file already accepts for audio probes.

2026-08-20

🐛 fix(settings): the page stops claiming storage it never usesAhmet Kaan Gümüş · f4ba613
🐛 fix(settings): the page stops claiming storage it never uses

Driving found the EDITOR header saying 'kept in ~/.config/edith' while those
rows wrote nothing there, and Auto proxies persisting nowhere at all — it
reverted to On every relaunch. The engine round-trip was already right; the
gap was the window-level default, which now has its own config file beside
subtitle-style. Each row's hint names its real door instead of one blanket
claim.

Settings also could not open during an export — the exporting card owns the
modal slot — while the oracle and its test asserted it could. The oracle now
agrees with what the user can observe.
🐛 fix(engine): a picture edit reuses the decoder instead of reopening the fileAhmet Kaan Gümüş · 91e6316
🐛 fix(engine): a picture edit reuses the decoder instead of reopening the file

The session's first worker was seeded with the raw caller path while
the project canonicalizes every source, so Worker::reseek's textual
path check failed and every colour or transform nudge paid a full
thread + demux + VA-API reopen (~11s on a big file) instead of a seek.
open_stream canonicalizes once, and the idle teardown stretches 2s→8s
so think-time between nudges keeps the hardware session warm.
🐛 fix(engine): a paused preview blends the dissolve instead of hanging on plain AAhmet Kaan Gümüş · 7456e34
🐛 fix(engine): a paused preview blends the dissolve instead of hanging on plain A

B's decoder opened only on the tick that first landed inside the window, so a
seek or pause that landed there before B's first frame arrived showed pure A
forever -- the clock is frozen, so no later tick ever came to correct it.

B now opens eagerly at the span's own start (options (c)+(b) combined), well
before the window is reached, and try_frame bounds a wait on B's first frame
(200ms) for the rare case a seek lands in the window before that head start
pays off -- bounded so a source B cannot decode never freezes the preview.

2026-08-19

🐛 fix(engine): fades reach exported and played-back audioAhmet Kaan Gümüş · 9ec26f6
🐛 fix(engine): fades reach exported and played-back audio

Two bugs: `forces_encode` never checked a clip's own fade, so the
default Web MP4 copy path silently dropped fades from the exported
AAC track. Worse, `Fade`'s frame counts are timeline (fps) frames but
`Fade::apply` multiplies audio-rate sample blocks; unconverted, a
fade's threshold was crossed a few milliseconds into any clip, so a
fade-out muted the rest of the segment outright and a fade-in finished
before an ear (or a 100ms RMS window) could catch it. `Fade::scaled`
now re-counts a fade at the mix's own sample rate the moment the audio
session learns it, which also fixes the same bug in live preview.
✨ feat(engine): a dissolve renders in the playback preview tooAhmet Kaan Gümüş · 3e66b40
✨ feat(engine): a dissolve renders in the playback preview too

The preview used to hard-cut where an export blends -- try_frame now opens
B's own decoder (graded and placed at B's own start, mirroring export's
Dissolve) once the playhead reaches the tail's dissolve window, and blends
its BGRA picture over A's with the same dissolve_weight ramp export uses.
One choke point covers both playing and scrubbed/seeked frames, since both
drain try_frame the same way.
✨ feat(app): a dissolve key joins two video clips end to end (ctrl+d)Ahmet Kaan Gümüş · 474b80e
✨ feat(app): a dissolve key joins two video clips end to end (ctrl+d)

Mirrors the audio crossfade: PlaybackSession::set_transition_out wraps
Project::set_transition_out (Dirty::Picture), Player::dissolve_selected
picks the join the same way crossfade_selected does, and a second press
removes the dissolve it just made. Wired into the keymap, the dispatch
table, and the clip context menu.
✨ feat(engine): clips can name a dissolve into their neighbor (edith 19, storage+format)Ahmet Kaan Gümüş · 8369d8e
✨ feat(engine): clips can name a dissolve into their neighbor (edith 19, storage+format)

transition_out frames on a video clip dissolve it into the adjacent
next clip; split keeps the tail's transition clamped and zeroes the
head; v18 files load with hard cuts, v19 round-trips bit-exactly.
Blending (playback and export) lands separately.
🐛 fix(app): the export card tells the truth about a ranged exportAhmet Kaan Gümüş · 906e7de
🐛 fix(app): the export card tells the truth about a ranged export

The size estimate and the audio-codec label both ignored the marked
range (a ranged export re-encodes; the card said copy and quoted the
whole timeline's size). The RANGE duration is computed from the frame
count instead of float seconds, and the speed card's row joins it —
same truncation class. The range band gets 2px boundary ticks so it
reads over the played fill. bench.rs learns export::start's fifth
argument, closing the arity sweep over examples.
merge audio-fades engine (edith 18) and wire fade drag stateAhmet Kaan Gümüş · 55dd056
merge audio-fades engine (edith 18) and wire fade drag state

Merges the fades/crossfade engine branch in, adds PlaybackSession
wrappers (fade_in_of/set_fade_in/fade_out_of/set_fade_out/crossfade)
and the FadeDrag gesture plumbing on the root (start/move/commit),
ahead of the drawing and keymap work.
✨ feat(engine): per-clip audio fades and adjacency crossfade (edith 18)Ahmet Kaan Gümüş · 4e4ec16
✨ feat(engine): per-clip audio fades and adjacency crossfade (edith 18)

# Conflicts:
#	crates/engine/src/export.rs
✨ feat(engine): per-clip audio fades, adjacency crossfade, and edith 18Ahmet Kaan Gümüş · 6d0747c
✨ feat(engine): per-clip audio fades, adjacency crossfade, and edith 18

Clip carries fade_in/fade_out, an equal-power gain envelope mixed into
playback and export, a crossfade() op that sets both edges of two
adjacent audio clips, and split's rule that only the kept edge keeps its
fade. The project file format bumps to edith 18 to carry the two new
fields; a v17 (or older) file loads with every clip's fades at zero.

Fixes a stray fade_in/fade_out struct-literal fragment left outside any
Clip literal in Player::trimmed (crates/app/src/player/timeline_edit.rs),
which was a syntax error breaking the whole app crate's build.

Adds unit coverage for Fade::gain_at's boundary/midpoint curve, the
split edge rule, crossfade's adjacency refusal, the Clip size-lock
test (40 -> 48 bytes), and a v17-loads-zero-fades / v18-round-trips
edith.rs test.
✨ feat(app): the timeline can redo, mirroring undoAhmet Kaan Gümüş · 49a1af3
✨ feat(app): the timeline can redo, mirroring undo

Project grows a redo stack: undo pushes the lanes it leaves onto it,
redo pops one back, and any fresh edit (snapshot) clears it since the
branch undo left behind is no longer where the edit leads. Wired
through PlaybackSession::redo, Player::redo and ActionId::Redo,
bound to ctrl+y -- bare "y" is already SubtitleStyle's, so redo takes
only the ctrl chord.
✨ feat(engine): a project can name its own sample rateAhmet Kaan Gümüş · 31981de
✨ feat(engine): a project can name its own sample rate

.edith goes to v17 with an optional samplerate line; the session carries
it, save/load round-trip it, and the one audio-open seam every consumer
shares (open_multi_streams_speed_at) conforms all segments to the named
rate — playback rebuild and both export encoders inherit it for free.
Proxies keep their film's own rate. A v16 file loads with the rate
unset, meaning derived-from-source as before.
✨ feat(engine): a library preview opens the row's own audio streamAhmet Kaan Gümüş · e6a2fc1
✨ feat(engine): a library preview opens the row's own audio stream

PlaybackSession::open_with_audio_stream binds a chosen audio track
instead of always the file's first, closing the corner-cut open_preview
named. Library rows already carry their own stream index (one row per
audio track on a remux), so the preview button now passes it straight
through.
✨ feat(app): resolution and rate are choosable before any file opensAhmet Kaan Gümüş · dc9a2c2
✨ feat(app): resolution and rate are choosable before any file opens

A pick made on an empty player waits in pending_settings and lands on
the next session the moment it is built, the same way a saved project's
own numbers do. The inspector rows and the Resolution keystroke work
with nothing open; a .edith's saved settings still win over a stale
pre-import pick. Engine test proves a later import never touches an
explicit resolution or rate.
🐛 fix(engine): the late-drop escape valve survives the speed skipAhmet Kaan Gümüş · 43ff2f2
🐛 fix(engine): the late-drop escape valve survives the speed skip

run() and run_hw() checked abort.late(due) && skipped < LATE_RUN as one
condition, so once LATE_RUN pictures in a row had been dropped for
lateness, the branch fell through to skip_for_speed -- and if that also
said skip (which it does on every other frame at >1x), the escape valve
that is supposed to guarantee one picture in LATE_RUN reaches the screen
never fired. A machine falling behind at speed could go fully silent.

Reordered so lateness is decided first and completely: still-within-run
skips for being late, past-run sends unconditionally (skipped=0), and
skip_for_speed only gets a say once lateness has already said "send".

Measured with a throwaway probe (deleted) against two real files, SW
decode (this box has no HW decode path), 15s per run, same machine
before/after:

  a large 4K H.264 mp4 (the falling-behind, worst-case class the
  escape valve exists for):
    1.0x  219->322 shown,  5->2 resyncs,  p99  1131.8ms->75.8ms
    1.5x  173->165 shown,  7->7 resyncs,  p99  1049.6ms->1113.4ms (noise)
    2.0x  134->141 shown,  7->7 resyncs,  p99  1055.7ms->970.6ms

  a small screen-recording mp4 (keeps up, never hits abort.late): 0
  resyncs before and after at all three speeds, numbers unchanged --
  the reorder does not touch a file that was never late.

Net: better or a wash everywhere measured, no regression on the class
the bug actually bites.

Adds a deterministic unit test for skip_for_speed's alternation at 2x
and its never-skip guarantee on a span's last frame.
🐛 fix(playback): a captions-only group delete clamps the playhead tooAhmet Kaan Gümüş · b980282
🐛 fix(playback): a captions-only group delete clamps the playhead too

Since a grouped caption delete ripples every member's own sub lane, a
caption grouped only with other captions can shrink timeline_frames()
-- and the branch that said such a delete "moves nothing that plays"
skipped the one clamp mechanism there is. Grouped-ness for a caption is
its link alone, so the dispatch now asks that, and the caption-only
group takes the Dirty::Both path like its clip-anchored kin. Cue text
itself was never stale: subtitle overlay is pull-rendered every paint.

2026-08-16

🐛 fix(playback): the playhead follows the re-rate through the same mapAhmet Kaan Gümüş · 6d8f3a1
🐛 fix(playback): the playhead follows the re-rate through the same map

A speed change left the playhead at its own timeline position while
write_speed re-timed the group under it, so the scene changed with the
rate -- at 2x from the middle of a clip the cursor jumped a clip's
worth of content. Both the commit and every live sample of the bar now
map the playhead through a TimelineMap built from the group's own old
geometry: each clip member by its old rate against the new one about
its own head, each caption member by the held clip's proportion about
the held clip's head, and a playhead outside every member unmoved --
nothing ripples, so the difference is the gap's to absorb.

TimelineMap (engine/src/map.rs) is the one piecewise-affine answer the
re-timing ops will share; this is its read-side consumer, with the laws
pinned (monotone, exact on the ends, invertible on the image) and the
playhead its first user. The delete and paste migrations land next;
until they do, invert and the total shift answer the laws tests alone.

2026-08-15

🐛 fix(playback): a silence cut's boundary decodes forward, not flushAhmet Kaan Gümüş · e045b5e
🐛 fix(playback): a silence cut's boundary decodes forward, not flush

Cutting silences leaves a timeline of same-file micro-clips, and every
boundary reseeked the worker the expensive way: decoder FLUSH, demuxer
seek to the RAP, skip-decode RAP->clip-start (up to a GOP of VCN work,
the GPU spikes), then a re-prime whose ~178ms ttff at 4K outlasts the
0.15-0.65s clips -- so the picture starved while the continuous audio
feeder played on (the freeze), and LATE_RESYNC answered the starved
picture with another flush storm every RESYNC_GAP.

- engine-hw: seek_to reaches a target ahead of the decoder, within
  FORWARD_SECS (0.5s) of it, by decoding forward and dropping through
  the existing skip path -- no flush, no RAP seek, no re-prime; behind,
  past the reach, and past EOF keep the flush. Decision extracted as
  the pure reposition() + tests; position tracked per popped handle.
- playback: the session reports picture_priming() -- owed from span
  start until its first frame -- and the player's resync waits out a
  prime instead of restarting into it (resync_due, constants kept).
- bench cutloop: the freeze metric -- an N-region cut timeline played
  end to end, displayed/dropped per second, restarts and resyncs.
🐛 fix(timeline): caption flag resets match the engine's reseek exactlyAhmet Kaan Gümüş · cda6d0e
🐛 fix(timeline): caption flag resets match the engine's reseek exactly

The app gated its grouped-caption drag and trim flag resets on the
caption carrying any link at all, while the engine reseeks only when
the group holds clips: a caption grouped only with another caption
(ctrl-click two captions, Group) latched the seek wait with no frame
ever delivered -- an unbounded repaint loop while paused.

PlaybackSession::caption_grouped_with_clips is now the one public
answer, asked before the edit moves indices, and both reset gates read
it: drag from the press's lane and live index, trim from the trim's
own lane and index. The two sides can no longer disagree.
🐛 fix(timeline): grouped caption edits reseek, and the link counter clears caption idsAhmet Kaan Gümüş · 25855e8
🐛 fix(timeline): grouped caption edits reseek, and the link counter clears caption ids

A grouped caption's drag and trim move the group's clips with it -- a
timeline->source change -- so PlaybackSession::move_sub and trim_sub
now invalidate Dirty::Both when the caption is grouped with clips (the
check delete_sub already made, now shared as caption_grouped_with_clips),
and the app pays the reset_after_reseek a clip's drag and trim pay on
the same paths.

The link counter a load seeds now sits past every id the file names:
from_parts chains the subs a lane already holds, and with_subs -- the
door a load's placements actually come through, after from_parts --
raises the counter past the ids its captions carry. A hand-grouped
caption holding the file's highest id could have had it re-issued to
the next group that asked, silently grouping it with clips it never
met.

A palette drop onto a subtitle lane renumbers that lane alone; the
picks it held now follow the discipline of every other renumbering
edit -- kept off the lane, re-read for the marked caption, other lanes'
picks untouched. Also folds in the v16 caption-group round-trip test
that had been left out of the previous commit.
✨ feat(engine): offset-preserving groups over clips and captionsAhmet Kaan Gümüş · 48cacb6
✨ feat(engine): offset-preserving groups over clips and captions

The engine half of manual clip grouping: SubClip gains a link id, the
group invariant becomes one-placement-per-lane (span equality dropped),
group_all builds a hand group over clips and captions with mates riding
along, splits keep the left group and share one fresh id on the right
(captions included), deletes ripple each media member's own span on its
own lane and lift caption members, grouped caption drags and group
trims move every member by one delta clamped to each member's own
walls, and the save format grows an optional 6th sub field as v16.

App half (Selection refactor, ctrl+click, ctrl+A, oracle/menu, marks)
follows.

2026-08-14

✨ feat(engine): the words a project places are in the file it savesAhmet Kaan Gümüş · df4020f
✨ feat(engine): the words a project places are in the file it saves

The `.edith` grows a `sub` line -- `sub <lane> <start> <frames> <track>
<in> <out>` -- and a bare `sub <lane>` for a subtitle lane holding
nothing, written in the lane's own place among the video and audio ones
so the display order a load rebuilds is the one that was saved. Both of
a caption's clocks are on the line: the placement in timeline frames
like everything else, the window in the microseconds its cues are timed
in. MAGIC is `edith 15`.

`Project::without_orphan_sources` stops filtering the subtitle lanes out
of its `Parts` and `Project::lane_gains` stops filtering them out of its
gains -- the two are zipped by `edith::emit`, so they were only ever
allowed to filter in step, and now neither does. What is *on* those
lanes travels beside them in the new `Project::lane_subs`, one list per
lane exactly as the gains are, and comes back through
`Project::with_subs`, which is `from_parts` for words: it refuses a
caption on a lane that is not a subtitle lane, an empty span or window,
a track the palette does not have, a span past the last frame there is,
and a lane that overlaps itself. The parser refuses the same file by
line number.

A v14 project is one that named subtitle files and could place none of
them: it loads with its palette whole and no subtitle lane at all, which
is what it always meant, and re-saves as v15 having invented neither.

Also fixes a version-bump straggler in tests/silence.rs, which asserted
`edith 13` against a `edith 14` writer and was red before this change.
✨ feat(engine): the session hands the subtitle lane the rate a project does not knowAhmet Kaan Gümüş · 6a02fb1
✨ feat(engine): the session hands the subtitle lane the rate a project does not know

A placement's position is in timeline frames while its words are in
microseconds, and the frame rate that joins the two is the one thing a
`Project` never holds. So the trim and the mapping-out are asked through
`PlaybackSession`, which has the rate, and a front-end never converts a
cue's microseconds itself.

Grafted from the losing best-of-2 branch, whose wrapper layer this is,
and reshaped onto the lane handles the winner speaks: `add_lane`,
`remove_lane` and `move_lane` already carry a subtitle lane, so the
wrappers are the six calls that are new -- the placements, the two
drags, the room a drag has, the lift, and the cues a repaint draws.

Nothing here reseeks or invalidates: cues are drawn over whatever
picture is on screen, so no decoded frame stops being right.
✨ feat(app): the seat that writes the picture is picked on the card, not by an env pinAhmet Kaan Gümüş · 50af5b5
✨ feat(app): the seat that writes the picture is picked on the card, not by an env pin

The export card gains an Encoder row: Auto, Hardware or Software, three rows in a
list like every other setting with more than two values -- `e` steps it, a click
opens the list, and the planned line under the rows re-probes and says which seat
it measured.

Auto is what every export did before (the GPU where there is one). Hardware is
the GPU or a refusal in words -- `Enc::open` refuses before the muxer exists, so
nothing is written -- and it is now the only door to the plugin's AV1 seat, which
`VE_HW_AV1=1` used to guard: an env pin nobody exporting a film would ever find.
A person who picks it for AV1 gets a plain row naming what happened on this box's
driver, and the pick still stands.

Software forces the CPU encoder, which also takes the zero-copy path off the
table by construction (`Enc::dma_want` answers only for the two hardware seats).

Kept with the project: `.edith` gains an `encoder` line at v14, written only when
it is not Auto, and a v13 file loads as Auto.

- engine: `ExportSettings::force_sw` -> `seat: EncoderSeat`; `hw_seat` returns the
  refusal instead of falling back; `planned_video` says `NO_HW_SEAT` where it would
- app: `Pick::Encoder`/`Choice::Encoder`, card row, `e` in the card's own keyboard
  and in the keys menu (`FIXED`)
- tests: the backends sweep runs all three seats (the AV1 hardware seat excepted,
  as before), and asserts the refusal is only what a missing seat produces
✨ feat(app): the stand-ins are made when a project asks, not whenever a big film arrivesAhmet Kaan Gümüş · 269b0c2
✨ feat(app): the stand-ins are made when a project asks, not whenever a big film arrives

A project now says whether an import makes a proxy by itself. On is the
default and the line left out, so every project that came before behaves
exactly as it did; off makes nothing at all, and turning Proxies on is
what asks for the ones the project is missing -- the only ask there is,
since no per-source item exists.

The file grows an `autoproxy` line and the version goes to 13: a v12
project makes them by itself, which is all any project could do.

The switch is a button beside Proxies in the PROJECT panel, ctrl+o, and
a row on the actions card -- the three doors together, as the two
sync tests require.

2026-08-13

🔀 merge(engine): the stand-in decides one path, and the intra file keeps its marksAhmet Kaan Gümüş · eff035e
🔀 merge(engine): the stand-in decides one path, and the intra file keeps its marks

Lane P's proxy workflow meets a main that had taken S's persistent decode
workers, E's pipelined export and E4's zero-copy encode.

* `start_span` keeps S's reuse door and P's single substitution point at
  once: `picture_path(source)` is resolved *before* the door and handed to
  both halves of it. A worker holding the film is then asked for a span of
  the stand-in, declines on the path it already has (`Worker::reseek`),
  and `set_proxies`' seek becomes a respawn on the other file -- while a
  span that did not change files still costs no thread and no VA-API init.
  Asking the project for the path at the door, as main did, would have
  left every proxied span opening a worker from scratch.
* `Enc::encode_dma` takes P's `intra` flag, which is not symmetry: a proxy
  of a file already small enough is coded at that file's own size
  (`proxy::size_for` -- `wanted` is true for HEVC and AV1 at any size), so
  an intraframe export's decoder and encoder can agree on a surface and
  the buffer goes straight across. Marked `false` there, an all-intra
  stand-in would have carried no sync point at all, which is the exact
  bug `gop_limit` was written against, reached by the other door.
* The five other conflicts were both sides adding a field: `drop_late`
  and `proxies` next to each other, in the struct and in all three opens.
* `enc_depth` is keyed by codec, so the intra seat takes H.264's two. Said
  in its doc rather than left to be re-derived: that seat is the same
  entrypoint with every inter dependency removed, so a picture there is
  finished no later than one on the seat the two was measured on.

`nm -D libengine_hw.so` lists sixteen: P's `vh_enc_open_intra` beside
E4's `vh_next_frame_dma`, `vh_enc_dma_geometry`, `vh_enc_frame_dma` and
main's `vh_seek`. `picture_path` still has exactly one call site outside
the tests, and it is in `playback` -- an export reads the film.

The intra seat and the zero-copy path are read, not run: every test that
would reach either is hardware-gated and the GPU is wedged.
🐛 fix(decode): the queue a file opens with, and the driver a parked worker holdsAhmet Kaan Gümüş · 7985bd5
🐛 fix(decode): the queue a file opens with, and the driver a parked worker holds

Five findings from the lane's verification, in the order they bite.

DEPTH NEVER ENGAGED ON THE PRIMARY PATH. Every session opens its first
worker pass-through -- a freshly opened file *is* the project resolution
-- and a pass-through canvas cannot say how big the pictures will be, so
it answered 2: the bound this engine had before there was any
decode-ahead. A whole file played at that depth until the first seek
built a real canvas. The depth now comes from the stream the sync opener
already read (`scale::queue_depth`), and a paused burst off a freshly
opened 720p file is 17 pictures where it was 3.

A PARKED WORKER NO LONGER HOLDS THE DRIVER. The thread that outlives its
span used to park on its command channel with the VA-API session open,
which widened the Mesa `atexit` window from "quit during a decode" to
"quit any time after opening a file". The wait is in two halves now: the
fast one keeps everything, so a seek, a scrub step and a clip boundary
still find the decoder where they left it, and past two seconds idle the
hardware session is closed. The demuxer stays -- it is a file handle and
an index, not driver state, and it is what costs seconds to rebuild.

DENSITY IS BOUNDED AGAIN. The suite's pump had been weakened to "indices
increase", which a one-in-N delivery regression passes. It asserts
contiguity again -- every session there is a pull consumer, owed every
frame -- and a new test holds a *watched* session to the same contiguity
plus a density floor whenever the decoder is measurably keeping up.

The queue-depth doc now states the measured numbers (16 at 720p, 12 at
1080p, 3 at 3840x2160, 2 at 4096x2160; a burst is depth + 1), and two
comments that still said "cancelled" for what a seek now abandons, and
claimed the drop replaced the front-end's resync, are corrected: both
mechanisms are live and the drop is the first line.