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 MacosCaptureConfigExt for CaptureConfig
impl MacosCaptureConfigExt for CaptureConfig
source§fn with_scale_to_fit(self, scale_to_fit: bool) -> Self
fn with_scale_to_fit(self, scale_to_fit: bool) -> Self
Set whether or not to scale content to the output size
source§fn with_maximum_fps(self, maximum_fps: Option<f32>) -> Self
fn with_maximum_fps(self, maximum_fps: Option<f32>) -> Self
Set the maximum capture frame-rate
source§fn with_metal_device(self, metal_device: Device) -> Self
fn with_metal_device(self, metal_device: Device) -> Self
Set the metal device to use for texture creation
source§fn with_resolution_type(
self,
resolution_type: MacosCaptureResolutionType
) -> Self
fn with_resolution_type( self, resolution_type: MacosCaptureResolutionType ) -> Self
Set the resolution type of the capture. Does nothing on macos before OS 14.0
source§impl WgpuCaptureConfigExt for CaptureConfig
impl WgpuCaptureConfigExt for CaptureConfig
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