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§
Sourcefn metadata(&self) -> Result<SourceMetadata>
fn metadata(&self) -> Result<SourceMetadata>
Returns metadata for this source.
Sourcefn stream(
&self,
foreground_executor: &ForegroundExecutor,
frame_callback: Box<dyn Fn(ScreenCaptureFrame) + Send>,
) -> Receiver<Result<Box<dyn ScreenCaptureStream>>>
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".