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>
This commit is contained in:
@@ -99,6 +99,8 @@ packet-beta
|
||||
| `0x0005` | `GET_CONTROL` | Get a V4L2 control value |
|
||||
| `0x0006` | `SET_CONTROL` | Set a V4L2 control value |
|
||||
| `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 |
|
||||
|
||||
### `CONTROL_RESPONSE` (0x0003)
|
||||
|
||||
@@ -412,3 +414,59 @@ packet-beta
|
||||
**Response** — no extra fields beyond request_id and status.
|
||||
|
||||
For `MENU` and `INTEGER_MENU` controls, `value` must be a valid menu item `index` as returned by `ENUM_CONTROLS`.
|
||||
|
||||
### `START_INGEST` (0x0008)
|
||||
|
||||
Sets wanted state on a source node: open the specified V4L2 device, configure the stream format, and connect outbound to the given sink.
|
||||
|
||||
**Request**:
|
||||
|
||||
```mermaid
|
||||
%%{init: {'packet': {'bitsPerRow': 16}}}%%
|
||||
packet-beta
|
||||
0-15: "request_id"
|
||||
16-31: "command = 0x0008"
|
||||
32-47: "stream_id"
|
||||
48-63: "format"
|
||||
64-79: "width"
|
||||
80-95: "height"
|
||||
96-111: "fps_n"
|
||||
112-127: "fps_d"
|
||||
128-143: "dest_port"
|
||||
144-159: "transport_mode"
|
||||
160-167: "device_path_len"
|
||||
168-175: "device_path …"
|
||||
```
|
||||
|
||||
Followed by `dest_host` str8.
|
||||
|
||||
| Field | Description |
|
||||
|---|---|
|
||||
| `stream_id` | ID assigned by the controller; used in all subsequent `VIDEO_FRAME` messages |
|
||||
| `format` | Codec format code (see [Codec Formats](#codec-formats)); `0` = auto-select best MJPEG |
|
||||
| `width` | Capture width in pixels; `0` = auto-select |
|
||||
| `height` | Capture height in pixels; `0` = auto-select |
|
||||
| `fps_n` | Frame rate numerator; `0` = auto-select |
|
||||
| `fps_d` | Frame rate denominator |
|
||||
| `dest_port` | TCP port of the sink node to connect to |
|
||||
| `transport_mode` | `0x0001` = encapsulated (framed); `0x0002` = opaque (raw byte stream) |
|
||||
| `device_path` | str8 — path to the V4L2 device, e.g. `/dev/video0` |
|
||||
| `dest_host` | str8 — hostname or IP of the sink node |
|
||||
|
||||
**Response** — no extra fields beyond request_id and status. `OK` means the wanted state was accepted; the node will reconcile asynchronously.
|
||||
|
||||
### `STOP_INGEST` (0x0009)
|
||||
|
||||
Sets wanted state: stop the ingest stream and disconnect from the sink.
|
||||
|
||||
**Request**:
|
||||
|
||||
```mermaid
|
||||
%%{init: {'packet': {'bitsPerRow': 16}}}%%
|
||||
packet-beta
|
||||
0-15: "request_id"
|
||||
16-31: "command = 0x0009"
|
||||
32-47: "stream_id"
|
||||
```
|
||||
|
||||
**Response** — no extra fields beyond request_id and status.
|
||||
|
||||
Reference in New Issue
Block a user