Expand description
Media sessions: RTP over UDP, paced sending, buffered receiving.
Two decisions shape this crate.
Symmetric RTP. Media goes back to where it arrives from, not to the address the SDP advertised. Behind a NAT the advertised address is private and the only path back is the pinhole the far end opened by sending.
The clock lives in one place. Audio is paced by one interval timer at the packetisation interval. Sending on channel readiness instead makes the packet rate depend on how fast the application produces samples, which is how a call sends 200 packets per second to a jitter buffer expecting 50.
§Stability
sipx is pre-1.0, so neither word below means frozen. 1.0.0 is what freezes an API, and its
predicates are in docs/roadmap.md. Until then:
- Supported — meant to be depended on. Breaking changes get a
CHANGELOG.mdentry saying what to do instead. New enum variants and new struct fields may still appear in a minor release, so a downstreammatchshould carry a_arm. - Experimental — may change shape or be removed without a migration note. Depend on it only if you are prepared to follow it.
Supported: MediaSession and the RTP/RTCP plumbing under it — binding, symmetric RTP, the
pacing clock, SRTP keyed from SDES, quality statistics — plus ice, whose gathering and
selected-pair driver are consumed by sipx-call, and dtls’s protocol, key-derivation and
handshake surface, which sipx-call selects for explicit DTLS-SRTP policy (M-28).
Experimental:
dtls::openssl— the optional OpenSSL implementation behind the off-by-defaultdtlsfeature. No shipped application enables it by default; the feature never changes a session or call without explicit DTLS-SRTP policy.BridgeandConference— real and tested over sessions you own; aCalldoes not hand out itsMediaSession, so two calls cannot be bridged yet (C-6).
Re-exports§
pub use bridge::Bridge;pub use conference::Conference;pub use conference::ConferenceError;pub use dtls::Arriving;pub use dtls::Handshake;pub use dtls::Profile;pub use dtls::Role;pub use ice::IcePath;pub use session::DtlsStartError;pub use session::Codec;pub use session::CodecDirection;pub use session::Config;pub use session::Encoded;pub use session::Interrupt;pub use session::MediaPort;pub use session::MediaSession;pub use session::PcmCapture;pub use session::Playback;pub use session::PlaybackEnd;pub use session::PlaybackId;pub use session::RtcpQualityHook;pub use session::RtcpQualitySample;pub use session::SetupError;pub use session::SrtpKeys;pub use session::StartError;
Modules§
- bridge
- Connecting two calls so each hears the other.
- browser
- The security gate for one browser-audio ICE component.
- conference
- A conference: every party hears every other party, and never themselves.
- dtls
- DTLS-SRTP: keying SRTP on the media path (RFC 5764).
- ice
- ICE (RFC 8445): finding a path for media when both ends are behind NATs.
- session
- A media session: RTP sockets, paced sending, and buffered receiving.
Structs§
- Media
Discard Counts - What one media session discarded, split by consequence.
- Pcm
- One owned mono PCM buffer.
- PcmFormat
- The representation and rate of a mono linear-PCM stream.
Enums§
- PcmEncoding
- A supported linear sample representation.
- PcmError
- A typed PCM-boundary refusal.
- PcmSamples
- Owned samples whose variant states their depth.