Commit Graph

11 Commits

Author SHA1 Message Date
6c9e0ce7dc Add START_INGEST and STOP_INGEST protocol commands
START_INGEST carries stream_id, format/width/height/fps, dest_host:port,
transport_mode (encapsulated or opaque), and device_path. All format fields
default to 0 (auto-select). STOP_INGEST carries stream_id only.

Both commands set wanted state on the node; reconciliation is asynchronous.
Protocol doc updated with wire schemas for both commands.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-29 02:02:38 +00:00
4e40223478 docs: split architecture.md into focused sub-documents
architecture.md is now a concise overview (~155 lines) with a
Documentation section linking to all sub-docs.

New sub-docs in docs/:
  transport.md        — wire modes, frame header, serialization, web peer
  relay.md            — delivery modes, memory model, congestion, scheduler
  codec.md            — stream metadata, format negotiation, codec backends
  xorg.md             — screen grab, viewer sink, render loop, overlays
  discovery.md        — multicast announcements, multi-site, site gateways
  node-state.md       — wanted/current state, reconciler, stats, queries
  device-resilience.md — device loss handling, stream events, audio (future)

All cross-references updated to file links. Every sub-doc links back
to architecture.md. docs/transport.md links to docs/protocol.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 23:23:54 +00:00
2364170053 docs: fix packet-beta bitsPerRow alignment for remaining diagrams
STREAM_EVENT: bitsPerRow 8 (u16+u8 fields align to byte rows)
STREAM_CLOSE: bitsPerRow 16 (all u16 fields, each gets own row)
DISCOVERY_ANNOUNCE: bitsPerRow 8 (mixed u8/u16 fields, byte-aligned)
ENUM_CONTROLS request: bitsPerRow 16 (three u16 fields)
ENUM_CONTROLS control prefix: bitsPerRow 8 (u32+u8+u32, type splits at byte)
GET_CONTROL request: bitsPerRow 16 (u16+u16+u16+u32)
SET_CONTROL request: bitsPerRow 16 (u16+u16+u16+u32+u32)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 02:22:29 +00:00
4d50c5fa80 docs: frame format packet diagram — 48-bit rows fit full header on one line
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 02:16:28 +00:00
c9fa44e6e5 docs: fix frame format packet diagram — 16-bit word width for clean alignment
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 02:15:14 +00:00
fa9d8696fe docs: fix str8 packet diagram — 8-bit word width to avoid ugly split row
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 02:13:15 +00:00
7e5628f44c docs: replace ASCII art with Mermaid packet-beta diagrams in protocol.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 02:04:57 +00:00
49e5076eea Fix menu controls: wire up menu items in ctrl_enum_cb; document control commands
src/node/main.c: ctrl_enum_cb was discarding menu_count and menu_items,
causing empty dropdowns for all MENU/INTEGER_MENU controls. Added a
menu item pool (MAX_MENU_POOL=128 items) to Ctrl_Build; the callback now
copies items into the pool and sets menu_count/menu_items on the control.

docs/protocol.md: add missing sections — str8 primitive, ENUM_DEVICES,
ENUM_CONTROLS (with control type/flag tables and menu item notes),
GET_CONTROL, and SET_CONTROL schemas.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 02:00:18 +00:00
744e374531 Document site ID translation requirement for site-to-site links
Both sites default to site_id=0; gateway must rewrite site_id in
announcements and protocol messages crossing the boundary. site_id=0
on a cross-site link is a gateway protocol error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 22:11:46 +00:00
57e46af57b Add protocol reference document
Covers all layers: TCP → transport frame → message type dispatcher →
payload schemas. Documents frame format (6-byte header), all message
types, STREAM_OPEN/CLOSE lifecycle, codec/pixel_format/origin tables,
stream events, and discovery announcement wire format.

Also fixes stale channel_id reference in audio section of architecture.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-26 22:03:02 +00:00
a29c556851 Add common, media_ctrl and v4l2_ctrl modules with CLI drivers and docs
Modules (src/modules/):
- common/error: App_Error struct with structured detail union, error codes,
  app_error_print(); designed for future upgrade to preprocessor-generated
  location codes
- media_ctrl: media device enumeration, topology query (entities/pads/links),
  link enable/disable via Media Controller API (/dev/media*)
- v4l2_ctrl: control enumeration (with menu item fetching), get/set via
  V4L2 ext controls API, device discovery (/dev/video*)

All modules use -std=c11 -D_GNU_SOURCE, build artifacts go to build/ only.
Kernel-version-dependent constants guarded with #ifdef + #warning.

CLI drivers (dev/cli/):
- media_ctrl_cli: list, info, topology, set-link subcommands
- v4l2_ctrl_cli: list, controls, get, set subcommands

Docs (docs/cli/):
- media_ctrl_cli.md and v4l2_ctrl_cli.md with usage, examples, and
  context within the video routing system

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 21:40:37 +00:00