VJ UNION

Cover image for Spout Win32Capture
vdmo
vdmo

Posted on

Spout Win32Capture

A simple sample using the Windows.Graphics.Capture APIs in a Win32 application.

GitHub logo 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

Search for "SPOUT" in :
Main.cpp, App.h, SimpleCapture.h, SimpleCapture.cpp, SampleWindow.h, SampleWindow.cpp

Build with Visual Studio 2019 - Windows 64 bit only.
SpoutDX.dll must be copied to the folder containing the executable e.g. "\x64\Release"
Find it in : Win32CaptureSample\SpoutDX

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);

Points of interest

Here are some places you should look at in the code to learn the following:

  • Capture a window given its…

Download:

Spout Win32Capture- v2.0.0

Discussion (1)

Collapse
vdmo profile image
vdmo Author

Please download 2.0.1 version
github.com/leadedge/Win32CaptureSa...