-
-
Notifications
You must be signed in to change notification settings - Fork 950
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
feat(win): new capture method, Windows.Graphics.Capture #2580
Conversation
Right now, this pull request does not contain changes to support Sunshine's service model. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2580 +/- ##
=========================================
- Coverage 7.03% 6.86% -0.17%
=========================================
Files 87 88 +1
Lines 17698 17899 +201
Branches 8407 8514 +107
=========================================
- Hits 1245 1229 -16
- Misses 13717 14012 +295
+ Partials 2736 2658 -78
Flags with carried forward coverage won't be shown. Click here to find out more.
|
I've quickly tested this locally.
Was there anything else broken when we tried to merge this before? |
I seem to remember a couple other things:
|
UI seems to be coming up quickly for me.
This was just with the new capture method, correct? The old one is unaffected? |
Yes. I could never reproduce it, but I recall this discussion from the old pull request. #2149 (comment) |
Alright, this will be merged soon. Thank you. |
- Uses MinGW UCRT64 build environment - Bumps Windows compilation standard to C++20 to support WinRT - Refactors Windows display code to be agnostic towards capture API - Change can be enabled by setting 'capture = wgc' in sunshine.conf
When i enabled this option, sunshine fails to start. Logs: [2024-06-20 14:24:29.019908] [0x00002e0c] [info] Gamepad x360 is disabled due to gamepads.vigem-not-available |
You have to disable the service and start Sunshine manually. |
…rdByte#2580)" This reverts commit 287ac4c.
I think it is not relevant to running manually. I tested it on Windows 10 22H2 and sunshine failed to run, and It worked on Windows 11 22H2. Is it normal it does not work on Windows 10 ? |
Yes, that’s expected. This API is quite new. |
after patched #2825, It works on Windows 10, but have to be run manually, not by service. |
For now, that's expected. |
Latest version of Win11 but the new beta WinGraphicsCapture that I switched to manually in configs says it can't find any encoder or display attached. I already tried to manually enter names from dxci command but same results, any hints? |
I noticed from #2149 (comment) that WGC should be able to capture the UAC secure desktop. I have tested several pre-release versions, including v2024.714.230159. Unfortunately, Moonlight lose control when the UAC window pops up. |
@PieroPontra You have to close the service and launch Sunshine from the exe, but so you can't stream the lockscreen. However, I created a simple solution for switching automatically from service to exe and from ddx wo wgc (and viceversa) here: |
…rdByte#2580)" This reverts commit 287ac4c.
Description
This adds a capture backend on Windows that uses the Windows.Graphics.Capture API. This is a more recent API that's capable of capturing the Xbox Game Bar, which the DXGI Desktop Duplication API seemingly cannot do.
This pull request depends on C++20 compiler support (for the Microsoft WinRT headers, which define this API) as well as Universal CRT runtime support. These have already been integrated into Sunshine in #2322 and #2323.
See also #2149.
Issues Fixed or Closed
Fixes #832 (manually verified)
Screenshot
Issues Fixed or Closed
Type of Change
.github/...
)Checklist
Branch Updates
LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.