Skip to main content

ScreenCaptureSource

Trait ScreenCaptureSource 

Source
pub trait ScreenCaptureSource {
    // Required methods
    fn metadata(&self) -> Result<SourceMetadata>;
    fn stream(
        &self,
        foreground_executor: &ForegroundExecutor,
        frame_callback: Box<dyn Fn(ScreenCaptureFrame) + Send>,
    ) -> Receiver<Result<Box<dyn ScreenCaptureStream>>>;
}
Expand description

A source of on-screen video content that can be captured.

Required Methods§

Source

fn metadata(&self) -> Result<SourceMetadata>

Returns metadata for this source.

Source

fn stream( &self, foreground_executor: &ForegroundExecutor, frame_callback: Box<dyn Fn(ScreenCaptureFrame) + Send>, ) -> Receiver<Result<Box<dyn ScreenCaptureStream>>>

Start capture video from this source, invoking the given callback with each frame.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§