From db563c86449bb63f06946c5954ae0ba2dec41bcb Mon Sep 17 00:00:00 2001 From: gramps Date: Thu, 5 Nov 2026 07:20:09 -0800 Subject: [PATCH] docs(overlays): record the alert-clip/media decode overlap --- docs/ai/overlays.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/ai/overlays.md b/docs/ai/overlays.md index bdef7a3..7446358 100644 --- a/docs/ai/overlays.md +++ b/docs/ai/overlays.md @@ -93,7 +93,16 @@ published decisions (recorded in `TASKS/task-43-native-alerts.md`): AND the file exists; the shipped `Assets/alert-default.mp4` is stamped into the `Asset` table at startup (`AlertDefaultVideoKey` setting; the prune keeps it via UNION) and read-at-play; any decode failure falls back to the six `AlertRenderer` animations - (deliberate, not an error). Fades in/out via **`FadeDurationSeconds = 0.30`** + (deliberate, not an error). **Known overlap (recorded 2026-11-05):** the video half of + `AlertClipDecoder.RunVideoAsync` and `MediaVideoSource.RunAsync` are near-duplicates — + same ffmpeg args (`-f rawvideo -pix_fmt bgra -vf scale=W:H -an -`), same + `RawVideoFrameReader` feed loop, same `IFrameRateProbe` + delay pacing, both behind + `IDecodeProcess`. What differs is ownership and role, not decoding: alerts are per-play + and disposed at drain, media is a refcounted per-path session; alerts also run an + `f32le` audio pipe into the mixer, media deliberately sends no audio (the desktop + loopback carries it, TRAX-style); alerts play once, media loops. A shared raw-video pump + is the obvious consolidation if a third consumer appears — do not do it for two. + Fades in/out via **`FadeDurationSeconds = 0.30`** (`AlertOverlayLayer` const): fade-in by `elapsed` on straight-alpha frame copies; EOF → freeze-frame → fade-out → drain (the clip branch of `Advance` **clears `_current` before `AdvanceToNext`** — the miss that the TASK 47 test caught). Audio