pub struct CaptureControl<T: GraphicsCaptureApiHandler + Send + 'static, 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 const fn new(
thread_handle: JoinHandle<Result<(), GraphicsCaptureApiError<E>>>,
halt_handle: Arc<AtomicBool>,
callback: Arc<Mutex<T>>,
) -> Self
pub const 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