From 38f5f51fd60fb2c3f5153222e9bbc5d59043c52b Mon Sep 17 00:00:00 2001 From: liam Date: Fri, 17 May 2024 15:40:43 -0700 Subject: [PATCH 1/7] macos content_rect() impl --- src/frame.rs | 5 +++++ src/platform/macos/frame.rs | 28 ++++++++++++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/frame.rs b/src/frame.rs index c1b59164..3885c2e2 100644 --- a/src/frame.rs +++ b/src/frame.rs @@ -120,6 +120,7 @@ pub(crate) trait VideoCaptureFrame { fn origin_time(&self) -> Duration; fn capture_time(&self) -> Instant; fn frame_id(&self) -> u64; + fn content_rect(&self) -> Rect; } /// A frame of captured video @@ -159,6 +160,10 @@ impl VideoFrame { pub fn dpi(&self) -> f64 { self.impl_video_frame.dpi() } + + pub fn content_rect(&self) -> Rect { + self.impl_video_frame.content_rect() + } } impl Debug for VideoFrame { diff --git a/src/platform/macos/frame.rs b/src/platform/macos/frame.rs index 1f231845..56d3fc98 100644 --- a/src/platform/macos/frame.rs +++ b/src/platform/macos/frame.rs @@ -2,9 +2,9 @@ use std::{cell::{Ref, RefCell}, marker::PhantomData, sync::Arc, time::{Duration, use objc2::runtime::AnyObject; -use crate::{frame::{AudioCaptureFrame, VideoCaptureFrame}, prelude::{AudioBufferError, AudioChannelCount, AudioChannelData, AudioChannelDataSamples, AudioSampleRate}, util::{Rect, Size}}; +use crate::{frame::{AudioCaptureFrame, VideoCaptureFrame}, prelude::{AudioBufferError, AudioChannelCount, AudioChannelData, AudioChannelDataSamples, AudioSampleRate, Point}, util::{Rect, Size}}; -use super::objc_wrap::{kAudioFormatFlagIsBigEndian, kAudioFormatFlagIsPacked, kAudioFormatFlagsCanonical, kAudioFormatNativeEndian, AVAudioFormat, AVAudioPCMBuffer, AudioBufferList, AudioStreamBasicDescription, CFDictionary, CGRect, CGRectMakeWithDictionaryRepresentation, CMBlockBuffer, CMSampleBuffer, IOSurface, NSDictionary, NSNumber, NSScreen, SCStreamFrameInfoScaleFactor, SCStreamFrameInfoScreenRect}; +use super::objc_wrap::{kAudioFormatFlagIsBigEndian, kAudioFormatFlagIsPacked, kAudioFormatFlagsCanonical, kAudioFormatNativeEndian, AVAudioFormat, AVAudioPCMBuffer, AudioBufferList, AudioStreamBasicDescription, CFDictionary, CGRect, CGRectMakeWithDictionaryRepresentation, CMBlockBuffer, CMSampleBuffer, IOSurface, NSDictionary, NSNumber, NSScreen, SCStreamFrameInfoContentRect, SCStreamFrameInfoScaleFactor, SCStreamFrameInfoScreenRect}; pub(crate) struct MacosSCStreamVideoFrame { pub(crate) sample_buffer: CMSampleBuffer, @@ -112,6 +112,30 @@ impl VideoCaptureFrame for MacosVideoFrame { MacosVideoFrame::CGDisplayStream(cgd_frame) => cgd_frame.frame_id } } + + fn content_rect(&self) -> Rect { + match self { + MacosVideoFrame::SCStream(sc_frame) => { + let info_dict = sc_frame.get_info_dict(); + let content_rect_ptr = unsafe { info_dict.get_value(SCStreamFrameInfoContentRect) }; + let content_rect_dict = unsafe { NSDictionary::from_id_unretained(content_rect_ptr as *mut AnyObject) }; + let frame_content_rect = unsafe { CGRect::create_from_dictionary_representation(&content_rect_dict) }; + Rect { + origin: Point { + x: frame_content_rect.origin.x, + y: frame_content_rect.origin.y, + }, + size: Size { + width: frame_content_rect.size.x, + height: frame_content_rect.origin.y + } + } + }, + MacosVideoFrame::CGDisplayStream(sc_fame) => { + todo!() + } + } + } } pub struct MacosAudioFrame { From b7f988c7c66404b7065491663d342e8afe5f84dd Mon Sep 17 00:00:00 2001 From: liam Date: Fri, 17 May 2024 15:41:32 -0700 Subject: [PATCH 2/7] doc content_rect() --- src/frame.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frame.rs b/src/frame.rs index 3885c2e2..bae65b1b 100644 --- a/src/frame.rs +++ b/src/frame.rs @@ -161,6 +161,7 @@ impl VideoFrame { self.impl_video_frame.dpi() } + /// Get the rectangle of the frame representing containing the captured contents pub fn content_rect(&self) -> Rect { self.impl_video_frame.content_rect() } From 2707c7584554ba6ef847ffe63d2bd85aaf6bc381 Mon Sep 17 00:00:00 2001 From: liam Date: Fri, 17 May 2024 15:42:41 -0700 Subject: [PATCH 3/7] impl content_rect() windows --- src/platform/windows/frame.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/platform/windows/frame.rs b/src/platform/windows/frame.rs index e4f46ae1..0e79aed5 100644 --- a/src/platform/windows/frame.rs +++ b/src/platform/windows/frame.rs @@ -2,7 +2,7 @@ use std::{marker::PhantomData, sync::Arc, time::Duration}; use windows::{Graphics::{Capture::Direct3D11CaptureFrame, DirectX::DirectXPixelFormat, SizeInt32}, Win32::Graphics::Direct3D11::ID3D11Device}; -use crate::{prelude::{AudioBufferError, AudioCaptureFrame, AudioChannelCount, AudioChannelDataSamples, AudioSampleRate, VideoCaptureFrame}, util::Size}; +use crate::{prelude::{AudioBufferError, AudioCaptureFrame, AudioChannelCount, AudioChannelDataSamples, AudioSampleRate, Point, Rect, VideoCaptureFrame}, util::Size}; pub struct WindowsVideoFrame { pub(crate) device : ID3D11Device, @@ -46,6 +46,13 @@ impl VideoCaptureFrame for WindowsVideoFrame { fn frame_id(&self) -> u64 { self.frame_id } + + fn content_rect(&self) -> Rect { + Rect { + origin: Point::ZERO, + size: self.size() + } + } } pub struct WindowsAudioFrame { From 89fc1ad14327ea1d4606e65298a7423287efc5c7 Mon Sep 17 00:00:00 2001 From: liam Date: Fri, 17 May 2024 15:43:40 -0700 Subject: [PATCH 4/7] bump version and rebuild windows docs --- Cargo.toml | 2 +- docs/windows_docs/crabgrab/all.html | 2 +- .../enum.CapturableContentError.html | 4 ++-- .../crabgrab/capturable_content/index.html | 2 +- .../struct.CapturableApplication.html | 2 +- .../struct.CapturableContent.html | 2 +- .../struct.CapturableContentFilter.html | 2 +- .../struct.CapturableDisplay.html | 2 +- .../struct.CapturableDisplayIterator.html | 2 +- .../struct.CapturableWindow.html | 2 +- .../struct.CapturableWindowFilter.html | 2 +- .../struct.CapturableWindowIterator.html | 2 +- .../enum.CaptureConfigError.html | 4 ++-- .../enum.CapturePixelFormat.html | 2 +- .../enum.StreamCreateError.html | 4 ++-- .../capture_stream/enum.StreamError.html | 4 ++-- .../capture_stream/enum.StreamEvent.html | 2 +- .../capture_stream/enum.StreamStopError.html | 2 +- .../crabgrab/capture_stream/index.html | 2 +- .../struct.AudioCaptureConfig.html | 2 +- .../struct.CaptureAccessToken.html | 2 +- .../capture_stream/struct.CaptureConfig.html | 2 +- .../capture_stream/struct.CaptureStream.html | 2 +- .../feature/bitmap/enum.FrameBitmap.html | 2 +- .../bitmap/enum.VideoFrameBitmapError.html | 4 ++-- .../feature/bitmap/enum.VideoRange.html | 2 +- .../crabgrab/feature/bitmap/index.html | 2 +- .../struct.FrameBitmapBgraUnorm8x4.html | 2 +- .../bitmap/struct.FrameBitmapRgbaF16x4.html | 2 +- ...uct.FrameBitmapRgbaUnormPacked1010102.html | 2 +- .../bitmap/struct.FrameBitmapYCbCr.html | 2 +- .../bitmap/trait.VideoFrameBitmap.html | 2 +- .../dx11/enum.WindowsDx11VideoFrameError.html | 2 +- .../crabgrab/feature/dx11/index.html | 2 +- .../dx11/trait.WindowsDx11CaptureStream.html | 2 +- .../dx11/trait.WindowsDx11VideoFrame.html | 2 +- .../enum.WindowsDxgiCaptureStreamError.html | 2 +- .../dxgi/enum.WindowsDxgiVideoFrameError.html | 4 ++-- .../crabgrab/feature/dxgi/index.html | 2 +- .../dxgi/trait.WindowsDxgiCaptureStream.html | 2 +- .../dxgi/trait.WindowsDxgiVideoFrame.html | 2 +- docs/windows_docs/crabgrab/feature/index.html | 2 +- .../screenshot/enum.ScreenshotError.html | 4 ++-- .../screenshot/fn.take_screenshot.html | 2 +- .../crabgrab/feature/screenshot/index.html | 2 +- .../wgpu/enum.WgpuVideoFrameError.html | 4 ++-- .../wgpu/enum.WgpuVideoFramePlaneTexture.html | 2 +- .../crabgrab/feature/wgpu/index.html | 2 +- .../wgpu/trait.WgpuCaptureConfigExt.html | 2 +- .../wgpu/trait.WgpuCaptureStreamExt.html | 2 +- .../feature/wgpu/trait.WgpuVideoFrameExt.html | 2 +- .../crabgrab/frame/enum.AudioBufferError.html | 2 +- .../frame/enum.AudioChannelCount.html | 2 +- .../crabgrab/frame/enum.AudioChannelData.html | 2 +- .../crabgrab/frame/enum.AudioSampleRate.html | 2 +- docs/windows_docs/crabgrab/frame/index.html | 4 ++-- .../frame/struct.AudioChannelDataSamples.html | 2 +- .../crabgrab/frame/struct.AudioFrame.html | 2 +- .../crabgrab/frame/struct.VideoFrame.html | 19 ++++++++++--------- docs/windows_docs/crabgrab/index.html | 2 +- .../windows_docs/crabgrab/platform/index.html | 2 +- .../crabgrab/platform/windows/index.html | 2 +- .../platform/windows/struct.HWND.html | 2 +- ...ait.WindowsCapturableContentFilterExt.html | 2 +- .../trait.WindowsCapturableWindowExt.html | 2 +- .../trait.WindowsCaptureConfigExt.html | 2 +- docs/windows_docs/crabgrab/prelude/index.html | 2 +- docs/windows_docs/crabgrab/util/index.html | 2 +- .../crabgrab/util/struct.Point.html | 2 +- .../crabgrab/util/struct.Rect.html | 2 +- .../crabgrab/util/struct.Size.html | 2 +- docs/windows_docs/search-index.js | 2 +- docs/windows_docs/src/crabgrab/frame.rs.html | 12 ++++++++++++ .../crabgrab/platform/windows/frame.rs.html | 16 +++++++++++++++- 74 files changed, 117 insertions(+), 90 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index da11b311..d2556746 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "crabgrab" description = "A cross-platform screen/window capture crate" -version = "0.3.2" +version = "0.3.3" edition = "2021" authors = ["Augmend, Inc. ", "Liam Taylor ", "Tim Misiak "] documentation = "https://docs.rs/crabgrab" diff --git a/docs/windows_docs/crabgrab/all.html b/docs/windows_docs/crabgrab/all.html index 697d3fd5..35f50b6a 100644 --- a/docs/windows_docs/crabgrab/all.html +++ b/docs/windows_docs/crabgrab/all.html @@ -1,2 +1,2 @@ -List of all items in this crate +List of all items in this crate

List of all items

Structs

Enums

Traits

Functions

\ No newline at end of file diff --git a/docs/windows_docs/crabgrab/capturable_content/enum.CapturableContentError.html b/docs/windows_docs/crabgrab/capturable_content/enum.CapturableContentError.html index a624d62b..522118a4 100644 --- a/docs/windows_docs/crabgrab/capturable_content/enum.CapturableContentError.html +++ b/docs/windows_docs/crabgrab/capturable_content/enum.CapturableContentError.html @@ -1,8 +1,8 @@ -CapturableContentError in crabgrab::capturable_content - Rust +CapturableContentError in crabgrab::capturable_content - Rust
pub enum CapturableContentError {
     Other(String),
 }
Expand description

Represents an error that occurred when enumerating capturable content

-

Variants§

§

Other(String)

Trait Implementations§

source§

impl Clone for CapturableContentError

source§

fn clone(&self) -> CapturableContentError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CapturableContentError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for CapturableContentError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for CapturableContentError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Variants§

§

Other(String)

Trait Implementations§

source§

impl Clone for CapturableContentError

source§

fn clone(&self) -> CapturableContentError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CapturableContentError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for CapturableContentError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for CapturableContentError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

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.

diff --git a/docs/windows_docs/crabgrab/capturable_content/index.html b/docs/windows_docs/crabgrab/capturable_content/index.html index 8a4960a5..c8268bf9 100644 --- a/docs/windows_docs/crabgrab/capturable_content/index.html +++ b/docs/windows_docs/crabgrab/capturable_content/index.html @@ -1,3 +1,3 @@ -crabgrab::capturable_content - Rust +crabgrab::capturable_content - Rust
Expand description

Enumeration of capturable items

Structs§

Enums§

\ No newline at end of file diff --git a/docs/windows_docs/crabgrab/capturable_content/struct.CapturableApplication.html b/docs/windows_docs/crabgrab/capturable_content/struct.CapturableApplication.html index c8689625..fe2f9472 100644 --- a/docs/windows_docs/crabgrab/capturable_content/struct.CapturableApplication.html +++ b/docs/windows_docs/crabgrab/capturable_content/struct.CapturableApplication.html @@ -1,4 +1,4 @@ -CapturableApplication in crabgrab::capturable_content - Rust +CapturableApplication in crabgrab::capturable_content - Rust
pub struct CapturableApplication { /* private fields */ }
Expand description

Represents an application with capturable windows

Implementations§

source§

impl CapturableApplication

source

pub fn identifier(&self) -> String

Gets the “identifier” of the application

On MacOS, this is the application bundle, and on windows, this is the application file name

diff --git a/docs/windows_docs/crabgrab/capturable_content/struct.CapturableContent.html b/docs/windows_docs/crabgrab/capturable_content/struct.CapturableContent.html index 18f9c4ff..5f6b2066 100644 --- a/docs/windows_docs/crabgrab/capturable_content/struct.CapturableContent.html +++ b/docs/windows_docs/crabgrab/capturable_content/struct.CapturableContent.html @@ -1,4 +1,4 @@ -CapturableContent in crabgrab::capturable_content - Rust +CapturableContent in crabgrab::capturable_content - Rust
pub struct CapturableContent { /* private fields */ }
Expand description

A collection of capturable content (windows, screens)

Implementations§

source§

impl CapturableContent

source

pub async fn new( filter: CapturableContentFilter diff --git a/docs/windows_docs/crabgrab/capturable_content/struct.CapturableContentFilter.html b/docs/windows_docs/crabgrab/capturable_content/struct.CapturableContentFilter.html index 06186895..7db6b474 100644 --- a/docs/windows_docs/crabgrab/capturable_content/struct.CapturableContentFilter.html +++ b/docs/windows_docs/crabgrab/capturable_content/struct.CapturableContentFilter.html @@ -1,4 +1,4 @@ -CapturableContentFilter in crabgrab::capturable_content - Rust +CapturableContentFilter in crabgrab::capturable_content - Rust
pub struct CapturableContentFilter { /* private fields */ }
Expand description

Selects the kind of capturable content to enumerate

Implementations§

source§

impl CapturableContentFilter

source

pub fn new(displays: bool, windows: Option<CapturableWindowFilter>) -> Self

Create a new content filter with the given filtering options

source

pub fn is_empty(&self) -> bool

Whether this filter allows any capturable content

diff --git a/docs/windows_docs/crabgrab/capturable_content/struct.CapturableDisplay.html b/docs/windows_docs/crabgrab/capturable_content/struct.CapturableDisplay.html index e120c72a..e2a0189c 100644 --- a/docs/windows_docs/crabgrab/capturable_content/struct.CapturableDisplay.html +++ b/docs/windows_docs/crabgrab/capturable_content/struct.CapturableDisplay.html @@ -1,4 +1,4 @@ -CapturableDisplay in crabgrab::capturable_content - Rust +CapturableDisplay in crabgrab::capturable_content - Rust
pub struct CapturableDisplay { /* private fields */ }
Expand description

Represents a capturable display

Implementations§

source§

impl CapturableDisplay

source

pub fn rect(&self) -> Rect

Gets the virtual screen rectangle of this display

Note: Currently on windows, this is only evaluated at the time of display enumeration

diff --git a/docs/windows_docs/crabgrab/capturable_content/struct.CapturableDisplayIterator.html b/docs/windows_docs/crabgrab/capturable_content/struct.CapturableDisplayIterator.html index 78027c39..6be86474 100644 --- a/docs/windows_docs/crabgrab/capturable_content/struct.CapturableDisplayIterator.html +++ b/docs/windows_docs/crabgrab/capturable_content/struct.CapturableDisplayIterator.html @@ -1,4 +1,4 @@ -CapturableDisplayIterator in crabgrab::capturable_content - Rust +CapturableDisplayIterator in crabgrab::capturable_content - Rust
pub struct CapturableDisplayIterator<'content> { /* private fields */ }
Expand description

An iterator over capturable displays

Trait Implementations§

source§

impl ExactSizeIterator for CapturableDisplayIterator<'_>

source§

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
source§

fn is_empty(&self) -> bool

🔬This is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
source§

impl Iterator for CapturableDisplayIterator<'_>

§

type Item = CapturableDisplay

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
source§

fn next_chunk<const N: usize>( &mut self diff --git a/docs/windows_docs/crabgrab/capturable_content/struct.CapturableWindow.html b/docs/windows_docs/crabgrab/capturable_content/struct.CapturableWindow.html index 6e3abfeb..1834ed66 100644 --- a/docs/windows_docs/crabgrab/capturable_content/struct.CapturableWindow.html +++ b/docs/windows_docs/crabgrab/capturable_content/struct.CapturableWindow.html @@ -1,4 +1,4 @@ -CapturableWindow in crabgrab::capturable_content - Rust +CapturableWindow in crabgrab::capturable_content - Rust
pub struct CapturableWindow { /* private fields */ }
Expand description

Represents a capturable application window

Implementations§

source§

impl CapturableWindow

source

pub fn title(&self) -> String

Gets the title of the window

source

pub fn rect(&self) -> Rect

Gets the virtual screen rectangle of the window

diff --git a/docs/windows_docs/crabgrab/capturable_content/struct.CapturableWindowFilter.html b/docs/windows_docs/crabgrab/capturable_content/struct.CapturableWindowFilter.html index ce27cc37..81be7316 100644 --- a/docs/windows_docs/crabgrab/capturable_content/struct.CapturableWindowFilter.html +++ b/docs/windows_docs/crabgrab/capturable_content/struct.CapturableWindowFilter.html @@ -1,4 +1,4 @@ -CapturableWindowFilter in crabgrab::capturable_content - Rust +CapturableWindowFilter in crabgrab::capturable_content - Rust
pub struct CapturableWindowFilter {
     pub desktop_windows: bool,
     pub onscreen_only: bool,
diff --git a/docs/windows_docs/crabgrab/capturable_content/struct.CapturableWindowIterator.html b/docs/windows_docs/crabgrab/capturable_content/struct.CapturableWindowIterator.html
index 7b7780ad..9c7b73cd 100644
--- a/docs/windows_docs/crabgrab/capturable_content/struct.CapturableWindowIterator.html
+++ b/docs/windows_docs/crabgrab/capturable_content/struct.CapturableWindowIterator.html
@@ -1,4 +1,4 @@
-CapturableWindowIterator in crabgrab::capturable_content - Rust
+CapturableWindowIterator in crabgrab::capturable_content - Rust
     
pub struct CapturableWindowIterator<'content> { /* private fields */ }
Expand description

An iterator over capturable windows

Trait Implementations§

source§

impl ExactSizeIterator for CapturableWindowIterator<'_>

1.0.0 · source§

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
source§

fn is_empty(&self) -> bool

🔬This is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
source§

impl Iterator for CapturableWindowIterator<'_>

§

type Item = CapturableWindow

The type of the elements being iterated over.
source§

fn next(&mut self) -> Option<Self::Item>

Advances the iterator and returns the next value. Read more
source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
source§

fn next_chunk<const N: usize>( &mut self diff --git a/docs/windows_docs/crabgrab/capture_stream/enum.CaptureConfigError.html b/docs/windows_docs/crabgrab/capture_stream/enum.CaptureConfigError.html index 18fad638..fc7ca54d 100644 --- a/docs/windows_docs/crabgrab/capture_stream/enum.CaptureConfigError.html +++ b/docs/windows_docs/crabgrab/capture_stream/enum.CaptureConfigError.html @@ -1,11 +1,11 @@ -CaptureConfigError in crabgrab::capture_stream - Rust +CaptureConfigError in crabgrab::capture_stream - Rust
pub enum CaptureConfigError {
     UnsupportedPixelFormat,
     InvalidBufferCount,
 }
Expand description

Represents an error creating the capture config

Variants§

§

UnsupportedPixelFormat

The pixel format is unsupported by the implementation

§

InvalidBufferCount

The buffer count is out of the valid range for the implementation

-

Trait Implementations§

source§

impl Clone for CaptureConfigError

source§

fn clone(&self) -> CaptureConfigError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CaptureConfigError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for CaptureConfigError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for CaptureConfigError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl Send for CaptureConfigError

source§

impl Sync for CaptureConfigError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

source§

impl Clone for CaptureConfigError

source§

fn clone(&self) -> CaptureConfigError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CaptureConfigError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for CaptureConfigError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for CaptureConfigError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl Send for CaptureConfigError

source§

impl Sync for CaptureConfigError

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.

diff --git a/docs/windows_docs/crabgrab/capture_stream/enum.CapturePixelFormat.html b/docs/windows_docs/crabgrab/capture_stream/enum.CapturePixelFormat.html index aca93f92..f3c20e31 100644 --- a/docs/windows_docs/crabgrab/capture_stream/enum.CapturePixelFormat.html +++ b/docs/windows_docs/crabgrab/capture_stream/enum.CapturePixelFormat.html @@ -1,4 +1,4 @@ -CapturePixelFormat in crabgrab::capture_stream - Rust +CapturePixelFormat in crabgrab::capture_stream - Rust
#[non_exhaustive]
pub enum CapturePixelFormat { Bgra8888, Argb2101010, diff --git a/docs/windows_docs/crabgrab/capture_stream/enum.StreamCreateError.html b/docs/windows_docs/crabgrab/capture_stream/enum.StreamCreateError.html index 7faa3cd1..c563c051 100644 --- a/docs/windows_docs/crabgrab/capture_stream/enum.StreamCreateError.html +++ b/docs/windows_docs/crabgrab/capture_stream/enum.StreamCreateError.html @@ -1,4 +1,4 @@ -StreamCreateError in crabgrab::capture_stream - Rust +StreamCreateError in crabgrab::capture_stream - Rust
pub enum StreamCreateError {
     Other(String),
     UnsupportedPixelFormat,
@@ -6,7 +6,7 @@
 }
Expand description

This represents an error when creating a capture stream

Variants§

§

Other(String)

§

UnsupportedPixelFormat

The supplied pixel format is unsupported by the implementation

§

UnauthorizedFeature(String)

Requested features are not authorized

-

Trait Implementations§

source§

impl Clone for StreamCreateError

source§

fn clone(&self) -> StreamCreateError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StreamCreateError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for StreamCreateError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for StreamCreateError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl Send for StreamCreateError

source§

impl Sync for StreamCreateError

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Trait Implementations§

source§

impl Clone for StreamCreateError

source§

fn clone(&self) -> StreamCreateError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StreamCreateError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for StreamCreateError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for StreamCreateError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

impl Send for StreamCreateError

source§

impl Sync for StreamCreateError

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.

diff --git a/docs/windows_docs/crabgrab/capture_stream/enum.StreamError.html b/docs/windows_docs/crabgrab/capture_stream/enum.StreamError.html index 58e8c5a4..9fed12a1 100644 --- a/docs/windows_docs/crabgrab/capture_stream/enum.StreamError.html +++ b/docs/windows_docs/crabgrab/capture_stream/enum.StreamError.html @@ -1,8 +1,8 @@ -StreamError in crabgrab::capture_stream - Rust +StreamError in crabgrab::capture_stream - Rust
pub enum StreamError {
     Other(String),
 }
Expand description

This represents an error during a stream, for example a failure to retrieve a video or audio frame

-

Variants§

§

Other(String)

Trait Implementations§

source§

impl Clone for StreamError

source§

fn clone(&self) -> StreamError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StreamError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for StreamError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for StreamError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where +

Variants§

§

Other(String)

Trait Implementations§

source§

impl Clone for StreamError

source§

fn clone(&self) -> StreamError

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for StreamError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Display for StreamError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Error for StreamError

source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more

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.

diff --git a/docs/windows_docs/crabgrab/capture_stream/enum.StreamEvent.html b/docs/windows_docs/crabgrab/capture_stream/enum.StreamEvent.html index 5b5297cd..d1f64117 100644 --- a/docs/windows_docs/crabgrab/capture_stream/enum.StreamEvent.html +++ b/docs/windows_docs/crabgrab/capture_stream/enum.StreamEvent.html @@ -1,4 +1,4 @@ -StreamEvent in crabgrab::capture_stream - Rust +StreamEvent in crabgrab::capture_stream - Rust
pub enum StreamEvent {
     Audio(AudioFrame),
     Video(VideoFrame),
diff --git a/docs/windows_docs/crabgrab/capture_stream/enum.StreamStopError.html b/docs/windows_docs/crabgrab/capture_stream/enum.StreamStopError.html
index db54bfe2..7fa1e81f 100644
--- a/docs/windows_docs/crabgrab/capture_stream/enum.StreamStopError.html
+++ b/docs/windows_docs/crabgrab/capture_stream/enum.StreamStopError.html
@@ -1,4 +1,4 @@
-StreamStopError in crabgrab::capture_stream - Rust
+StreamStopError in crabgrab::capture_stream - Rust
     
pub enum StreamStopError {
     Other(String),
     AlreadyStopped,
diff --git a/docs/windows_docs/crabgrab/capture_stream/index.html b/docs/windows_docs/crabgrab/capture_stream/index.html
index a19f58a5..8fe719af 100644
--- a/docs/windows_docs/crabgrab/capture_stream/index.html
+++ b/docs/windows_docs/crabgrab/capture_stream/index.html
@@ -1,3 +1,3 @@
-crabgrab::capture_stream - Rust
+crabgrab::capture_stream - Rust
     
Expand description

The actual capture stream and related constructs

Structs§

Enums§

\ No newline at end of file diff --git a/docs/windows_docs/crabgrab/capture_stream/struct.AudioCaptureConfig.html b/docs/windows_docs/crabgrab/capture_stream/struct.AudioCaptureConfig.html index 2a4dce94..5bdbff85 100644 --- a/docs/windows_docs/crabgrab/capture_stream/struct.AudioCaptureConfig.html +++ b/docs/windows_docs/crabgrab/capture_stream/struct.AudioCaptureConfig.html @@ -1,4 +1,4 @@ -AudioCaptureConfig in crabgrab::capture_stream - Rust +AudioCaptureConfig in crabgrab::capture_stream - Rust
pub struct AudioCaptureConfig { /* private fields */ }
Expand description

Configuration settings for audio streams

Implementations§

source§

impl AudioCaptureConfig

source

pub fn new() -> Self

Creates a new audio capture config with default settings: