Struct crabgrab::capture_stream::CaptureConfig
source · pub struct CaptureConfig { /* private fields */ }
Expand description
Configuration settings for a capture stream
Implementations§
source§impl CaptureConfig
impl CaptureConfig
sourcepub fn with_window(
window: CapturableWindow,
pixel_format: CapturePixelFormat
) -> Result<CaptureConfig, CaptureConfigError>
pub fn with_window( window: CapturableWindow, pixel_format: CapturePixelFormat ) -> Result<CaptureConfig, CaptureConfigError>
Create a capture configuration for a given capturable window
sourcepub fn with_display(
display: CapturableDisplay,
pixel_format: CapturePixelFormat
) -> CaptureConfig
pub fn with_display( display: CapturableDisplay, pixel_format: CapturePixelFormat ) -> CaptureConfig
Create a capture configuration for a given capturable display
sourcepub fn with_buffer_count(self, buffer_count: usize) -> Self
pub fn with_buffer_count(self, buffer_count: usize) -> Self
Configure the buffer count - the number of frames in the capture queue.
Higher numbers mean higher latency, but smoother performance
sourcepub fn with_show_cursor(self, show_cursor: bool) -> Self
pub fn with_show_cursor(self, show_cursor: bool) -> Self
Configure whether the cursor is visible in the capture
sourcepub fn with_output_size(self, output_size: Size) -> Self
pub fn with_output_size(self, output_size: Size) -> Self
Configure the output texture size - by default, this will match the captured content at the time of enumeration
Trait Implementations§
source§impl Clone for CaptureConfig
impl Clone for CaptureConfig
source§fn clone(&self) -> CaptureConfig
fn clone(&self) -> CaptureConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CaptureConfig
impl Debug for CaptureConfig
source§impl WgpuCaptureConfigExt for CaptureConfig
impl WgpuCaptureConfigExt for CaptureConfig
source§impl WindowsCaptureConfigExt for CaptureConfig
impl WindowsCaptureConfigExt for CaptureConfig
fn with_dxgi_adapter(self, dxgi_adapter: IDXGIAdapter) -> Self
fn with_d3d11_device(self, d3d11_device: ID3D11Device) -> Self
fn with_borderless(self, borderless: bool) -> Self
Auto Trait Implementations§
impl Freeze for CaptureConfig
impl !RefUnwindSafe for CaptureConfig
impl Send for CaptureConfig
impl Sync for CaptureConfig
impl Unpin for CaptureConfig
impl !UnwindSafe for CaptureConfig
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