Type Alias SharedMemoryCapturer

Source
pub type SharedMemoryCapturer = Capturer<SharedMemory>;
Expand description

Capture screen to a chunk of shared memory.

To create an instance, see SharedMemoryCapturer::create and SharedMemoryCapturer::open.

Aliased Type§

pub struct SharedMemoryCapturer {
    pub pointer_shape_buffer: Vec<u8>,
    pub buffer: SharedMemory,
    pub timeout_ms: u32,
    /* private fields */
}

Fields§

§pointer_shape_buffer: Vec<u8>§buffer: SharedMemory

The buffer to store the captured frame. The data is stored in BGRA32 format.

§timeout_ms: u32

Timeout in milliseconds for the next frame. By default it is 300ms.

Implementations§

Source§

impl SharedMemoryCapturer

Source

pub fn create(monitor: Monitor, name: &str) -> Result<Self>

Create an instance by creating a new shared memory with the provided name.

Source

pub fn open(monitor: Monitor, name: &str) -> Result<Self>

Create an instance by opening an existing shared memory with the provided name.