pub struct CaptureControls {
pub(crate) stop_flag: AtomicBool,
pub(crate) pause_flag: AtomicBool,
pub(crate) target_fps: AtomicU64,
}
Expand description
Controls for the capture, allows you to pause/resume processing
Fields§
§stop_flag: AtomicBool
§pause_flag: AtomicBool
§target_fps: AtomicU64
Implementations§
Source§impl CaptureControls
impl CaptureControls
pub(crate) fn from_fps(target_fps: u64) -> Self
Sourcepub fn skip_processing(&self) -> bool
pub fn skip_processing(&self) -> bool
True when stopped or paused
Sourcepub fn is_stopped(&self) -> bool
pub fn is_stopped(&self) -> bool
Check if processing is currently stopped
Sourcepub fn stop(&self)
pub fn stop(&self)
Stop processing
This is final, use CaptureControls::pause
if you want to resume later.
Sourcepub fn frame_interval_ns(&self) -> u64
pub fn frame_interval_ns(&self) -> u64
Frame interval in nanoseconds
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for CaptureControls
impl RefUnwindSafe for CaptureControls
impl Send for CaptureControls
impl Sync for CaptureControls
impl Unpin for CaptureControls
impl UnwindSafe for CaptureControls
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more