Skip to content

Separate out key frame request from MAX_INT frame ACK #288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

matt335672
Copy link
Member

This fixes an edge case with the resize logic. At the moment, given where we are with v0.10 user acceptance testing, I suggest this stays on devel and gets back-ported if necessary.

This means we need to branch off v0.10 before merging this PR.

A call to rdpClientConProcessMsgClientRegionEx() from xrdp with the frame number set to MAX_INT acks all outstanding frames. This is useful when a decoder has been deleted for a resize.

A second feature of this call is that it ensures the next frame sent is a key frame in progressive mode.

This is fine for a single monitor system. On a multi-monitor system however, this logic for this breaks one of the assumptions made by rdpDeferredUpdateCallback() which is that only updates for a single monitor are sent at one time. In heavy output situations, this can result in some corruption on a multi-monitor resize.

This PR separates out the key frame request from the frame ACK, and moves it into the memory allocation logic. Following a memory allocation or re-allocation, a key frame will always need to be sent for each monitor.

Getting a multi-monitor resize request with mstsc.exe is a challenge, but possible. The key is using the 'display' window of the settings application to change a monitor resolution when mstsc.exe is full screen. Do this as follows:-

  1. Start the settings application, and find the 'Display' tab
  2. Start a GFX multimon xrdp session
  3. Run glxgears in two monitor windows to generate lots of rectangles
  4. Hit CTRL-ALT-DEL and choose 'task manager' to bring the Windows taskbar to the foreground
  5. Move to the settings app by using the taskbar and change the resolution of one of the monitors.

This will confuse mstsc.exe a bit, but it will recover by coming out of full-screen and re-entering full-screen.

A call to rdpClientConProcessMsgClientRegionEx() from xrdp with the frame
number set to MAX_INT acks all outstanding frames. This is useful when
a decoder has been deleted for a resize.

A second feature of this call is that it ensures the next frame sent is
a key frame in progressive mode.

This is fine for a single monitor system. On a multi-monitor system
however, this logic for this breaks one of the assumptions made by
rdpDeferredUpdateCallback() which is that only updates for a single
monitor are sent at once. In extreme output situations, this can result
in some corruption on a multi-monitor resize.

This PR separates out the key frame request from the frame ACK, and
moves it into the memory allocation logic. Following a memory allocation
or re-allocation, a key frame will always need to be sent.
Copy link
Contributor

@jsorg71 jsorg71 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@matt335672 matt335672 merged commit 4de20d3 into neutrinolabs:devel Feb 23, 2024
@matt335672 matt335672 deleted the separate_key_frame_request branch February 23, 2024 15:38
@matt335672 matt335672 mentioned this pull request Jul 17, 2024
@metalefty metalefty mentioned this pull request Jul 24, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants