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 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(..)
source§impl WindowsDx11CaptureStream for CaptureStream
impl WindowsDx11CaptureStream for CaptureStream
source§fn get_dx11_device(&self) -> ID3D11Device
fn get_dx11_device(&self) -> ID3D11Device
Get the underlying DX11 device used for frame capture
source§impl WindowsDxgiCaptureStream for CaptureStream
impl WindowsDxgiCaptureStream for CaptureStream
source§fn get_dxgi_adapter(
&self
) -> Result<IDXGIAdapter, WindowsDxgiCaptureStreamError>
fn get_dxgi_adapter( &self ) -> Result<IDXGIAdapter, WindowsDxgiCaptureStreamError>
Get the DXGI adapter used by the capture stream for frame generation
source§fn get_dxgi_device(&self) -> IDXGIDevice
fn get_dxgi_device(&self) -> IDXGIDevice
Get the DXGI device used by the capture stream for frame generation
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