Struct rusty_duplication::capturer::shared::SharedCapturer
source · pub struct SharedCapturer<'a> { /* private fields */ }Expand description
Capture screen to a chunk of shared memory.
Implementations§
pub fn new(ctx: &'a DuplicateContext, name: &str) -> Result<Self>
Trait Implementations§
source§fn buffer(&self) -> &[u8] ⓘ
fn buffer(&self) -> &[u8] ⓘ
Get the buffer of the last captured frame.
The buffer is in BGRA32 format.
source§fn buffer_mut(&mut self) -> &mut [u8] ⓘ
fn buffer_mut(&mut self) -> &mut [u8] ⓘ
Get the buffer of the last captured frame.
The buffer is in BGRA32 format.
fn desc(&self) -> Result<DXGI_OUTPUT_DESC>
source§fn check_buffer(&self) -> Result<()>
fn check_buffer(&self) -> Result<()>
Check buffer size.
source§fn capture(&mut self) -> Result<DXGI_OUTDUPL_FRAME_INFO>
fn capture(&mut self) -> Result<DXGI_OUTDUPL_FRAME_INFO>
Capture the screen and return the frame info.
The pixel data is stored in the buffer.
source§fn safe_capture(&mut self) -> Result<DXGI_OUTDUPL_FRAME_INFO>
fn safe_capture(&mut self) -> Result<DXGI_OUTDUPL_FRAME_INFO>
Check buffer size before capture.