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>
impl<'a> FrameSyncCapture<'a>
Sourcepub fn capture_video(&self, scan_type: ScanType) -> Result<Option<VideoFrame>>
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.
Sourcepub fn capture_video_ref(
&self,
scan_type: ScanType,
) -> Result<Option<FrameSyncVideoRef<'a>>>
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.
Sourcepub fn capture_audio(
&self,
request: FrameSyncAudioRequest,
) -> Result<AudioFrame>
pub fn capture_audio( &self, request: FrameSyncAudioRequest, ) -> Result<AudioFrame>
Capture owned resampled audio; see FrameSync::capture_audio.
§Errors
As for FrameSync::capture_audio_ref.
Sourcepub fn capture_audio_ref(
&self,
request: FrameSyncAudioRequest,
) -> Result<FrameSyncAudioRef<'a>>
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.
Sourcepub fn audio_input_format(&self) -> Result<Option<AudioInputFormat>>
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.
Sourcepub fn audio_queue_depth(&self) -> Result<u32>
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.