Skip to main content

KvmReceiver

Struct KvmReceiver 

Source
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>

Source

pub fn set_video_delay(&self, delay: ReceiveDelay) -> Result<SettingChange>

Set video buffering; see Receiver::set_video_delay.

§Errors

As for Receiver::set_video_delay.

Source

pub fn video_delay(&self) -> Result<ReceiveDelay>

Query video buffering; see Receiver::video_delay.

§Errors

As for Receiver::video_delay.

Source

pub fn set_audio_delay(&self, delay: ReceiveDelay) -> Result<SettingChange>

Set audio buffering; see Receiver::set_audio_delay.

§Errors

As for Receiver::set_audio_delay.

Source

pub fn audio_delay(&self) -> Result<ReceiveDelay>

Query audio buffering; see Receiver::audio_delay.

§Errors

As for Receiver::audio_delay.

Source

pub fn add_connection_metadata<S: MetadataSource + ?Sized>( &self, metadata: &S, ) -> Result<()>

Register connection metadata; see Receiver::add_connection_metadata.

§Errors

As for Receiver::add_connection_metadata.

Source

pub fn clear_connection_metadata(&self) -> Result<()>

Clear registered metadata; see Receiver::clear_connection_metadata.

§Errors

As for Receiver::clear_connection_metadata.

Source

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.

Source

pub fn wait_for_source_name_change( &self, timeout: Duration, ) -> Result<Option<SourceNameChange>>

Source

pub fn set_tally(&self, tally: Tally)

Set upstream tally; see Receiver::set_tally.

Source

pub fn send_metadata<S: MetadataSource + ?Sized>( &self, metadata: &S, ) -> Result<()>

Send upstream metadata; see Receiver::send_metadata.

§Errors

As for Receiver::send_metadata.

Source

pub fn ptz(&self) -> Ptz<'a>

Borrow PTZ controls; see Receiver::ptz.

Source

pub fn is_connected(&self) -> bool

Query connection status; see Receiver::is_connected.

Source

pub fn connection_target(&self) -> Option<Source>

Copy the last requested target, if any; see Receiver::connection_target.

Source

pub fn connection_stats(&self) -> Result<ConnectionStats>

Query reception statistics; see Receiver::connection_stats.

Source

pub fn request_keyframe(&self) -> Result<()>

Request a keyframe; see Receiver::request_keyframe.

§Errors

As for Receiver::request_keyframe.

Source§

impl<'a, M: VideoMode> KvmReceiver<'a, M>

Source

pub fn capture_video(&self, timeout: Duration) -> Result<Option<VideoFrame>>

Capture owned video; see Receiver::capture_video.

Source

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>

Source

pub fn capture_audio(&self, timeout: Duration) -> Result<Option<AudioFrame>>

Capture owned audio; see Receiver::capture_audio.

Source

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>

Source

pub fn capture_metadata( &self, timeout: Duration, ) -> Result<Option<MetadataFrame>>

Capture owned metadata; see Receiver::capture_metadata.

Source

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>

Source

pub fn next_event(&self, timeout: Duration) -> Result<Option<ReceiverEvent>>

Poll receiver events; see Receiver::next_event.

§Errors

As for Receiver::next_event.

Source§

impl<'a> KvmReceiver<'a>

Source

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.

Source

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>

Source

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.

Source

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.

Trait Implementations§

Source§

impl<M: ReceiverMode> Debug for KvmReceiver<'_, M>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, M> Freeze for KvmReceiver<'a, M>

§

impl<'a, M> RefUnwindSafe for KvmReceiver<'a, M>
where M: RefUnwindSafe,

§

impl<'a, M> Send for KvmReceiver<'a, M>

§

impl<'a, M> Sync for KvmReceiver<'a, M>

§

impl<'a, M> Unpin for KvmReceiver<'a, M>

§

impl<'a, M> UnsafeUnpin for KvmReceiver<'a, M>

§

impl<'a, M> UnwindSafe for KvmReceiver<'a, M>
where M: RefUnwindSafe,

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.

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, 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.