Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions crates/ironrdp-egfx/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1201,10 +1201,10 @@ impl GraphicsPipelineClient {
self.handler.on_frame_complete(frame_id);

// Per [3.3.5.12]: client MUST send FrameAcknowledge after EndFrame.
// We send the actual queue depth (not Unavailable / 0xFFFFFFFF as FreeRDP does);
// the real value gives the server backpressure information for frame pacing.
// QueueDepth counts queued bytes, not decoded/queued frames. This client
// does not measure queued bytes, so report Unavailable (not Suspend).
Comment thread
piclaw-bot marked this conversation as resolved.
let ack = GfxPdu::FrameAcknowledge(FrameAcknowledgePdu {
queue_depth: QueueDepth::from_u32(self.frames_queued),
queue_depth: QueueDepth::Unavailable,
frame_id,
total_frames_decoded: self.total_frames_decoded,
});
Expand Down Expand Up @@ -2683,4 +2683,17 @@ mod tests {
a destRect-relative reading would take (28, 32) instead (issue #2042)"
);
}
#[test]
fn frame_ack_queue_depth_is_not_a_frame_count() {
let mut handler = GraphicsPipelineClient::new(Box::new(TestHandler), None);
handler.total_frames_decoded = 3;
let responses = handler.handle_end_frame(7).unwrap();
let bytes = ironrdp_core::encode_vec(responses[0].as_ref()).unwrap();
let GfxPdu::FrameAcknowledge(ack) = ironrdp_core::decode::<GfxPdu>(&bytes).unwrap() else {
panic!("expected frame ack")
};
assert_eq!(ack.frame_id, 7);
assert_eq!(ack.total_frames_decoded, 4);
assert_eq!(ack.queue_depth, QueueDepth::Unavailable);
}
}
Loading
Loading