rusty-duplication
Capture the screen on Windows using the Desktop Duplication API in Rust, with shared memory support.
Installation
Usage
use ;
use ;
Advanced Usage
Shared Memory
You can use shared memory to share the buffer between processes.
This lib provides a SharedCapturer which will use Windows shared memory to store the buffer. Just call DuplicateContext.shared_capturer with a name.
manager.contexts.shared_capturer.unwrap;
Customized Capturer
This lib provides low-level APIs like DuplicateContext, so you can write your own capturer. You can refer to SimpleCapturer's implementation.
Test
Run the tests using cargo test -- --test-threads=1.
Credit
This project is based on the following projects:
- https://github.com/bryal/dxgcap-rs
- https://github.com/microsoft/windows-rs
- https://github.com/hecomi/uDesktopDuplication