Expand description
Private WebRTC backend below MediaTransport.
Each RtcWorker drives its sessions through one shared UDP socket and
bounded mailboxes. control and packet_loop share recovery:
worker
+-- commands ------> control ------+
| +--> recovery
`-- media packets -> packet_loop --+
|
`--> consumer_egressstate::PacketLoopState holds the sessions, media identity, routes and
scheduling indexes used by these operations. Its lifecycle methods keep
dependent indexes and stream retirement together. state::RtcSnapshotState
exposes observations without granting access to that mutable state.
worker::loop_driver governs turn ordering. consumer_egress provides
receiver RTP writes. egress dispatches encoded transmits to network adapters
after the worker releases mutable RTC state. Packet processing and recovery
do not call command handlers.
commands defines shared mailbox contracts, codec provides codec rules
and bootstrap initializes sockets and sessions.
Re-exportsยง
pub use commands::RtcWorkerCommand;pub use commands::RtcWorkerResponse;pub use commands::WorkerMediaControlBatch;pub use commands::WorkerMediaControlBatchOutcome;pub use worker::RtcWorker;
Modulesยง
- bootstrap ๐
- cold-path rtc socket and session bootstrap
- codec ๐
- RTC codec policy, negotiation and packet behavior.
- commands ๐
- mailbox command contract for the RTC worker engine
- consumer_
egress ๐ - Receiver RTP projection and repair bookkeeping for local RTC destinations.
- control ๐
- RTC command workflows for one worker.
- egress ๐
- Complete RTC output dispatched to worker-local network adapters.
- packet_
loop ๐ - Datagram admission, packet observation and forwarding execution.
- recovery ๐
- Decoder readiness effects and keyframe dispatch across RTC workers.
- state ๐
- Worker-local sessions, routing and their lifecycle transitions.
- worker ๐
- Thread lifecycle and turn scheduling for one
RtcWorker.
Structsยง
- RtcWorker
Config ๐