Struct crabgrab::capture_stream::CaptureStream

source ·
pub struct CaptureStream { /* private fields */ }
Expand description

Represents an active capture stream

Implementations§

source§

impl CaptureStream

source

pub fn test_access(borderless: bool) -> Option<CaptureAccessToken>

Test whether the calling application has permission to capture content

source

pub async fn request_access(borderless: bool) -> Option<CaptureAccessToken>

Prompt the user for permission to capture content

source

pub fn supported_pixel_formats() -> &'static [CapturePixelFormat]

Gets the implementation’s supported pixel formats

source

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

source

pub fn stop(&mut self) -> Result<(), StreamStopError>

Stop the capture

Trait Implementations§

source§

impl MetalCaptureStreamExt for CaptureStream

source§

fn get_metal_device(&self) -> Device

Get the metal device used for frame capture
source§

impl WgpuCaptureStreamExt for CaptureStream

source§

fn get_wgpu_device(&self) -> Option<&Device>

Gets the Wgpu device referenced by device wrapper supplied to CaptureConfig::with_wgpu_device(..)
source§

fn get_wgpu_device_wrapper( &self ) -> Option<Arc<dyn AsRef<Device> + Send + Sync + 'static>>

Gets the Wgpu device wrapper supplied to CaptureConfig::with_wgpu_device(..)
source§

impl Send for CaptureStream

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> AutoreleaseSafe for T
where T: ?Sized,

§

impl<T> WasmNotSend for T
where T: Send,