Skip to content

Conversation

@TheLastRar
Copy link
Contributor

Only create the GraphicsCaptureItem just before we need to use the capture

This will allow the Windows Graphics Capture service to suspend itself when we are not capturing

This also gives the bonus effect of no longer having issues when the service dies while we aren't capturing (which would crash uWC without #43

This did require a couple changes I would like you to review the impact of;
Removal of IsAvailable, as this relied on a persistent item_, this may affect any code that ensures capture is possible
Using GetWindowTitle() when a given item is not capturing

@hecomi
Copy link
Owner

hecomi commented Mar 28, 2022

Thanks for the pull request. Please give me a few moments to review.

@hecomi hecomi self-assigned this Mar 28, 2022
@hecomi
Copy link
Owner

hecomi commented Apr 17, 2022

Sorry for the delay in replying.

I have tried and it worked in Windows Graphics Capture mode. However, uWC currently has three capture methods (Windows Graphics Capture / PrintWindow / BitBlt). If Auto mode is set, it tries Windows Graphics Capture first, and if it is not available (e.g. in the case where it captures child windows), then try the other available methods. If IsAvailable() is removed, this Auto mode will not work, so I would like to find another way.

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.

2 participants