Realm

oa::vision::CameraCapture

Stateful camera capture session over SDL’s camera backend. poll acquires the newest queued frame, uploads it into an owned RGBA8 texture, and returns it as a VideoFrame; the SDL surface is released immediately, so no ring-slot release contract exists on this route. The returned frame’s presentation timestamp is the camera’s hardware capture timestamp in microseconds and its duration follows the negotiated frame rate.

StRust public API

Declaration

pub struct CameraCapture { /* private fields */ }
Public Rust declaration.

Public Methods

pub fn poll(&mut self) -> Result<Option<VideoFrame>>
pub fn close(&mut self)
pub const fn is_streaming(&self) -> bool
pub const fn width(&self) -> u32
pub const fn height(&self) -> u32
pub fn frame_rate(&self) -> f64
fn drop(&mut self)

Associated Functions

pub fn open(engine: &Engine, config: &CameraCaptureConfig) -> Result<Self>

Public Method Documentation

pub fn poll( &mut self ) -> Result<Option<VideoFrame>>
No public source comment is attached to this declaration.
pub fn close( &mut self )
No public source comment is attached to this declaration.
pub const fn is_streaming( &self ) -> bool
No public source comment is attached to this declaration.
pub const fn width( &self ) -> u32
No public source comment is attached to this declaration.
pub const fn height( &self ) -> u32
No public source comment is attached to this declaration.
pub fn frame_rate( &self ) -> f64
No public source comment is attached to this declaration.
fn drop( &mut self )
No public source comment is attached to this declaration.
pub fn open( engine: &Engine, config: &CameraCaptureConfig ) -> Result<Self>
No public source comment is attached to this declaration.