pub struct CameraClient { /* private fields */ }Expand description
ctx.camera — path-level claim/release, a frame-pull primitive, and the
exposure and gain of cameras the vision engine owns.
Implementations§
Source§impl CameraClient
impl CameraClient
Sourcepub async fn claim(
&self,
device_path: &str,
exclusive: bool,
) -> Result<Value, ClientError>
pub async fn claim( &self, device_path: &str, exclusive: bool, ) -> Result<Value, ClientError>
Claim a /dev/videoN path. A second exclusive claim on the same path is
refused before any V4L2 handle is opened.
Sourcepub async fn release(&self, device_path: &str) -> Result<Value, ClientError>
pub async fn release(&self, device_path: &str) -> Result<Value, ClientError>
Release a claimed camera path.
Sourcepub async fn get_frame(
&self,
device_path: &str,
format: &str,
timeout_ms: i64,
) -> Result<Value, ClientError>
pub async fn get_frame( &self, device_path: &str, format: &str, timeout_ms: i64, ) -> Result<Value, ClientError>
Pull the latest captured frame. The result map carries frame_id,
width, height, format, data, ts_ns, stale. Repeated stale
frames signal a stalled capture pipeline.
Sourcepub async fn set_controls(
&self,
req: &CameraControlRequest,
) -> Result<CameraControlResult, ClientError>
pub async fn set_controls( &self, req: &CameraControlRequest, ) -> Result<CameraControlResult, ClientError>
Set exposure, gain or auto exposure on the engine-owned camera
req.camera_id and return the values it reads back. Needs
camera.control.write. See PluginIpcClient::camera_set_controls.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CameraClient
impl !UnwindSafe for CameraClient
impl Freeze for CameraClient
impl Send for CameraClient
impl Sync for CameraClient
impl Unpin for CameraClient
impl UnsafeUnpin for CameraClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more