forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 0563cbfec08046b75ca933b5b9909fd656d3ea9fFiltered to crates/engine/src/proxy.rsClear filter

2026-08-26

🐛 fix(engine): DEBT #91 — proxy Asked phase now cancels its header readAhmet Kaan Gümüş · ba29145
🐛 fix(engine): DEBT #91 — proxy Asked phase now cancels its header read

generate_if_wanted takes the same cancel flag Job::cancel later polls: a
click to stop a stand-in while the header is still being read used to have
nothing to set, so the read (a Matroska cluster walk) always ran to
completion before the stop landed. Checked at the door once the seat is
claimed and wrapped around Demuxer::open (demux::with_cancel), so a
pre-set or mid-read cancel unwinds promptly and gives the seat back the
same way a cancelled encode does (Claim's own Drop).
🐛 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.

2026-08-19

✨ 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.
✨ 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(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.

2026-08-15

✨ feat(library): a stand-in switch on every row — on, off, and one encoder at a timeAhmet Kaan Gümüş · 3da7bd9
✨ feat(library): a stand-in switch on every row — on, off, and one encoder at a time

The ✕ that stopped a stand-in being made read as taking the file out of
the library. What a row shows now is a switch: a hollow dot when the film
plays itself, a filled one when a stand-in plays, a stop square while one
is being made, with how far it has got drawn under it.

A click in the asked window stops rather than starts a second encoder;
the engine takes a claim on the .part before the header is read so no
two encoders ever write one path. A delete that could not happen says so
and the row stays on over the proxy that is still what plays. The off
choice is written beside the cache entry and outlives the session, and
the detail line keeps its width past the switch.

2026-08-13

🐛 fix(engine): "no picture in it" is a header's answer, not an extension's guessAhmet Kaan Gümüş · 627d623
🐛 fix(engine): "no picture in it" is a header's answer, not an extension's guess

Two residuals of the proxy round, and the doc line that makes a hardware
run measure the code it was meant to.

The quiet answer for a file that is not a film was name-shaped: an
audio-only `.mp4`, `.mkv` or `.mov` is a video container with no video
track in it, so no extension can tell and every one of them still opened,
failed and said "NO PROXY" about a song. Only the header knows, and the
demuxer already knew -- it just said so in prose, which is the one thing
in this engine free to be reworded. `NoVideoTrack` makes it a type: the
two doors that mean *this file carries no picture at all* return it, a
front-end still shows the sentence it always showed, and the proxy takes
it as the same silent `None` a 1080p film gets. A picture in a codec
nothing here decodes is not that class and stays loud.

...and the cap was soft by exactly what it was capping: the sweep aimed
at 20 GB and then two encodes wrote gigabytes on top of it, so the disk
held the cap plus a film per encode (~43 GB worst case). It now sweeps to
`CACHE_CAP - reserve`, where the reserve is what those encodes will
really take -- the file's own bits-per-pixel arithmetic times the 1.25 the
hardware seat overshoots its asked-for rate by -- held to half the cap so
a single 4K feature cannot empty the cache to make room for itself.
`AT_ONCE` moves into the engine beside that arithmetic: how many encodes
run at once *is* how much room the sweep must leave, and two places
holding that number is one place for them to disagree.

The ignored hardware tests now say to build `-p engine-hw --release` as
its own step: `--tests` does not rebuild the cdylib, so the plugin beside
the test binary is whatever was there last time -- and a hardware claim
measured against a stale one is a claim about code nobody edited.

One commit rather than two: both fixes are in `proxy.rs`, in regions a
hunk split cannot separate cleanly (it was tried once and produced a
corrupt intermediate), so each is named here instead.
🐛 fix(engine): a song is not a film to stand in for, and the cache stops at 20 GBAhmet Kaan Gümüş · 2c0dabd
🐛 fix(engine): a song is not a film to stand in for, and the cache stops at 20 GB

Two faults of the same shape -- a proxy written or refused where nobody
asked for one -- in the one file both callers route through.

A song and a still were run through the same door a film is: a demuxer
opened on a `.wav` fails, so importing one said "NO PROXY for tone.wav
-- the film itself is what plays" and left "no proxy" on its library
row. Neither has a picture to stand in for; the true answer is the one
a 1080p H.264 film already gets, and it is given before anything is
read.

...and nothing ever deleted a stand-in. They are written without being
asked for, two at a time, at ~1.37 MB of disk per second of 4K film --
about 11.5 GB for one 2h20 film -- so the honest answer to "how
much of my disk is this" was "all of it, eventually". A sweep before
every new one brings the directory under 20 GB by deleting the least
recently used, which costs a re-encode of a thing that is derived and
nothing else. A `.part` is never taken (it is being written now) but its
bytes count towards what has to go.

Least recently *used* is the access time, which on a relatime mount --
this machine's `/home` -- moves at most once a day: a daily-granularity
LRU, which is the right accuracy for an eviction that costs a re-encode.
✨ feat(app): a Proxies switch in the panel, and the stand-ins made without being askedAhmet Kaan Gümüş · 892f813
✨ feat(app): a Proxies switch in the panel, and the stand-ins made without being asked

A film this machine cannot cut at speed -- bigger than 1080p, or HEVC or
AV1 at any size -- gets its stand-in started the moment it lands in the
library, two at a time so ten dropped files cannot start ten encodes
over one hardware seat. The library row says how far it has got and then
that there is one; the PROJECT panel's Proxies button says which way the
switch is set and carries the least-finished percentage beside it, so a
switch thrown before anything is ready says so rather than doing
nothing.

The switch is an action like every other: ctrl+p, on the actions card,
and a button that is both the state and the door -- the two tests that
already hold every action to that pass it unchanged.

A stand-in that cannot be made is a line and no more: the film itself is
what plays, which is what plays until one is ready anyway.
✨ feat(engine): a big film gets a small stand-in to cut withAhmet Kaan Gümüş · 83e561d
✨ feat(engine): a big film gets a small stand-in to cut with

A proxy is the film at 1280 on its long edge, every frame an IDR, no
sound in it at all: a seek lands on the frame asked for instead of on
the nearest one a decoder can start from, and the mix stays the
original's.

Generation is the export walk given a one-clip project and a smaller
canvas, so the hardware seat, the progress and the cancel are the ones
a file export already had. Two switches were wanted for it: `intra_only`
(one frame a GOP on the H.264 pair) and `keep_source_colour`, which
carries the film's own space into the stand-in instead of converting it
-- that conversion ran on the source's full 4K, cost 48 ms a frame and
was the whole of a proxy's price, and leaving it to the screen means the
tone-map preset can still be changed after the stand-in was made.

The cache is keyed on the source's path, length and modification time,
so a re-encoded original misses rather than reading a stale stand-in.

A 4K HDR film: 2.35x realtime on the VA-API seat, against 0.59x before
the colour switch; a cancel leaves neither the file nor its .part.