rtci 0.22.0+brainwires.1
Released 2026-11-20.
From CHANGELOG.md of rtci at its release tag.
A conformance release: every claim the README, FORK.md, a public option, the default SDP or the statistics report makes is now a row of docs/conformance.md with its specification section and the test that proves it, and what is not implemented is listed there. Fixes across SCTP, JSEP, ICE, TURN, DTLS, SRTP, RTP / RTCP and the statistics report came out of that work. The minor version moves because the public API changes (see "Breaking changes").
Breaking changes
- rtp:
Headerhas a publicpadding_size: u8, the number of padding octets a parsed packet carried, kept on re-marshal (0 pads as before). Struct literals addpadding_size: 0or..Default::default(). - stats: members the engine cannot measure are
Optionand left out of the JSON whenNone(webrtc-stats: an unmeasured member is not present), instead of 0 /"". This covers the encoder, decoder, frame, audio, jitter buffer, pause / freeze, corruption, PSNR and quality limitation members ofRTCInboundRtpStreamStats/RTCOutboundRtpStreamStats, theirremote_id,rtx_ssrc,fec_ssrcandencoding_index, the received streams'jitterand ECN / RFC 8888 members,round_trip_timeof the remote-inbound and remote-outbound streams,RTCCodecStats::channels,RTCIceCandidateStats::related_port, the candidate pair's last-packet timestamps,current_round_trip_timeand available bitrates, and every member ofRTCAudioSourceStats,RTCVideoSourceStatsandRTCAudioPlayoutStats. Read them withif let Some(v)or.unwrap_or_default(). - stats:
RTCIceCandidateStats::priorityisu32(the full RFC 8445 priority; it was truncated tou16). Widen the receiving type. - stats:
RTCMediaSourceStats::track_idistrack_identifier, as webrtc-stats names it. Rename the field access. - stats:
RTCCodecStatshas atransport_id: String. Struct literals add it. - ice:
AgentConfighasnat_1to1_ips,nat_1to1_ip_candidate_type,allow_loopback_remote_candidates,allow_link_local_remote_candidatesandremote_address_filter;SettingEngine'sCandidateshas the last three. Struct literals add..Default::default(). - rtp:
Vp9Payloaderhas a publicflexible_mode: bool. Struct literals add..Default::default(). - data channel:
RTCDataChannelInithaspriority: u16(default 256, W3C Priority Control). Struct literals addpriority: 256or..Default::default(). - rtp_transceiver:
RTCRtpEncodingParameters::default()hasactive: true, as W3C defines it; an encoding withactive: falseis not sent and is a paused rid ina=simulcast. Code that relied on the oldfalsedefault setsactiveexplicitly. - rtcp:
ReceptionReport::total_lostholds the 24 wire bits unclamped; read the signed RFC 3550 count withReceptionReport::cumulative_lost()and write one withset_cumulative_lost(). - setting_engine:
with_receive_mtu,with_include_loopback_candidateandwith_disable_media_engine_copyare#[deprecated]: they had no effect in the sans-I/O engine. Remove the calls (add a loopback candidate withadd_local_candidateinstead). - media_engine:
register_default_codecsno longer offers ULPFEC (nothing encodes or decodes it); an application with its own coder registersMIME_TYPE_ULP_FECitself. The FlexFEC coder is selected only for an exactvideo/flexfec-03. - ice: only
<uuid>.localremote candidate names are resolved over mDNS, and remote candidates on unspecified, multicast, broadcast or port-0 addresses are dropped; checks to a loopback or link-local remote address need a local candidate of the same scope unlessSettingEngineBuilder::with_remote_candidate_scopesallows them.
Features
- setting_engine / ice:
SettingEngineBuilder::with_remote_candidate_scopesandwith_remote_address_filter(ice::agent::remote_policy::RemoteAddressFilter) decide which remote addresses connectivity checks may reach (RFC 8445 §5.1.1.1). - ice:
nat_1to1_ipsis applied to the host candidates the application adds:Hostannounces the external address,Srflxadds a server-reflexive candidate. - media_engine: each media section negotiates its own codecs, one entry per format;
with_disable_media_engine_multiple_codecs(true)restores one shared set. The default codecs carry H.264 High profile at levels 4.0 to 5.1, each with an RTX pairing, and the default AV1 fmtp isprofile=0. - stats:
RTCPeerConnection::update_decoder_stats,update_audio_receiver_stats,update_encoder_stats,update_audio_source_stats,update_video_source_statsandupdate_audio_playout_statssupply the members only the application can measure (the*StatsUpdatetypes are exported fromstatistics); updates merge. - sctp:
TransportConfig::with_max_receive_message_sizeandwith_remote_sctp_port;Association::is_ended. - rtcp / rtp: a stopped sender sends a final SR and BYE, and an inbound BYE ends the remote track;
H264Payloader::with_packetization_mode;ReceptionReport::cumulative_lost/set_cumulative_lost. - media:
OggReader::next_packetandOggPageHeader::{segment_table, packets, is_continued_packet};MAX_ACCESS_UNIT_NALS/MAX_ACCESS_UNIT_BYTESbound an H.26x access unit. - ice / dtls / srtp:
Agent::set_candidate_types,Candidate::last_consent,DTLSConn::is_failed,srtp::Context::cryptex/set_cryptex.
Bug Fixes
- SCTP and data channels: SHUTDOWN carries the last TSN received and acknowledges our DATA; a graceful shutdown sends queued DATA first, and the initiator ends after SHUTDOWN COMPLETE. Fast Recovery counts misses only for TSNs a SACK reports missing; T3-rtx keeps recovering past its limit by default (a finite limit closes the association); congestion window arithmetic saturates. A performed outgoing stream reset restarts the stream's SSN. The INIT goes to the remote
a=sctp-port. A failed handshake closes the association, the transport and its data channels. Messages up to the advertisedmax-message-sizeare received, and an oversized one is dropped alone instead of ending the read. A fragment set's completeness is checked in constant time. - Peer connection and SDP (JSEP):
stop()andsetStreams()raise negotiation-needed and a stopped transceiver settles; a recycled m-line drops the stopped transceiver's section;addTransceiveracceptsinactiveandsendwithout encodings, and remote tracks are labelled"remote <kind>";setParametersruns the W3C validation steps and refuses duplicate rids; a newiceTransportPolicyfromset_configurationreaches the ICE agent; a remote description that fails to apply leaves the negotiated codecs alone; codec preferences survive a remote offer;Requireheader encryption refuses a remote description withouta=cryptex; a FEC repair flow is described only for FlexFEC-03. - ICE, TURN, STUN, mDNS: consent is granted only by authenticated responses to our own checks; a closed agent refuses an ICE restart; the bare
.localis not an mDNS host name; an mDNS answer is taken only from an on-link sender that owns the address, and a query ends at its timeout. TURN: a 438 Stale Nonce answer to CreatePermission, Refresh or ChannelBind is retried with the new nonce; a Refresh or ChannelBind that timed out is sent again; permissions are per peer IP; the authenticated Allocate uses a fresh transaction id; Data indications are accepted only from the TURN server; a permission refresh is split into bounded requests. STUN: the message length no longer wraps. - DTLS: a fatal alert, handshake error or exhausted retransmissions sets
RTCDtlsTransportState::Failedand fails the peer connection; a repeated peer flight is answered at once; alerts are not echoed; an invalid epoch-0 record cannot stall the handshake; the AES-GCM / CCM explicit nonce is the record's epoch and sequence number (RFC 5288, RFC 6655); CBC padding and MAC checks have a constant structure; a server does no key exchange work for a source address before the cookie exchange. - SRTP: the AES-GCM cipher constructor returns errors instead of panicking. The inbound replay window defaults to 1024 packets (was 64): a NACK retransmission without RTX reuses the lost packet's sequence number, and one repaired on a third try at 200 packets/s was already more than 64 packets behind and refused as too old, so the packet was lost for good.
- RTP, RTCP, codecs, interceptors: a packet keeps its padding size across unmarshal and marshal; every compound report carries an SDES CNAME; a reception report's cumulative loss is read as signed 24-bit; TWCC receive deltas and status chunks are checked against the packet. RTX is de-encapsulated before the interceptor chain, and NACK retransmissions keep the original's CSRCs and extensions and are held to the stream's own send rate. GCC scales its delay trend and measures the received rate on arrival time. FlexFEC-03 decoder packets are ordered by a total key; the adaptive jitter buffer is bounded per stream and drops an evicted packet's deadline; a wide sequence gap clears in one step. H.264 honours
packetization-mode=0, and only the last slice of a picture is a timed sample; H.265 tells a continuing fragmentation unit from a partition head; VP9 accepts three reference indices, reads G as one bit and sends non-flexible mode with the scalability structure on key frames; AV1 sets N only at a coded video sequence start.H26xSampleReaderreturns whole access units andOggReaderreads packets; reads of untrusted media files are bounded. - Statistics: every id a stats object names resolves in the same report; remote-inbound
roundTripTime,packetsReceivedandjitterfollow RFC 3550 (jitter in seconds); reception reports inside sender reports are counted; remote objects exist only after their first report; every candidate pair is reported with its state, and candidates carry their full priority;dtlsState, data channelstate,transportId,trackIdentifierand the congestion controller's estimate (targetBitrate,availableOutgoingBitrate) are reported;tlsVersionis the ServerHello version in hex; per-SSRC stream maps shrink with their streams.
Testing
- Upstream test parity: every test of upstream
webrtc-rs/rtcandwebrtc-rs/webrtcv0.17.1 has a fork test, a mapped equivalent, or a recorded reason (docs/upstream-test-parity.md); commented-out and never-compiled tests across SCTP, data channels, DTLS, ICE, TURN, STUN, mDNS, SRTP, SDP and media were restored. - A Linux network-namespace environment runs ICE across NAT topologies, TURN over UDP / TCP / TLS, mDNS on a LAN, ICE-TCP through a NAT, and data channels, NACK, the jitter buffer and GCC over impaired links; a browser matrix (Chromium, Firefox, WebKit) covers data channels, renegotiation, ICE restart, every codec both ways, simulcast with RTX, Cryptex, TURN, ICE-TCP, mDNS-hidden candidates, JSEP flows, wrong fingerprints and stats.
- Fuzzing: every parser a peer, a server or an untrusted file reaches has a fuzz target, with stateful targets for the state machines above them; CI checks every target is run and built by OSS-Fuzz.
- CI fails on hidden tests (ignored, commented out, orphaned or platform-gated without a listed reason) and on conformance rows whose test does not exist, runs the workspace tests on macOS and Windows as well as Linux, and pins every action by commit SHA.
- The workspace with
--all-features: 2746 tests pass.