dragonflight/services
Claude c083d1006a fix: deltacast audio missing after ffmpeg restart (EPIPE cascade + stale FIFO guard)
Root cause A (main.c): audio_thread set the global g_stop flag on EPIPE
(ffmpeg reader died). This killed ALL port threads across the entire bridge
process. Bridge process then exited with all 8 ports gone.

Root cause B (node-agent/index.js): startDeltacastBridge() skipped respawn
when FIFOs existed in /dev/shm/deltacast, even if the bridge process was dead.
Next ffmpeg opened the audio FIFO read-end and blocked forever (no writer) →
no audio (or video) for any new recording.

Fix A (main.c):
- Add per-port atomic g_port_stop[MAX_PORTS] flags.
- Audio thread: on EPIPE, close the FIFO fd and loop back to reopen it.
  The VHD ANC stream stays open across reconnects. Other ports unaffected.
- Video thread: on EPIPE or stream error, set only g_port_stop[port], not
  the global g_stop. Other ports keep running.
- MAX_PORTS #define moved before globals so g_port_stop[MAX_PORTS] compiles.

Fix B (node-agent/index.js):
- Add _dcBridgeProcessAlive() — scans /proc/<pid>/cmdline for deltacast-bridge.
- startDeltacastBridge(): if FIFOs exist but no live bridge process is found,
  spawn a fresh bridge instead of silently returning. Detects bridges started
  externally (e.g. sudo on the host before node-agent started).

Requires: bridge rebuild + restart on zampp3. No capture image rebuild needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-02 01:35:07 +00:00
..
capture fix: deltacast audio missing after ffmpeg restart (EPIPE cascade + stale FIFO guard) 2026-06-02 01:35:07 +00:00
mam-api fix(growing+gui): growing file = MXF XDCAM HD422 (Premiere-growable) + GUI fixes 2026-05-31 22:13:01 -04:00
node-agent fix: deltacast audio missing after ffmpeg restart (EPIPE cascade + stale FIFO guard) 2026-06-02 01:35:07 +00:00
playout feat(playout): redesigned MCR screen + SCTE-35 end-to-end 2026-05-31 19:58:02 -04:00
premiere-plugin diag(premiere-plugin): v1.2.5 — no-op IIFE writes to Documents/ + reports lf.open result 2026-05-28 03:59:40 +00:00
premiere-plugin-uxp feat(uxp): ship the icon-rail panel redesign as v2.2.2 (recover from redesign branch) 2026-05-29 20:45:29 -04:00
web-ui fix(web-ui): remove Capture nav item, add Playout testing warning 2026-06-02 00:17:04 +00:00
worker fix(growing): don't promote a growing file while its recorder is still recording 2026-05-31 22:26:07 -04:00