Repository navigation
Windows: RemoteIdd capture, active streams API and session-local input - #6
Merged
Merged
Conversation
New capture method "remoteidd" for OpenStreamMS seats. Instead of Desktop Duplication or WGC, it reads the frames that the OpenStreamMS RemoteIdd display driver publishes for the current session: a shared texture (NT handle + keyed mutex) announced through a named slot with a seqlock. The texture is copied into the capture image and released right away, so the driver never waits for the encoder. - Only selected with capture = remoteidd; never part of auto-detection. - Requires a hardware encoder and SDR (IddCx 1.4 swapchains are 8-bit BGRA). - src/platform/windows/remoteidd/ is a copy of the contract and consumer from OpenStreamMS/Native/RemoteIdd; change it there and copy it back. - Tests: hand-off across devices, texture recreation on resize, publisher never blocking on a busy consumer, and the real backend capturing a 240 Hz producer (481/480 frames, no reinit). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the display refreshes much faster than the client asks for (an RDP seat composing at 250 Hz for a 60 fps stream), pacing by display ticks repeats or drops frames. Capture each frame when it arrives and cap the rate with frame_rate_limiter_t; hold back a frame that comes too early. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Running as SYSTEM inside an RDP seat (needed for the RemoteIdd backend), retrieve_users_token took the console session's user. Use the session the process runs in, and fall back to the console only from session 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each pending pairing listed by GET /api/pin now carries a kind: "moonlight" for a Moonlight client and "webrtc" for a Moonlight WebRTC TV, so a frontend can say which device is waiting for a PIN. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hosts that manage several Sunshine instances (OpenStreamMS) had no way to know whether anyone is streaming from an instance. GET /api/streams returns the Moonlight session count (rtsp_stream) and the Moonlight WebRTC TV session count (webrtc_stream), plus their total. Authenticated like the rest of the Web UI API. Tests cover the response and the authentication requirement. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the Virtual HID Driver installed and licensed, libvirtualhid creates a driver-backed HID mouse and keyboard. Windows routes HID input to the console session, so a Sunshine running inside an RDP session moved the host's cursor instead of the session's (OpenStreamMS#39). When the process is not in the active console session, mouse and keyboard now go through SendInput, which injects into the caller's session. Gamepads, touch and pen keep using libvirtualhid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 of 3 tasks
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.
Brings the Windows work shipped in OpenStreamMS into
master, plus the fix for mouse/keyboard going to the host console.Session-local mouse and keyboard (OpenStreamMS#39)
With the Virtual HID Driver installed and licensed, libvirtualhid creates a driver-backed HID mouse and keyboard. Windows routes HID input to the console session, so a Sunshine running inside an RDP session moved the host's cursor instead of the session's.
When the process is not in the active console session, mouse and keyboard now go through
SendInput(src/platform/windows/session_input.{h,cpp}), which injects into the caller's own session. The logic mirrors libvirtualhid's Win32 fallback: same US-layout scan-code map, same virtual-desktop scaling for absolute moves, and a retry on desktop switches (UAC/lock screen). Gamepads, touch and pen keep using libvirtualhid. In the console session nothing changes.Also included (already shipped in OpenStreamMS builds)
/api/pinGET /api/streamsTesting
🤖 Generated with Claude Code