Skip to content

feat(rdpsnd): carry the capture timestamp on waves and surface wave confirms - #1720

Open
Marynych Oleksandr (maryny4) wants to merge 1 commit into
Devolutions:masterfrom
maryny4:feat/rdpsnd-wave-timestamp
Open

feat(rdpsnd): carry the capture timestamp on waves and surface wave confirms#1720
Marynych Oleksandr (maryny4) wants to merge 1 commit into
Devolutions:masterfrom
maryny4:feat/rdpsnd-wave-timestamp

Conversation

@maryny4

Copy link
Copy Markdown
Contributor

MS-RDPEA 2.2.3.10 has the client echo a wave's wTimeStamp back in the Wave Confirm PDU once it consumed, cancelled or dropped that block, which is how a server measures how long the client held the data. The server hardcoded that field to zero for both Wave and Wave2, and the confirm was only logged, never delivered to the handler — so an embedder chasing an audio/video offset has no way to tell "the delay is on my side of the socket" from "the client is buffering".

Waves now carry the low bits of the same capture time the 32-bit dwAudioTimeStamp gets, so both fields describe one instant, and RdpsndServerHandler gains a defaulted wave_confirm(block_no, timestamp) that receives the echo. Existing handlers are unaffected.

This came out of an audio-lag investigation in a downstream server (MuNeNiCK/hypr-rdp#46): on a healthy setup the server side shows nothing — zero stale-wave drops, a send queue of 0 bytes, confirms arriving at ~90/s — but there is no way to quantify the client-side half of the path, because the one field the spec reserves for it is always zero.

Covered by two tests in ironrdp-testsuite-core: a wave carries the low bits of a capture time past the 16-bit range, and a Wave Confirm reaches the handler with its block number and echoed timestamp.

@github-actions github-actions Bot added kind/protocol Affects RDP or related protocol behavior maintainer-required Maintainer review or intervention is required risk/medium Behavioral change that does not substantially alter a core public API scope/core Touches the core architectural tier size/S Size: up to 199 counted lines and 5 files; exceeds XS in either measure labels Aug 20, 2026
…onfirms

MS-RDPEA 2.2.3.10 has the client echo a wave's wTimeStamp back in the Wave
Confirm PDU once it consumed, cancelled or dropped that block, which is how a
server measures how long the client held the data. The server hardcoded that
field to zero for both Wave and Wave2, so the echo carried nothing and the
confirm was only logged, never delivered - an embedder chasing an audio/video
offset had no way to tell "the delay is on my side of the socket" from "the
client is buffering".

Waves now carry the low bits of the same capture time the 32-bit
dwAudioTimeStamp gets, and RdpsndServerHandler gains a defaulted wave_confirm
method that receives the block number and the echoed timestamp, so a handler
that timestamps its own captures can compute the round trip. Existing handlers
are unaffected.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/protocol Affects RDP or related protocol behavior maintainer-required Maintainer review or intervention is required risk/medium Behavioral change that does not substantially alter a core public API scope/core Touches the core architectural tier size/S Size: up to 199 counted lines and 5 files; exceeds XS in either measure

Development

Successfully merging this pull request may close these issues.

1 participant