CaptureSource

Trait CaptureSource 

Source
pub trait CaptureSource: Send + Sync {
    // Required methods
    fn descriptor(&self) -> &CaptureDescriptor;
    fn next_frame(&self) -> Option<FrameLease>;
}
Expand description

Trait implemented by capture backends that yield zero-copy frames.

§Example

use styx_capture::prelude::*;

struct MySource;
impl CaptureSource for MySource {
    fn descriptor(&self) -> &CaptureDescriptor { unimplemented!() }
    fn next_frame(&self) -> Option<FrameLease> { None }
}

Required Methods§

Source

fn descriptor(&self) -> &CaptureDescriptor

Descriptor for this source.

Source

fn next_frame(&self) -> Option<FrameLease>

Pull the next frame; concrete backends decide how to block/yield.

Implementors§