pub struct RemoteSourceControl {
tx: Sender<RtcWorkerCommand>,
target_id: RelayTargetId,
rtc_metrics: Arc<RtcMetricsRecorder>,
}Expand description
command handle used by remote consumers to push control back to a source worker
a route that consumes media from another worker keeps this handle beside the remote-source registration later keyframe or layer-gate requests can then reach the worker that owns the producer without exposing the source worker internals
sends are deliberately best-effort stale remote routes, closed workers and full mailboxes are normal during teardown or topology churn
Fields§
§tx: Sender<RtcWorkerCommand>§target_id: RelayTargetId§rtc_metrics: Arc<RtcMetricsRecorder>Implementations§
Source§impl RemoteSourceControl
impl RemoteSourceControl
Sourcepub(super) fn new(
tx: Sender<RtcWorkerCommand>,
target_id: RelayTargetId,
rtc_metrics: Arc<RtcMetricsRecorder>,
) -> Self
pub(super) fn new( tx: Sender<RtcWorkerCommand>, target_id: RelayTargetId, rtc_metrics: Arc<RtcMetricsRecorder>, ) -> Self
creates a source-control handle for one relay target on a worker mailbox
Sourcepub(super) fn request_kf(
&self,
source: &TransportSourceKey,
rid: Option<Rid>,
kind: KeyframeRequestKind,
) -> RemoteControlSendOutcome
pub(super) fn request_kf( &self, source: &TransportSourceKey, rid: Option<Rid>, kind: KeyframeRequestKind, ) -> RemoteControlSendOutcome
asks the source worker to request a keyframe for a remote consumer
this never waits for the source worker
Full retains caller-side retry authority while Closed ends it
Sourcepub(super) fn set_pkt_gate(
&self,
source: &TransportSourceKey,
packet_gate: PacketLayerGate,
) -> bool
pub(super) fn set_pkt_gate( &self, source: &TransportSourceKey, packet_gate: PacketLayerGate, ) -> bool
publishes the effective remote-source packet gate to the source worker
pub(super) fn record_pkt_gate_retry(&self)
pub(super) fn record_pkt_gate_flushed(&self)
fn send_command( &self, request: RouteControlRequest, drop_kind: RtcRemoteControlDropKind, ) -> RemoteControlSendOutcome
Trait Implementations§
Source§impl Clone for RemoteSourceControl
impl Clone for RemoteSourceControl
Source§fn clone(&self) -> RemoteSourceControl
fn clone(&self) -> RemoteSourceControl
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for RemoteSourceControl
impl RefUnwindSafe for RemoteSourceControl
impl Send for RemoteSourceControl
impl Sync for RemoteSourceControl
impl Unpin for RemoteSourceControl
impl UnsafeUnpin for RemoteSourceControl
impl UnwindSafe for RemoteSourceControl
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more