pub trait GraphicsCaptureApiHandler: Sized {
type Flags;
type Error: Send + Sync;
// Required methods
fn new(flags: Self::Flags) -> Result<Self, Self::Error>;
fn on_frame_arrived(
&mut self,
frame: &mut Frame<'_>,
capture_control: InternalCaptureControl
) -> Result<(), Self::Error>;
// Provided methods
fn start<T: TryInto<GraphicsCaptureItem>>(
settings: Settings<Self::Flags, T>
) -> Result<(), GraphicsCaptureApiError<Self::Error>>
where Self: Send + 'static,
<Self as GraphicsCaptureApiHandler>::Flags: Send { ... }
fn start_free_threaded<T: TryInto<GraphicsCaptureItem> + Send + 'static>(
settings: Settings<Self::Flags, T>
) -> Result<CaptureControl<Self, Self::Error>, GraphicsCaptureApiError<Self::Error>>
where Self: Send + 'static,
<Self as GraphicsCaptureApiHandler>::Flags: Send { ... }
fn on_closed(&mut self) -> Result<(), Self::Error> { ... }
}
Expand description
A trait representing a graphics capture handler.
Required Associated Types§
Required Methods§
sourcefn on_frame_arrived(
&mut self,
frame: &mut Frame<'_>,
capture_control: InternalCaptureControl
) -> Result<(), Self::Error>
fn on_frame_arrived( &mut self, frame: &mut Frame<'_>, capture_control: InternalCaptureControl ) -> Result<(), Self::Error>
Provided Methods§
sourcefn start<T: TryInto<GraphicsCaptureItem>>(
settings: Settings<Self::Flags, T>
) -> Result<(), GraphicsCaptureApiError<Self::Error>>
fn start<T: TryInto<GraphicsCaptureItem>>( settings: Settings<Self::Flags, T> ) -> Result<(), GraphicsCaptureApiError<Self::Error>>
sourcefn start_free_threaded<T: TryInto<GraphicsCaptureItem> + Send + 'static>(
settings: Settings<Self::Flags, T>
) -> Result<CaptureControl<Self, Self::Error>, GraphicsCaptureApiError<Self::Error>>
fn start_free_threaded<T: TryInto<GraphicsCaptureItem> + Send + 'static>( settings: Settings<Self::Flags, T> ) -> Result<CaptureControl<Self, Self::Error>, GraphicsCaptureApiError<Self::Error>>
Object Safety§
This trait is not object safe.