pub struct KvmReceiver<'a, M: ReceiverMode = RawCapture> { /* private fields */ }Expand description
Restricted receiver access lent by super::KvmSession::receiver.
Capture and event polling follow separate sealed mode bounds. FrameSync and
AV sync views permit metadata capture but no event polling. Shared controls delegate
to the same receiver, but this view cannot connect, disconnect, reconnect,
or recover unrestricted receiver access. To switch sources, successfully
release all input, end the session, change the owner’s connection and start
a new session. See super::KvmSession for best-effort release limitations.
This reference-sized view allocates nothing and makes no SDK calls or lock
acquisitions when constructed. Capture handles, borrowed frames and PTZ
controls retain the original receiver borrow, so they can coexist with
mutable session input calls. Packet sessions also capture through
session.receiver(), so a worker can capture while its session sends input.
Like the receiver, the view is Send and Sync.
Implementations§
Source§impl<'a, M: ReceiverMode> KvmReceiver<'a, M>
impl<'a, M: ReceiverMode> KvmReceiver<'a, M>
Sourcepub fn set_video_delay(&self, delay: ReceiveDelay) -> Result<SettingChange>
pub fn set_video_delay(&self, delay: ReceiveDelay) -> Result<SettingChange>
Sourcepub fn video_delay(&self) -> Result<ReceiveDelay>
pub fn video_delay(&self) -> Result<ReceiveDelay>
Sourcepub fn set_audio_delay(&self, delay: ReceiveDelay) -> Result<SettingChange>
pub fn set_audio_delay(&self, delay: ReceiveDelay) -> Result<SettingChange>
Sourcepub fn audio_delay(&self) -> Result<ReceiveDelay>
pub fn audio_delay(&self) -> Result<ReceiveDelay>
Sourcepub fn add_connection_metadata<S: MetadataSource + ?Sized>(
&self,
metadata: &S,
) -> Result<()>
pub fn add_connection_metadata<S: MetadataSource + ?Sized>( &self, metadata: &S, ) -> Result<()>
Register connection metadata; see Receiver::add_connection_metadata.
§Errors
Sourcepub fn clear_connection_metadata(&self) -> Result<()>
pub fn clear_connection_metadata(&self) -> Result<()>
Clear registered metadata; see Receiver::clear_connection_metadata.
§Errors
Sourcepub fn web_control_url(&self) -> Result<Option<String>>
pub fn web_control_url(&self) -> Result<Option<String>>
Copy the device web-control URL; see Receiver::web_control_url.
§Errors
As for Receiver::web_control_url.
Sourcepub fn wait_for_source_name_change(
&self,
timeout: Duration,
) -> Result<Option<SourceNameChange>>
pub fn wait_for_source_name_change( &self, timeout: Duration, ) -> Result<Option<SourceNameChange>>
Query source-name changes; see Receiver::wait_for_source_name_change.
§Errors
Sourcepub fn set_tally(&self, tally: Tally)
pub fn set_tally(&self, tally: Tally)
Set upstream tally; see Receiver::set_tally.
Sourcepub fn send_metadata<S: MetadataSource + ?Sized>(
&self,
metadata: &S,
) -> Result<()>
pub fn send_metadata<S: MetadataSource + ?Sized>( &self, metadata: &S, ) -> Result<()>
Sourcepub fn ptz(&self) -> Ptz<'a>
pub fn ptz(&self) -> Ptz<'a>
Borrow PTZ controls; see Receiver::ptz.
Sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Query connection status; see Receiver::is_connected.
Sourcepub fn connection_target(&self) -> Option<Source>
pub fn connection_target(&self) -> Option<Source>
Copy the last requested target, if any; see Receiver::connection_target.
Sourcepub fn connection_stats(&self) -> Result<ConnectionStats>
pub fn connection_stats(&self) -> Result<ConnectionStats>
Query reception statistics; see Receiver::connection_stats.
Sourcepub fn request_keyframe(&self) -> Result<()>
pub fn request_keyframe(&self) -> Result<()>
Source§impl<'a, M: VideoMode> KvmReceiver<'a, M>
impl<'a, M: VideoMode> KvmReceiver<'a, M>
Sourcepub fn capture_video(&self, timeout: Duration) -> Result<Option<VideoFrame>>
pub fn capture_video(&self, timeout: Duration) -> Result<Option<VideoFrame>>
Capture owned video; see Receiver::capture_video.
Sourcepub fn capture_video_ref(
&self,
timeout: Duration,
) -> Result<Option<VideoFrameRef<'a>>>
pub fn capture_video_ref( &self, timeout: Duration, ) -> Result<Option<VideoFrameRef<'a>>>
Borrow video; see Receiver::capture_video_ref.
The frame retains the original receiver borrow and may coexist
with later mutable KVM session input calls.
Source§impl<'a, M: AudioMode> KvmReceiver<'a, M>
impl<'a, M: AudioMode> KvmReceiver<'a, M>
Sourcepub fn capture_audio(&self, timeout: Duration) -> Result<Option<AudioFrame>>
pub fn capture_audio(&self, timeout: Duration) -> Result<Option<AudioFrame>>
Capture owned audio; see Receiver::capture_audio.
Sourcepub fn capture_audio_ref(
&self,
timeout: Duration,
) -> Result<Option<AudioFrameRef<'a>>>
pub fn capture_audio_ref( &self, timeout: Duration, ) -> Result<Option<AudioFrameRef<'a>>>
Borrow audio; see Receiver::capture_audio_ref.
The frame retains the original receiver borrow and may coexist
with later mutable KVM session input calls.
Source§impl<'a, M: MetadataMode> KvmReceiver<'a, M>
impl<'a, M: MetadataMode> KvmReceiver<'a, M>
Sourcepub fn capture_metadata(
&self,
timeout: Duration,
) -> Result<Option<MetadataFrame>>
pub fn capture_metadata( &self, timeout: Duration, ) -> Result<Option<MetadataFrame>>
Capture owned metadata; see Receiver::capture_metadata.
Sourcepub fn capture_metadata_ref(
&self,
timeout: Duration,
) -> Result<Option<MetadataFrameRef<'a>>>
pub fn capture_metadata_ref( &self, timeout: Duration, ) -> Result<Option<MetadataFrameRef<'a>>>
Borrow metadata; see Receiver::capture_metadata_ref.
The frame retains the original receiver borrow and may coexist
with later mutable KVM session input calls.
Source§impl<'a, M: EventMode> KvmReceiver<'a, M>
impl<'a, M: EventMode> KvmReceiver<'a, M>
Sourcepub fn next_event(&self, timeout: Duration) -> Result<Option<ReceiverEvent>>
pub fn next_event(&self, timeout: Duration) -> Result<Option<ReceiverEvent>>
Source§impl<'a> KvmReceiver<'a>
impl<'a> KvmReceiver<'a>
Sourcepub fn capture_any_ref(
&self,
timeout: Duration,
) -> Result<Option<ReceiverItemRef<'a>>>
pub fn capture_any_ref( &self, timeout: Duration, ) -> Result<Option<ReceiverItemRef<'a>>>
Borrow mixed media or events; see Receiver::capture_any_ref.
§Errors
As for Receiver::capture_any_ref, including crate::Error::UnexpectedSdkResult
once per failed status publication, whose event remains pending.
Sourcepub fn capture_any(&self, timeout: Duration) -> Result<Option<ReceiverItem>>
pub fn capture_any(&self, timeout: Duration) -> Result<Option<ReceiverItem>>
Copy mixed media or events; see Receiver::capture_any.
§Errors
As for Receiver::capture_any, including crate::Error::UnexpectedSdkResult
once per failed status publication, whose event remains pending.
Source§impl<'a> KvmReceiver<'a, PacketAttached>
impl<'a> KvmReceiver<'a, PacketAttached>
Sourcepub fn capture_any(&self, timeout: Duration) -> Result<Option<PacketItem>>
pub fn capture_any(&self, timeout: Duration) -> Result<Option<PacketItem>>
Wait up to timeout for the next frame or event of a
PacketReceiver, exactly as PacketReceiver::capture_any does, while
the session holds its inputs.
Every result owns its data, so nothing it returns keeps the session borrowed. Both packet capture methods use a shared borrow of the receiver, as the packet receiver’s own capture methods do.
§Errors
As for PacketReceiver::capture_any, including crate::Error::UnexpectedSdkResult
once per failed status publication, whose event remains pending.
Sourcepub fn capture_any_ref(
&self,
timeout: Duration,
) -> Result<Option<PacketItemRef<'a>>>
pub fn capture_any_ref( &self, timeout: Duration, ) -> Result<Option<PacketItemRef<'a>>>
Borrow a packet for the underlying receiver’s lifetime, so inputs can
still be released while the packet is held. See PacketReceiver::capture_any_ref.
§Errors
As for PacketReceiver::capture_any_ref, including crate::Error::UnexpectedSdkResult
once per failed status publication, whose event remains pending.