Files
LlamaCasty/HANDOFF.md
T
gramps 77d7208bfa feat(media): add a video file layer that decodes into the scene
TASK 21's picker slice: the decoder, manager, pacing and loop mechanism were
already shipped but nothing ever acquired a session, so a media Source rendered
nothing. Adds "Video File" to the (+) menu (video-filtered OpenFileDialog),
one decode session per distinct path with a HasSession guard, release when the
last scene reference goes, and a post-load reconcile. Loop is a manager-level
per-path answer ("any live reference loops") applied before StartAsync and
updated live via SetLooping. Properties panel shows the file with Change… and
Loop. Volume stays unwired: media audio rides the desktop loopback, TRAX-style.

Reference: OBS's media source (file → decode → composite into the scene) is the
established answer for this feature; the lifecycle shape mirrors this repo's
WebView2/ScreenCapture registration rather than inventing a new one.

Test: ytLive.Tests/MediaSourceAcquisitionTests.cs — add starts one decoder and
frames reach the layer, loop flip reaches the decoder, remove stops it.

Docs: task-21 closed, TASKS row + Day-4 row + stale 3·17 row corrected,
frame-pipeline acquisition note, HANDOFF rewritten. verify.sh green.
2026-11-05 07:17:43 -08:00

26 lines
1.3 KiB
Markdown

# HANDOFF — 2026-11-05 (TASK 21 — video file layer)
## State
- `main`; TASK 21 is complete: a video file added from the (+) menu decodes, composites into preview
and stream, loops on toggle, and stops with its last scene reference. 3·17 (text layers) completed
2026-11-04.
- New test `MediaSourceAcquisitionTests` (add → one decoder starts + frames reach the layer + loop flip
reaches the decoder + remove → stops). App build is 0 warnings.
- Volume is deliberately unwired: media audio rides the desktop loopback, so a slider would do nothing.
## Next action
- Next queued unit: TASK 49 (chat profanity filter). Day 3's TASK 32/33 resilience slices are still
outstanding — 32·4 (fragmented MP4) is the smallest.
- Do not push absent a checkpoint request.
## Landmines
- `LayerReorderPersistenceTests.RealMouseDrag_OnTheLayerList_PersistsTheReorder` injects physical
mouse input. Do not run it while the desktop is in use.
- Integration tests constructing `MainWindow` must set a temporary `LayoutPathOverride` and clear it in `finally`.
- Media sessions are keyed per **path**, not per layer: acquire through `EnsureMediaSession`, release
through `ReleaseMediaIfUnused`, never `AcquireAsync` twice for one path.
- Bundled FFmpeg stays outside the single-file exe (`ExcludeFromSingleFile="true"`).