pub(super) struct RtcSessionState {Show 14 fields
pub(super) room_id: Arc<str>,
pub(super) rtc: Rtc,
pub(super) started_at: Instant,
pub(super) rtcp_ingress_budget: RtcpIngressBudget,
pub(super) defer_rtx_expiry: bool,
pub(super) pending_rtp_input: Option<Ssrc>,
pub(super) nack_totals: RtcNackTotals,
pub(super) egress_bitrate: Arc<MediaBitrateCounter>,
pub(super) local_ice_ufrag: String,
pub(super) receiver_bwe_target: Option<Bitrate>,
pub(super) dtls_started: bool,
pub(super) packet_loop_dirty: bool,
pub(super) sdp_negotiation: SessionSdpNegotiationState,
pub(super) consumer_streams: ConsumerStreamStore,
}Expand description
worker-local [str0m::Rtc] state for one transport session
this state is single-threaded under PacketLoopState
control commands mutate negotiation or routing facts before the packet loop
polls rtc, which keeps str0m access ordered without a per-session lock
Fields§
§room_id: Arc<str>public room UUID used to correlate structured transport events
rtc: Rtcsans-I/O WebRTC engine driven only by the packet-loop worker
started_at: Instantcreation time used for transport lifetime metrics during session teardown
rtcp_ingress_budget: RtcpIngressBudgetcandidate RTCP admission state at the pre-authentication boundary
defer_rtx_expiry: boolwhether admitted RTCP already checked RTX age at receive time and its next output drain must poll before applying a newer clock
pending_rtp_input: Option<Ssrc>Wire SSRC retained across input and output polling so RTX remains distinguishable after str0m normalizes the event to its primary SSRC. https://www.rfc-editor.org/rfc/rfc4588.html#section-4
nack_totals: RtcNackTotalsPer-MID/RID baselines that convert cumulative str0m NACK counts to deltas.
egress_bitrate: Arc<MediaBitrateCounter>shared writer and cold-reader handle for sent media bitrate
local_ice_ufrag: Stringlocal ICE fragment registered in demux recovery hints
receiver_bwe_target: Option<Bitrate>last desired receiver-side send bitrate for str0m BWE, retained to skip duplicate updates
dtls_started: bool§packet_loop_dirty: boolscheduler bit that prevents duplicate dirty-session wakeups
sdp_negotiation: SessionSdpNegotiationStatestaged SDP state owned by the worker-local offer and answer paths
consumer_streams: ConsumerStreamStoremonotonic RTP identity state keyed by consumer transport media
this belongs to the destination session because the browser sees one local RTP stream per consumer route, independent from whichever publisher SSRC or RID currently feeds that route
Implementations§
Source§impl RtcSessionState
impl RtcSessionState
pub(super) fn note_repairable_transmit(&mut self, contents: &[u8], now: Instant)
pub(super) fn invalidate_rtx_stream( &mut self, handle: SlotHandle<ConsumerStreamSlot>, )
pub(super) fn expire_rtx_streams(&mut self, now: Instant)
pub(super) fn purge_removed_rtx_streams(&mut self)
pub(super) fn reset_rtx_streams(&mut self, mid: Mid)
Sourcepub(super) fn remove_consumer_stream_tx(&mut self, mid: Mid)
pub(super) fn remove_consumer_stream_tx(&mut self, mid: Mid)
Retires the destination StreamTx and host RTX state for one consumer MID.
Source§impl RtcSessionState
impl RtcSessionState
pub(super) fn prepare_rtp_input(&mut self, packet: &[u8])
pub(super) fn take_rtp_repair(&mut self, primary_ssrc: Ssrc) -> bool
pub(super) fn clear_ingress_context(&mut self)
Auto Trait Implementations§
impl !Freeze for RtcSessionState
impl !RefUnwindSafe for RtcSessionState
impl Send for RtcSessionState
impl Sync for RtcSessionState
impl Unpin for RtcSessionState
impl UnsafeUnpin for RtcSessionState
impl UnwindSafe for RtcSessionState
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
§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