You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add runtime add/remove for sources/outputs, with web UI menus
Sources and outputs are no longer fixed at startup by the TOML config —
crates/router/src/management.rs adds POST/DELETE /api/manage/sources
and /outputs, and the web UI gets Add source / Add destination forms
plus a remove control on every row/column. Config-loaded and
API-added entries go through the identical code path
(crates/router/src/registry.rs), so a config-declared source is exactly
as manageable as one added later.
Removal is real, not just bookkeeping: srt-io's spawn_input/spawn_output
now return a tokio_util::sync::CancellationToken, threaded through
relay_in/relay_out's select! loops so a removed input/output actually
stops promptly and frees its socket — verified with lsof (add cam3,
confirm the port binds, remove it, confirm the port frees), and again
live in a real browser (found and fixed a real bug along the way: the
add-source form's <input name="id"> collided with the DOM's own
form.id property, a genuine HTML forms quirk — renamed to entry_id).
crosspoint-core gained deregister_source/deregister_output and
has_source/has_output to support this, with a new unit test.
The add-source/add-destination transport dropdown also lists NDI,
Scaler, and Media player as disabled options (per user request) —
honest placeholders pointing at docs/roadmap.md rather than silently
accepting a request that would fail, since only SRT is wired into
management.rs today.
Docs updated throughout (README, architecture.md, roadmap.md) to
describe the runtime API and NDI's status, plus a new diagram
(docs/diagrams/multi-transport-envelope.svg) illustrating how NDI's
envelope encoding lets it share crosspoint-core's plain Bytes channel
with SRT's direct relay. Updated README screenshot shows the new UI.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+55-26Lines changed: 55 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@
3
3
> **AI-assisted project.** This codebase was created with [Claude](https://claude.com/claude-code)
4
4
> (Anthropic), directed and reviewed by a human author. The relay/crosspoint
5
5
> engine and web UI have been exercised locally — including integration
6
-
> tests that relay real SRT protocol traffic end-to-end and a live
6
+
> tests that relay real SRT and NDI protocol traffic end-to-end and a live
7
7
> crosspoint switch via the web UI, see [Status](#status) — but **not yet
8
-
> run against real-world third-party SRT encoders/decoders or over an
8
+
> run against real-world third-party SRT/NDI encoders/decoders or over an
9
9
> actual (non-loopback) network path**. Review before relying on it for
10
10
> anything live.
11
11
@@ -17,11 +17,11 @@ SDI/HDMI.
17
17
18
18

19
19
20
-
<imgsrc="docs/screenshots/crosspoint-grid.png"alt="The crosspoint web UI: a grid of outputs (program, preview) by sources (remote-feed, cam1, cam2), with the currently-routed cell highlighted green in each row"width="480">
20
+
<imgsrc="docs/screenshots/crosspoint-grid.png"alt="The crosspoint web UI: a grid of outputs (program, preview) by sources (cam1, cam2, remote-feed), each labeled with its transport kind and a remove control, plus Add source / Add destination buttons below"width="560">
21
21
22
22
*The web UI above is a real screenshot of the router running locally against
23
23
[config/example.toml](config/example.toml), not a mockup — captured while
24
-
verifying the routing/persistence/websocket behavior described in
24
+
verifying the routing/persistence/websocket/add-remove behavior described in
25
25
[Status](#status) below.*
26
26
27
27
## What it does
@@ -39,14 +39,24 @@ crosspoint as a "source" without the engine caring that they're not relayed
39
39
SRT. **Not built yet** — Phase 1 is relay-only; see
40
40
[docs/roadmap.md](docs/roadmap.md).
41
41
42
-
Control is a local web UI (a crosspoint grid: click a cell to route that
43
-
output from that source) backed by a small REST API. No auth/TLS — this is
44
-
meant to run on a trusted operations network, the same trust model as a
45
-
hardware router's control port.
42
+
Control is a local web UI backed by a small REST API: a crosspoint grid
43
+
(click a cell to route that output from that source), plus **Add
44
+
source**/**Add destination** menus and a remove control on every row/column
45
+
for adding or tearing down SRT inputs/outputs at runtime — not just what was
46
+
in the TOML config at startup. No auth/TLS — this is meant to run on a
47
+
trusted operations network, the same trust model as a hardware router's
48
+
control port.
49
+
50
+
**Transports beyond SRT:**`crates/ndi-io` is a real, tested NDI transport
51
+
(see [Status](#status)) but isn't wired into the router binary/web UI yet —
52
+
the add-source/add-destination menus show NDI as a disabled option for now.
53
+
`crates/omt-io` is a placeholder for the equivalent OMT transport (open,
54
+
MIT-licensed) — not yet implemented, see [docs/roadmap.md](docs/roadmap.md).
46
55
47
56
## Status
48
57
49
-
**Phase 1 (current): relay-only crosspoint + web UI.** Working:
58
+
**Phase 1 (current): relay-only crosspoint + web UI, dynamic add/remove.**
59
+
Working:
50
60
51
61
- SRT input/output as either `listener` (this router waits for a
52
62
connection) or `caller` (this router dials out), each reconnecting on its
@@ -56,27 +66,46 @@ hardware router's control port.
56
66
- A local web UI (`crates/web`) — grid of outputs x sources, click to route,
57
67
updated live over a websocket (`GET /ws`) with a REST poll (`GET
58
68
/api/state`) as first paint / fallback.
69
+
-**Runtime add/remove**: `POST`/`DELETE /api/manage/sources` and
70
+
`/api/manage/outputs` (`crates/router/src/management.rs`) spawn or tear
71
+
down an SRT input/output on the fly — the same code path the static TOML
72
+
config uses at startup, so a config-declared source is exactly as
73
+
removable as one added later. Backed by
74
+
[`tokio_util::sync::CancellationToken`](https://docs.rs/tokio-util) per
75
+
task (added to `srt-io`) so removal actually stops the task and frees the
76
+
socket, not just forgets about it. The web UI exposes this as **Add
77
+
source**/**Add destination** forms plus a remove control per row/column.
59
78
- Routing changes optionally persist to disk (`[state]` in the config) and
60
79
reload on restart, overriding each output's `default_source`.
0 commit comments