Skip to main content

Module media_transport

Module media_transport 

Source
Expand description

Runtime media transport boundary used by core.

This module contains the service surface that room, server and crate::prelude::SfuCore code use when media work must happen outside the pure router. Callers ask the media transport to create SDP offers, apply answers, publish or consume media, close sessions, read diagnostics snapshots and subscribe to source-policy wakeups.

The boundary exposes the opaque MediaTransport handle, narrow construction inputs for the server runtime and transport operations that let higher layers express intent without knowing about RTC workers, Str0m state, UDP sockets or worker-local relay routing

Code above this module should depend on MediaTransport. Code below this module, especially the RTC engine, may deal with worker-local state machines and packet-loop details. Keeping that split explicit prevents room and signaling code from growing knowledge of the concrete WebRTC implementation.

Re-exportsยง

pub use build::MediaTransportBuildError;
pub use config::MediaTransportConfig;
pub use config::MediaTransportDeps;
pub use policy_invalidation::SourcePolicySignal;
pub use policy_invalidation::SourcePolicyUpdateSubscription;
pub use types::ActiveSpeakerActivityReason;
pub use types::ActiveSpeakerActivityState;
pub use types::ActiveSpeakerSource;
pub use types::ActiveSpeakerSourceDiagnostic;
pub use types::AppliedProducer;
pub use types::AppliedSessionAnswer;
pub use types::ConsumerActivity;
pub use types::ProducerActivity;
pub use types::ReceiverBandwidthSnapshot;
pub use types::ReceiverBweTargetUpdate;
pub use types::RelayRouteActivity;
pub use types::SessionOffer;
pub use types::SessionUploadEncoding;
pub use types::SessionUploadSlot;
pub use types::SourcePacketGate;
pub use types::TransportAdapterError;
pub use types::TransportBitrateSnapshot;
pub use types::TransportConsumerRoute;
pub use types::TransportHealthSnapshot;
pub use types::TransportMediaId;
pub use types::TransportQualitySample;
pub use types::TransportQualitySnapshot;
pub use types::TransportRelayRouteAction;
pub use types::TransportRelayRouteEffect;
pub use types::TransportResult;
pub use types::TransportRidActivity;
pub use types::TransportSessionHealth;
pub use types::TransportSessionKey;
pub use types::TransportSourceActivity;
pub use types::TransportSourceDiagnosticsSnapshot;
pub use types::TransportSourceKey;
pub use types::TransportWorkerPressureSnapshot;

Modulesยง

build ๐Ÿ”’
media transport construction and startup validation
config ๐Ÿ”’
Construction inputs for the media transport boundary.
policy_invalidation ๐Ÿ”’
Coalesces transport observations into room source-policy wakeups.
route_control ๐Ÿ”’
rtc ๐Ÿ”’
Private WebRTC backend below MediaTransport.
teardown ๐Ÿ”’
types ๐Ÿ”’
media transport boundary values shared by room state, server code and RTC workers
workers ๐Ÿ”’
RTC worker ownership below the media transport boundary.

Structsยง

MediaTransport
Opaque runtime media transport handle.

Enumsยง

TransportCommandOp ๐Ÿ”’

Functionsยง

warn_session_command_failed ๐Ÿ”’