Trait vidi::pipelines::CameraImpl
source · pub trait CameraImpl: Send + Sync {
// Required methods
fn configure(&self, config: Config) -> Result<(), Error>;
fn video_capture_device(&self) -> &Device;
// Provided methods
fn start(&self, buffer_count: usize) -> Result<Stream, Error> { ... }
fn stream_manual(&self, buffer_count: usize) -> Result<StreamManual, Error> { ... }
}
Expand description
An exclusive handle to a mutable camera resource.
This is the main trait to fill in by camera vendors, defining all the low-level operations on the camera apart from acquiring.
Types implementing this impl are required to hold a system-wide exclusive lock over the hardware resource for as long as the instance exists. See ::util::flock::Locked
.
TODO: stop streaming when dropped? This is internal API, so maybe the owner type already takes care of stopping.
Required Methods§
sourcefn configure(&self, config: Config) -> Result<(), Error>
fn configure(&self, config: Config) -> Result<(), Error>
Set configuration (TODO: the Config is nearly useless now)
sourcefn video_capture_device(&self) -> &Device
fn video_capture_device(&self) -> &Device
Return the video capture device. Private interface
Provided Methods§
sourcefn stream_manual(&self, buffer_count: usize) -> Result<StreamManual, Error>
fn stream_manual(&self, buffer_count: usize) -> Result<StreamManual, Error>
Create a stream with manual buffer control.