Skip to main content

FrameSyncCapture

Struct FrameSyncCapture 

Source
pub struct FrameSyncCapture<'a> { /* private fields */ }
Expand description

Clocked capture access lent by FrameSync::split.

This view borrows only the synchronizer, leaving its receiver available through a separate exclusive control view. A KVM session can therefore hold a button or key while video and audio continue. Creating or copying the view allocates nothing and makes no SDK call. Capture has the same costs, timing, validation and stale-output semantics as FrameSync.

The split view stays on its borrowing thread (!Send and !Sync) so exclusive stream changes stay sequenced with split capture. Share the complete FrameSync for concurrent capture instead. Borrowed output frames also remain neither Send nor Sync, retaining the owner’s borrow even if the view itself is dropped.

Implementations§

Source§

impl<'a> FrameSyncCapture<'a>

Source

pub fn capture_video(&self, scan_type: ScanType) -> Result<Option<VideoFrame>>

Capture an owned clocked video frame; see FrameSync::capture_video.

§Errors

As for FrameSync::capture_video_ref.

Source

pub fn capture_video_ref( &self, scan_type: ScanType, ) -> Result<Option<FrameSyncVideoRef<'a>>>

Borrow clocked video without a wrapper payload copy or allocation. The output can repeat previous input; see FrameSync::capture_video_ref.

§Errors

As for FrameSync::capture_video_ref.

Source

pub fn capture_audio( &self, request: FrameSyncAudioRequest, ) -> Result<AudioFrame>

Capture owned resampled audio; see FrameSync::capture_audio.

§Errors

As for FrameSync::capture_audio_ref.

Source

pub fn capture_audio_ref( &self, request: FrameSyncAudioRequest, ) -> Result<FrameSyncAudioRef<'a>>

Borrow resampled audio without a wrapper payload copy or allocation. The SDK can return silence; see FrameSync::capture_audio_ref.

§Errors

As for FrameSync::capture_audio_ref.

Source

pub fn audio_input_format(&self) -> Result<Option<AudioInputFormat>>

Query the cached input audio format; see FrameSync::audio_input_format. This does not establish fresh reception and allocates nothing on success.

§Errors

As for FrameSync::audio_input_format.

Source

pub fn audio_queue_depth(&self) -> Result<u32>

The approximate queued sample count; see FrameSync::audio_queue_depth. This makes one native query without allocating or waiting for input.

§Errors

Error::UnexpectedSdkResult when the native queue depth is negative.

Trait Implementations§

Source§

impl<'a> Clone for FrameSyncCapture<'a>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl<'a> Copy for FrameSyncCapture<'a>

Source§

impl Debug for FrameSyncCapture<'_>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> !Send for FrameSyncCapture<'a>

§

impl<'a> !Sync for FrameSyncCapture<'a>

§

impl<'a> Freeze for FrameSyncCapture<'a>

§

impl<'a> RefUnwindSafe for FrameSyncCapture<'a>

§

impl<'a> Unpin for FrameSyncCapture<'a>

§

impl<'a> UnsafeUnpin for FrameSyncCapture<'a>

§

impl<'a> UnwindSafe for FrameSyncCapture<'a>

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

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

Source§

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.