Struct crabgrab::capture_stream::CaptureStream
source · pub struct CaptureStream { /* private fields */ }
Expand description
Represents an active capture stream
Implementations§
source§impl CaptureStream
impl CaptureStream
sourcepub fn test_access(borderless: bool) -> Option<CaptureAccessToken>
pub fn test_access(borderless: bool) -> Option<CaptureAccessToken>
Test whether the calling application has permission to capture content
sourcepub async fn request_access(borderless: bool) -> Option<CaptureAccessToken>
pub async fn request_access(borderless: bool) -> Option<CaptureAccessToken>
Prompt the user for permission to capture content
sourcepub fn supported_pixel_formats() -> &'static [CapturePixelFormat]
pub fn supported_pixel_formats() -> &'static [CapturePixelFormat]
Gets the implementation’s supported pixel formats
sourcepub fn new(
token: CaptureAccessToken,
config: CaptureConfig,
callback: impl FnMut(Result<StreamEvent, StreamError>) + Send + 'static
) -> Result<Self, StreamCreateError>
pub fn new( token: CaptureAccessToken, config: CaptureConfig, callback: impl FnMut(Result<StreamEvent, StreamError>) + Send + 'static ) -> Result<Self, StreamCreateError>
Start a new capture stream with the given stream callback
sourcepub fn stop(&mut self) -> Result<(), StreamStopError>
pub fn stop(&mut self) -> Result<(), StreamStopError>
Stop the capture
Trait Implementations§
source§impl MetalCaptureStreamExt for CaptureStream
impl MetalCaptureStreamExt for CaptureStream
source§fn get_metal_device(&self) -> Device
fn get_metal_device(&self) -> Device
Get the metal device used for frame capture
source§impl WgpuCaptureStreamExt for CaptureStream
impl WgpuCaptureStreamExt for CaptureStream
source§fn get_wgpu_device(&self) -> Option<&Device>
fn get_wgpu_device(&self) -> Option<&Device>
Gets the Wgpu device referenced by device wrapper supplied to
CaptureConfig::with_wgpu_device(..)
impl Send for CaptureStream
Auto Trait Implementations§
impl Freeze for CaptureStream
impl !RefUnwindSafe for CaptureStream
impl !Sync for CaptureStream
impl Unpin for CaptureStream
impl !UnwindSafe for CaptureStream
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