Docs: display sink commands, GLFW multi-window notes, planning updates

- protocol.md: add START_DISPLAY (0x000A) and STOP_DISPLAY (0x000B) wire
  schemas and field descriptions; add both to command table
- xorg.md: add 'Multiple windows' section covering glfwPollEvents global
  behaviour, per-context glfwMakeContextCurrent requirement, and
  glfwInit/glfwTerminate ref-counting; includes the gotcha that
  short-circuiting the event loop can starve non-polled windows
- planning.md: add cooperative capture release deferred decision;
  add xorg viewer remote controls (zoom, pan, scale, future shader
  post-processing) to deferred decisions; note xorg viewer controls
  not yet exposed remotely in module table

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-29 08:03:30 +00:00
parent 32d31cbd1e
commit f5764940e6
3 changed files with 62 additions and 1 deletions

View File

@@ -101,6 +101,8 @@ packet-beta
| `0x0007` | `ENUM_MONITORS` | List X11 monitors (XRandR) on the remote node |
| `0x0008` | `START_INGEST` | Set wanted state: open V4L2 device, connect outbound, begin streaming |
| `0x0009` | `STOP_INGEST` | Set wanted state: stop ingest stream and disconnect |
| `0x000A` | `START_DISPLAY` | Open a viewer window on the sink node and display incoming frames for the given stream |
| `0x000B` | `STOP_DISPLAY` | Close the viewer window for the given stream |
### `CONTROL_RESPONSE` (0x0003)
@@ -470,3 +472,50 @@ packet-beta
```
**Response** — no extra fields beyond request_id and status.
### `START_DISPLAY` (0x000A)
Opens a viewer window on a sink node and routes incoming `VIDEO_FRAME` messages for `stream_id` to it.
**Request**:
```mermaid
%%{init: {'packet': {'bitsPerRow': 16}}}%%
packet-beta
0-15: "request_id"
16-31: "command = 0x000A"
32-47: "stream_id"
48-63: "win_x (i16)"
64-79: "win_y (i16)"
80-95: "win_w"
96-111: "win_h"
112-119: "scale"
120-127: "anchor"
```
| Field | Description |
|---|---|
| `stream_id` | Stream to display; must match incoming `VIDEO_FRAME` stream_id |
| `win_x`, `win_y` | Window screen position (signed; for multi-monitor placement) |
| `win_w`, `win_h` | Window size in pixels; `0` = default (1280×720) |
| `scale` | `0`=stretch `1`=fit `2`=fill `3`=1:1 |
| `anchor` | `0`=center `1`=topleft |
**Response** — no extra fields beyond request_id and status. `OK` means the display slot was reserved; the window opens asynchronously on the main thread.
### `STOP_DISPLAY` (0x000B)
Closes the viewer window for the given stream.
**Request**:
```mermaid
%%{init: {'packet': {'bitsPerRow': 16}}}%%
packet-beta
0-15: "request_id"
16-31: "command = 0x000B"
32-47: "stream_id"
```
**Response** — no extra fields beyond request_id and status.