feat(dgw): stream reconnecting WebM sessions - #1942
Open
irvingouj@Devolutions (irvingoujAtDevolution) wants to merge 6 commits into
Open
irvingouj@Devolutions (irvingoujAtDevolution) wants to merge 6 commits into
irvingouj@Devolutions (irvingoujAtDevolution) wants to merge 6 commits into
Conversation
Contributor
Author
|
Implementation notes:
Note LLM-assisted content (no human feedback). |
irvingouj@Devolutions (irvingoujAtDevolution)
force-pushed
the
feat/video-streamer-session-reconnect
branch
from
August 21, 2026 21:11
a853aa8 to
ea109da
Compare
irvingouj@Devolutions (irvingoujAtDevolution)
force-pushed
the
feat/video-streamer-session-reconnect
branch
from
August 21, 2026 21:16
ea109da to
f8c127a
Compare
irvingouj@Devolutions (irvingoujAtDevolution)
force-pushed
the
feat/video-streamer-session-reconnect
branch
from
August 24, 2026 15:59
f8c127a to
3eed5fa
Compare
irvingouj@Devolutions (irvingoujAtDevolution)
force-pushed
the
feat/video-streamer-session-reconnect
branch
from
August 25, 2026 19:56
948bd4a to
e2d5fd1
Compare
irvingouj@Devolutions (irvingoujAtDevolution)
force-pushed
the
feat/video-streamer-session-reconnect
branch
from
September 14, 2026 17:52
e2d5fd1 to
0e5171c
Compare
Gateway WebM shadowing now consumes a recording event stream so clips can reconnect and change size. The Start/Pull codes stay valid for existing clients. Push disconnect marks the session ended so viewers receive StreamEnded. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep one response per Pull while recordings roll over to new WebM clips. Recover truncated tails and distinguish reconnectable capture disconnects from terminal recording end. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Launch recording sources only after Start and serve one typed request at a time. Replace retained GOP payloads with same-handle file replay and prefetch up to four bounded output chunks. Process later client requests after the current response instead of maintaining an extra Pull queue. Separate media, transport, and protocol tests, and require the bench feature for the benchmark target. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Return an error for laced video blocks instead of panicking. Remove redundant watch state and transient development documentation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
irvingouj@Devolutions (irvingoujAtDevolution)
force-pushed
the
feat/video-streamer-session-reconnect
branch
from
September 17, 2026 18:39
03ae5c0 to
efdfb97
Compare
Keep the initial Start response byte-for-byte compatible with the legacy metadata message. Use a distinct message for later segment boundaries without adding protocol modes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
irvingouj@Devolutions (irvingoujAtDevolution)
marked this pull request as ready for review
September 18, 2026 14:53
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Protocol compatibility, terminal disconnect handling, shutdown propagation, and adaptive frame skipping remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds reconnecting, multi-clip WebM shadow streaming with resolution-aware segment normalization and an extended WebSocket protocol.
Changes:
- Tracks recording clips and reconnect events through watch-based state.
- Normalizes WebM clips into fixed-resolution VP8 segments.
- Adds message-based transport and extensive protocol/normalizer tests.
docs-compressor was skipped because the more specific prose review covered the intent document.
File summaries
| File | Description |
|---|---|
devolutions-gateway/src/ws.rs |
Adds message-oriented WebSocket handling. |
devolutions-gateway/src/streaming.rs |
Connects recording events to WebM sessions. |
devolutions-gateway/src/streaming.intent.md |
Documents multi-clip normalization. |
devolutions-gateway/src/recording.rs |
Publishes clip lifecycle and append state. |
devolutions-gateway/src/api/jrec.rs |
Routes shadow requests to session streaming. |
crates/video-streamer/src/streamer/signal_writer.rs |
Signals successful writes. |
crates/video-streamer/src/streamer/block_tag.rs |
Tracks blocks and handles signed timestamps. |
crates/video-streamer/src/session.rs |
Defines the recording-session API. |
crates/video-streamer/src/protocol/transport.rs |
Implements typed transport adaptation. |
crates/video-streamer/src/protocol/tests/mod.rs |
Tests protocol sequencing and failures. |
crates/video-streamer/src/protocol/segments.rs |
Maps normalized segments to responses. |
crates/video-streamer/src/protocol/mod.rs |
Runs pull-driven streaming sessions. |
crates/video-streamer/src/protocol/message.rs |
Defines wire messages and codes. |
crates/video-streamer/src/normalizer/tests/replay.rs |
Tests live-edge replay behavior. |
crates/video-streamer/src/normalizer/tests/mod.rs |
Tests normalization and resource bounds. |
crates/video-streamer/src/normalizer/mod.rs |
Implements WebM normalization. |
crates/video-streamer/src/lib.rs |
Exports the session API. |
crates/video-streamer/src/decoder.rs |
Adds dynamic VPX frame decoding. |
crates/video-streamer/Cargo.toml |
Gates the benchmark behind its feature. |
Review details
- Files reviewed: 19/19 changed files
- Comments generated: 7
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+58
to
+60
| We have two streaming sources that we currently support: | ||
| 1. RDM, which whenver size of a remote connecti session changes, it creates a new clip with consistent size in the header. | ||
| 2. Chrome/Other browsers, chrome behaves differently, see `webapp/packages/web-recorder`, we use the media recorder API to record the session, the size changing behavior is not documented, but in experiencemnt and in practice, it will sliently change the size of the frame, the webm standard did not advise against this behavior, more lilely, it is undifined, and the client may or may not support it. |
|
|
||
| ### The normalizer | ||
|
|
||
| Given the constrains above, we would like to unifiy the source and provide a single shape that the client can consume easily without breaking backward compatibility. |
| - Every client has an independent output sequence beginning at zero. | ||
| ``` | ||
|
|
||
| The client always gets a guaranteed fixed size segment, for the first segment, we keep it backward compatible, the protocol will be extendned, such that, on new `pull` message, when the previous output segment ends, it will send a new `SegmentStarted` message. No newline at end of file |
Retain terminal completion across late subscriptions and stop shadow sessions during Gateway shutdown. Restore adaptive frame skipping and correct the cross-cluster replay fixture. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gateway WebM shadowing now consumes a recording event stream so clips can reconnect and change size.
The Start/Pull codes stay valid for existing clients.
Push disconnect marks the session ended so viewers receive StreamEnded.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com
Stack created with GitHub Stacks CLI • Give Feedback 💬