feat: xorg text overlays, font atlas generator, v4l2_view_cli

- tools/gen_font_atlas: Python/Pillow build tool — skyline packs DejaVu
  Sans glyphs 32-255 into a grayscale atlas, emits build/gen/font_atlas.h
  with pixel data and Font_Glyph[256] metrics table
- xorg: bitmap font atlas text overlay rendering (GL_R8 atlas texture,
  alpha-blended glyph quads, dark background rect per overlay)
- xorg: add xorg_viewer_set_overlay_text / clear_overlays API
- xorg: add xorg_viewer_handle_events for streaming use (events only,
  no redundant render)
- xorg_cli: show today's date as white text overlay
- v4l2_view_cli: new tool — V4L2 capture with format auto-selection
  (highest FPS then largest resolution), MJPEG/YUYV, measured FPS overlay
- docs: update README, planning, architecture to reflect current status

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-28 22:13:59 +00:00
parent 7fd79e6120
commit 611376dbc1
11 changed files with 1204 additions and 46 deletions

View File

@@ -15,6 +15,9 @@ Designed to run on resource-constrained hardware (Raspberry Pi capturing raw MJP
- [docs/cli/media_ctrl_cli.md](docs/cli/media_ctrl_cli.md) — media device and topology tool
- [docs/cli/v4l2_ctrl_cli.md](docs/cli/v4l2_ctrl_cli.md) — V4L2 camera control tool
- `test_image_cli` — generate test patterns and write PPM output for visual inspection
- `xorg_cli` — display a test pattern in the viewer window; exercises scale/anchor modes and text overlays
- `v4l2_view_cli` — live camera viewer; auto-selects highest-FPS format, displays FPS overlay
## Structure
@@ -23,12 +26,13 @@ src/modules/ C modules, one directory each
include/ public headers
dev/cli/ CLI driver programs for each module
dev/web/ development web UI (Node.js/Express) — connects to live nodes for V4L2 inspection and control
tools/ build-time code generators (e.g. gen_font_atlas — bitmap font atlas for xorg text overlays)
docs/ documentation
```
## Status
Core modules and the video node binary are working. The node can be queried over the wire protocol for device enumeration and V4L2 camera control. The development web UI connects to live nodes for inspection and control. Frame capture and relay have not started.
Core modules and the video node binary are working. The node can be queried over the wire protocol for device enumeration and V4L2 camera control. The development web UI connects to live nodes for inspection and control. The xorg viewer sink is implemented (GLFW+OpenGL, all scale/anchor modes, bitmap font atlas text overlays). A V4L2 capture viewer (`v4l2_view_cli`) demonstrates live camera display without going through the node system. Frame ingest-to-wire and relay have not started.
| Module | Status | Notes |
|---|---|---|
@@ -42,10 +46,11 @@ Core modules and the video node binary are working. The node can be queried over
| `protocol` | done | Typed write/read functions for all message types |
| `node` | done | Video node binary — config, discovery, transport server, V4L2/media request handlers |
| `dev/web` | done | Development web UI — connects to live nodes, V4L2 inspection and control |
| `test_image` | done | Test pattern generator — colour bars, luminance ramp, grid; YUV420/BGRA output |
| `xorg` | done | GLFW+OpenGL viewer sink — YUV420/BGRA/MJPEG input, all scale/anchor modes, bitmap font atlas text overlays; screen grab and XRandR queries not yet implemented |
| `frame_alloc` | not started | Per-frame allocation with byte budget and ref counting |
| `relay` | not started | Input dispatch to output queues (low-latency and completeness modes) |
| `ingest` | not started | V4L2 capture loop — dequeue buffers, emit frames |
| `archive` | not started | Write frames to disk, control messages to binary log |
| `codec` | not started | Per-frame encode/decode (MJPEG, QOI, ZSTD-raw, VA-API H.264) |
| `xorg` | not started | X11 geometry (XRandR), screen grab source, frame viewer sink |
| `web node` | not started | Node.js peer — binary protocol socket side + HTTP/WebSocket to browser |