Struct windows_capture::capture::CaptureControl
source ยท pub struct CaptureControl<T: GraphicsCaptureApiHandler + Send + 'static + ?Sized, E> { /* private fields */ }Expand description
Used to control the capture session
Implementationsยง
sourceยงimpl<T: GraphicsCaptureApiHandler + Send + 'static, E> CaptureControl<T, E>
impl<T: GraphicsCaptureApiHandler + Send + 'static, E> CaptureControl<T, E>
sourcepub fn new(
thread_handle: JoinHandle<Result<(), GraphicsCaptureApiError<E>>>,
halt_handle: Arc<AtomicBool>,
callback: Arc<Mutex<T>>
) -> Self
pub fn new( thread_handle: JoinHandle<Result<(), GraphicsCaptureApiError<E>>>, halt_handle: Arc<AtomicBool>, callback: Arc<Mutex<T>> ) -> Self
Creates a new Capture Control struct.
ยงArguments
thread_handle- The join handle for the capture thread.halt_handle- The atomic boolean used to pause the capture thread.callback- The mutex-protected callback struct used to call struct methods directly.
ยงReturns
The newly created CaptureControl struct.
sourcepub fn is_finished(&self) -> bool
pub fn is_finished(&self) -> bool
Checks to see if the capture thread is finished.
ยงReturns
true if the capture thread is finished, false otherwise.
sourcepub fn into_thread_handle(
self
) -> JoinHandle<Result<(), GraphicsCaptureApiError<E>>>
pub fn into_thread_handle( self ) -> JoinHandle<Result<(), GraphicsCaptureApiError<E>>>
sourcepub fn halt_handle(&self) -> Arc<AtomicBool>
pub fn halt_handle(&self) -> Arc<AtomicBool>
Gets the halt handle used to pause the capture thread.
ยงReturns
The halt handle used to pause the capture thread.
sourcepub fn callback(&self) -> Arc<Mutex<T>>
pub fn callback(&self) -> Arc<Mutex<T>>
Gets the callback struct used to call struct methods directly.
ยงReturns
The callback struct used to call struct methods directly.
Auto Trait Implementationsยง
impl<T, E> Freeze for CaptureControl<T, E>
impl<T, E> !RefUnwindSafe for CaptureControl<T, E>
impl<T, E> Send for CaptureControl<T, E>
impl<T, E> Sync for CaptureControl<T, E>
impl<T, E> Unpin for CaptureControl<T, E>
impl<T, E> !UnwindSafe for CaptureControl<T, E>
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