A simple sample using the Windows.Graphics.Capture APIs in a Win32 application.
leadedge / Win32CaptureSample
A simple sample using the Windows.Graphics.Capture APIs in a Win32 application.
Win32CaptureSample
A simple sample using the Windows.Graphics.Capture APIs in a Win32 application.
Created by Robert Mikhayelyan
Modified for Spout output
Pre-compiled binaries in Spout\Binaries
- Add console for debugging.
- Limit to BRGA8 format.
- Default cursor capture off.
- Add "Send client area" option.
- Include window handle for TryStartCaptureFromWindowHandle and StartCaptureFromItem
- Add m_hWnd to SimpleCapture
- Add Spout sender to SimpleCapture
- Add SendTexture to OnFrameArrived
- Add command line window or display capture
Search for "SPOUT" in :
Main.cpp, App.h, SimpleCapture.h, SimpleCapture.cpp, SampleWindow.h, SampleWindow.cpp
Build with Visual Studio 2022 - Windows 64 bit only.\
SpoutDX - for this application, added function to send part of a texture.
bool SendTexture(ID3D11Texture2D* pTexture, unsigned int xoffset, unsigned int yoffset, unsigned int width, unsigned int height);
Instructions for command line capture can be found in Spout\Binaries\readme.txt
Points of interest
Here are some places you should look at in the code to learn the following:
- Capture a window given its…
Download:
Update 2.0.2
https://github.com/leadedge/Win32CaptureSample/releases/tag/v2.02
Discussion (2)
Please download 2.0.1 version
github.com/leadedge/Win32CaptureSa...
github.com/leadedge/Win32CaptureSa...
version 2.02 is out