pub struct RtcpSessionInterceptor { /* private fields */ }Expand description
The RTCP session of an endpoint (RFC 3550 section 6, RFC 4585 section 3, RFC 8108).
One interceptor, closest to the wire, is the endpoint’s whole RTCP voice:
- Identity. One CNAME for every local SSRC (RFC 7022: 96 random bits, Base64), given or generated. Reports and feedback come from the local media SSRCs; an endpoint with none reports from one SSRC the session chooses (never zero, never one in use). Every feedback packet the interceptors above or the application write leaves with the packet sender SSRC of this endpoint (RFC 8108 5.4.1), whatever they filled in.
- Reports. A sender report for every SSRC that sent RTP in the last two intervals, RTX and FEC SSRCs included; a receiver report otherwise (RFC 3550 6.4). Reception report blocks for the remote streams (RFC 3550 Appendix A.3), an SDES CNAME for every reporting SSRC, XR receiver reference time and DLRR blocks (RFC 3611).
- Timing. The interval of RFC 3550 6.3 from the member and sender counts, the average
packet size and the RTCP bandwidth, randomised, with timer reconsideration and reverse
reconsideration; the early feedback rules of RFC 4585 3.5 and
T_rr_interval; one timer per local SSRC, aggregated into one compound packet (RFC 8108 5.3). - Packets. Everything leaves as a compound packet (SR or RR first, then SDES) unless reduced-size RTCP was negotiated (RFC 5506), kept under the MTU.
- Membership. Sources heard in RTP and RTCP, their CNAMEs, BYE, the timeout after five intervals, sender status over two; BYE for a local SSRC that stops and for all of them when the endpoint leaves; a collision with one of the endpoint’s own SSRCs.
It replaces SenderReportInterceptor and
ReceiverReportInterceptor, which report on fixed
timers: a sender or receiver report those (or the application) write is dropped here, the
session’s own stand for it.
§Where it goes
Slot::RtcpSession, wire-ward of everything: it counts what
leaves (retransmissions and FEC included) and what arrives, and every RTCP packet the
chain writes passes it last.
§Inputs and outputs
What a session description negotiates is handed in with the builder or, while running,
as an RtcpSessionControl. What the session learns leaves as an RtcpSessionEvent.
Implementations§
Trait Implementations§
Source§impl Interceptor for RtcpSessionInterceptor
impl Interceptor for RtcpSessionInterceptor
Source§fn bind_local_stream(&mut self, info: &StreamInfo)
fn bind_local_stream(&mut self, info: &StreamInfo)
A stream this endpoint sends: its SSRC reports from now on, and its RTX and FEC SSRCs from their first packet. A stream unbound a moment ago and bound again with the same SSRC (a renegotiation) carries on: no BYE, and its counts are kept.
Source§fn unbind_local_stream(&mut self, info: &StreamInfo)
fn unbind_local_stream(&mut self, info: &StreamInfo)
The stream stopped: its SSRCs say BYE the next time the chain is driven, unless they are bound again first.
Source§fn move_local_stream_out(&mut self, info: &StreamInfo)
fn move_local_stream_out(&mut self, info: &StreamInfo)
A stream moving to another RTP session is not leaving: its SSRCs go from this
session’s members without the BYE unbind_local_stream sends (RFC 3550 6.6 is for a
source that leaves the session; this one carries on in the other session, and this
session’s transport is going away or no longer carries it).