pub struct ReceiverControls<'a, M: ReceiverMode> { /* private fields */ }Expand description
Exclusive controls for a receiver held by another resource.
FrameSync and AVSync depend on one particular native receiver. Their
controls() methods lend this view instead of a mutable receiver, so it
cannot be replaced while those resources exist. Allocator owners lend this
view too; their registrations independently retain the original receiver core.
Ordinary shared controls remain available through the owner’s
receiver() method, or Self::receiver.
The view allocates nothing and stays on its borrowing thread (!Send and
!Sync). This keeps exclusive stream changes sequenced with split capture;
the SDK does not document their overlap across application threads. Its
exclusive borrow prevents changing streams or starting a second KVM session
while a session is live. Use the synchronizer’s split() method to keep
capturing synchronized output during a KVM session.
Implementations§
Source§impl<'a, M: ReceiverMode> ReceiverControls<'a, M>
impl<'a, M: ReceiverMode> ReceiverControls<'a, M>
Sourcepub fn receiver(&self) -> &Receiver<M>
pub fn receiver(&self) -> &Receiver<M>
The receiver for shared controls and the capture allowed by its mode. This borrow never permits replacement or recovery of the receiver.
Sourcepub fn set_stream_tier(&mut self, tier: StreamTier) -> Result<SettingChange>
pub fn set_stream_tier(&mut self, tier: StreamTier) -> Result<SettingChange>
Switch between program and preview; see Receiver::set_stream_tier.
This makes the same synchronous native call without allocating.
§Errors
As for Receiver::set_stream_tier. A refused or redundant change
remains SettingChange::Unchanged.
Sourcepub fn set_streams(&mut self, streams: MediaTypes) -> Result<SettingChange>
pub fn set_streams(&mut self, streams: MediaTypes) -> Result<SettingChange>
Choose the enabled media; see Receiver::set_streams.
This makes the same synchronous native call without allocating. It
does not promise to flush a synchronizer’s cached output or format.
§Errors
As for Receiver::set_streams. A refused or redundant change
remains SettingChange::Unchanged.
Sourcepub fn kvm(self) -> Result<KvmSession<'a, M>>
pub fn kvm(self) -> Result<KvmSession<'a, M>>
Start KVM, retaining this view’s exclusive receiver borrow.
This consumes the view, so a temporary owner.controls() can create
a session lasting until it is dropped. Session creation allocates
nothing; holding inputs can allocate for tracking. To change source,
successfully release all inputs and end the session first. Its
restricted receiver view cannot change the connection.
§Errors
As for Receiver::kvm.