[domistream] Host: RTSP server, DESCRIBE and ANNOUNCE #10

Merged
mnovak merged 4 commits from feature/host-rtsp-server into main 2026-12-04 12:46:32 +01:00
Owner

Lumen L1, host side of RTSP: rtsp::server (per-connection session), the DESCRIBE SDP writer and a strict ANNOUNCE parser into a typed StreamConfig, tests first. PROTOCOL.md gains section 2.5 (host side, the attribute table with required/defaulted status).

  • Order OPTIONS → DESCRIBE → SETUP ×3 (any order, each once) → ANNOUNCE → PLAY; CSeq echoed; Session checked when present (optional "require" mode); statuses 400/451/454/455/501; every refusal leaves the state unchanged; events Announced(StreamConfig) and PlayRequested.
  • ANNOUNCE: 9 required attributes (as a BSD-2 host treats them), defaults for the rest; dynamicRangeMode and encoderCscMode kept raw (U6: bit meanings unknown, their only detailed source is GPL-provenance); caps 32 KiB / 1024 lines / 1024 bytes per line / 512 attributes; duplicates refused, unknowns counted.
  • Small shared changes: RtspResponse::encode, RtspFramer::for_requests (missing Content-Length = no body, RFC 2326).

Evidence: 39 new tests (our RtspClient against the server in memory, whole and byte-by-byte, every codec × audio × HDR/RFI combination; order, Session, CSeq; property round trips; alloc caps). Rebased on PR #9: 309 passed / 0 failed; clippy and fmt clean (rustdoc clean on the branch). Fuzz: rtsp_server 895,897 runs / 121 s, announce 11,659,642 runs / 121 s, 0 crashes.

Clean-room checklist

  • Sources read: Moonshine f184d5e src/rtsp.rs and src/session/stream/{mod,video/mod}.rs (BSD-2, facts only: S-30, S-31), Wolf RTSP and RFC 2326 (S-32).
  • Four second-hand GPL values found in Moonshine comments (csc bit layout, maxNumReferenceFrames 0, surround rotation, bitrate reduction) are logged in the "Second-hand GPL facts" table and not used.
  • No forbidden source; no code copied.
  • Public repo: nothing private.

Self-review: checked the rebase conflict (fuzz bins only), that host StreamConfig does not shadow the client's re-export, that numbers are range-checked before use, and that 451 refusals depend only on the host's own offer. Open U5/U6/U26 questions are listed for the black-box measurement with real clients.

Lumen L1, host side of RTSP: `rtsp::server` (per-connection session), the DESCRIBE SDP writer and a strict ANNOUNCE parser into a typed `StreamConfig`, tests first. PROTOCOL.md gains section 2.5 (host side, the attribute table with required/defaulted status). - Order OPTIONS → DESCRIBE → SETUP ×3 (any order, each once) → ANNOUNCE → PLAY; CSeq echoed; Session checked when present (optional "require" mode); statuses 400/451/454/455/501; every refusal leaves the state unchanged; events `Announced(StreamConfig)` and `PlayRequested`. - ANNOUNCE: 9 required attributes (as a BSD-2 host treats them), defaults for the rest; `dynamicRangeMode` and `encoderCscMode` kept raw (U6: bit meanings unknown, their only detailed source is GPL-provenance); caps 32 KiB / 1024 lines / 1024 bytes per line / 512 attributes; duplicates refused, unknowns counted. - Small shared changes: `RtspResponse::encode`, `RtspFramer::for_requests` (missing Content-Length = no body, RFC 2326). Evidence: 39 new tests (our `RtspClient` against the server in memory, whole and byte-by-byte, every codec × audio × HDR/RFI combination; order, Session, CSeq; property round trips; alloc caps). Rebased on PR #9: 309 passed / 0 failed; clippy and fmt clean (rustdoc clean on the branch). Fuzz: `rtsp_server` 895,897 runs / 121 s, `announce` 11,659,642 runs / 121 s, 0 crashes. **Clean-room checklist** - [x] Sources read: Moonshine `f184d5e` `src/rtsp.rs` and `src/session/stream/{mod,video/mod}.rs` (BSD-2, facts only: S-30, S-31), Wolf RTSP and RFC 2326 (S-32). - [x] Four second-hand GPL values found in Moonshine comments (csc bit layout, maxNumReferenceFrames 0, surround rotation, bitrate reduction) are logged in the "Second-hand GPL facts" table and **not used**. - [x] No forbidden source; no code copied. - [x] Public repo: nothing private. **Self-review**: checked the rebase conflict (fuzz bins only), that host `StreamConfig` does not shadow the client's re-export, that numbers are range-checked before use, and that 451 refusals depend only on the host's own offer. Open U5/U6/U26 questions are listed for the black-box measurement with real clients.
mnovak added 4 commits 2026-12-04 12:46:25 +01:00
mnovak force-pushed feature/host-rtsp-server from 7fce5aa226 to fd4285aff0 2026-12-04 12:46:26 +01:00 Compare
mnovak merged commit eae3b9e754 into main 2026-12-04 12:46:32 +01:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mnovak/DomiStream#10