Skip to content

Yoticc/ScreenCapture

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Screen capturing via DirectX

Implementation of screen capture via DirectX using IDXGIOutputDuplication in C# without any dependencies.
Emphasis on perfomance, but unfortunately due to a language limitation is completely covered by boxing structures into interfaces.

Samples

Both samples can be found in Program.cs
But for illustrative purposes:

using var capturer = new ScreenCapturer();

Frame frame;
while (true)
  if (capturer.CaptureFrame(&frame))

or with the choice of device and screen:

GraphicDevice device;
GraphicDevice.EnumDevice(&device, index: 0);

Screen screen;
Screen.EnumScreen(&screen, &device, index: 0);

Duplicator duplicator;
Duplicator.Create(&device, &screen, &duplicator);

Frame frame;
while (true)
   if (duplicator.CaptureFrame(&frame))

About

Screen capturing via DirectX using IDXGIOutputDuplication

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages