Add no-signal animation to display windows

When a viewer window has no incoming stream, renders animated analog-TV
noise (hash-based, scanlines, phosphor tint) at configurable fps (default
15) with a centred "NO SIGNAL" text overlay.

- xorg: FRAG_NOSIGNAL_SRC shader + xorg_viewer_render_no_signal(v, time, noise_res)
- main: Display_Slot gains no_signal_fps + last_no_signal_t; display_loop_tick
  drives no-signal render on idle slots via clock_gettime rate limiting
- protocol: START_DISPLAY extended by 2 bytes — no_signal_fps (0=default 15)
  + reserved; reader is backward-compatible (defaults 0 if length < 18)
- controller_cli: no_signal_fps optional arg on start-display
- docs: protocol.md updated with new field

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-29 19:20:53 +00:00
parent 7808d832be
commit 54d48c9c8e
7 changed files with 158 additions and 31 deletions

View File

@@ -67,6 +67,14 @@ void xorg_viewer_set_overlay_text(Xorg_Viewer *v, int idx, int x, int y,
/* Remove all text overlays. */
void xorg_viewer_clear_overlays(Xorg_Viewer *v);
/*
* Render one frame of animated analog-TV noise with a centred "NO SIGNAL"
* label. time is seconds (e.g. glfwGetTime()); noise_res is cells per axis
* (lower = coarser, default 80 when 0 is passed).
* Call at low frame rate (~15 fps) when the viewer has no incoming stream.
*/
void xorg_viewer_render_no_signal(Xorg_Viewer *v, float time, float noise_res);
/*
* Process pending window events.
* Returns false when the user has closed the window.