Skip to main content

BackendDevice

Trait BackendDevice 

Source
pub trait BackendDevice: Send + 'static {
    // Required methods
    fn capabilities(&self) -> CameraResult<DeviceCapabilities>;
    fn start(&mut self, sink: FrameSink, plan: &CapturePlan) -> CameraResult<()>;
    fn stop(&mut self) -> CameraResult<()>;
}
Expand description

A device handle may keep native thread-affine objects inside its own worker. Calls are serialized by the framework and never occur on the per-frame path.

Required Methods§

Source

fn capabilities(&self) -> CameraResult<DeviceCapabilities>

Returns capture modes and controls supported by this device.

Source

fn start(&mut self, sink: FrameSink, plan: &CapturePlan) -> CameraResult<()>

Starts native capture and publishes frames into the supplied bounded sink.

Source

fn stop(&mut self) -> CameraResult<()>

Stops native capture and releases streaming resources.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§