#[repr(C)]pub struct ScreenCaptureWidget {
pub config: ScreenCaptureConfig,
pub on_frame: OptionOnVideoFrame,
}Expand description
A screen-capture widget. create(config).dom() yields an <img> the
capture thread keeps fed.
Fields§
§config: ScreenCaptureConfigWhat to capture + fps + format.
on_frame: OptionOnVideoFrameOptional per-frame user hook (effects / save / send - azul-meet).
Implementations§
Source§impl ScreenCaptureWidget
impl ScreenCaptureWidget
Sourcepub fn create(config: ScreenCaptureConfig) -> Self
pub fn create(config: ScreenCaptureConfig) -> Self
Create a screencap widget for the given config.
Sourcepub fn set_on_frame<C: Into<OnVideoFrameCallback>>(
&mut self,
data: RefAny,
on_frame: C,
)
pub fn set_on_frame<C: Into<OnVideoFrameCallback>>( &mut self, data: RefAny, on_frame: C, )
Set a hook invoked with every captured frame - for live effects, saving
frames into your data model, or sending them over the network
(azul-meet). The backreference DI pattern (see architecture.md).
Sourcepub fn with_on_frame<C: Into<OnVideoFrameCallback>>(
self,
data: RefAny,
on_frame: C,
) -> Self
pub fn with_on_frame<C: Into<OnVideoFrameCallback>>( self, data: RefAny, on_frame: C, ) -> Self
Builder form of set_on_frame.
Auto Trait Implementations§
impl Freeze for ScreenCaptureWidget
impl RefUnwindSafe for ScreenCaptureWidget
impl Send for ScreenCaptureWidget
impl Sync for ScreenCaptureWidget
impl Unpin for ScreenCaptureWidget
impl UnsafeUnpin for ScreenCaptureWidget
impl UnwindSafe for ScreenCaptureWidget
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