#[non_exhaustive]pub enum RtcpSessionControl {
Start,
Cname(String),
Bandwidth(RtcpBandwidth),
ReducedSize(bool),
SrtcpOverhead(usize),
TrrInt(Duration),
TrrIntCleared,
Leave,
StreamIdentifiers {
ssrc: u32,
mid: Option<String>,
rid: Option<String>,
repaired_rid: Option<String>,
},
ClockRateSwitch {
current: u32,
previous: Vec<u32>,
},
StopRepeating {
key: u32,
},
}Expand description
What an application (or the peer connection) tells the session while it runs.
It travels as an Attribute::Custom on an empty RTCP packet written into the chain
(RtcpSessionControl::into_packet); the session takes it off the belt.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Start
The transport is up: the session joins now, without waiting for a first packet.
Cname(String)
The CNAME of this endpoint, the one its session description announces.
Bandwidth(RtcpBandwidth)
The negotiated bandwidth (b= lines).
ReducedSize(bool)
Whether reduced-size RTCP (a=rtcp-rsize, RFC 5506) was negotiated.
SrtcpOverhead(usize)
The octets SRTCP adds to every compound packet: the E flag and SRTCP index, the
authentication tag and the MKI. RFC 3711 section 3.4: they are part of the packet size
avg_rtcp_size is computed from, the initial estimate included. Give it before
Self::Start; 0 (the default) for plain RTCP.
TrrInt(Duration)
The negotiated trr-int (RFC 4585 4.2), the minimum interval between regular reports.
TrrIntCleared
The negotiation has no trr-int (any more): the interval the session was built with
(RtcpSessionBuilder::with_t_rr_interval) applies again.
Leave
The endpoint leaves the session: every local SSRC says BYE.
StreamIdentifiers
What identifies the local stream ssrc beyond the CNAME: the identification-tag of
its m= section (RFC 9143 section 15.1, SDES MID), its RtpStreamId (RFC 8852 section
3.1) and, for a redundancy stream (RTX, FEC), the RepairedRtpStreamId of the stream it
repairs (section 3.2). Each given value is an item of the SSRC’s SDES chunk in every
compound packet: RFC 9143 section 15 wants the MID “in the first few RTCP packets after
joining the session and … regularly thereafter”. All None forgets the SSRC’s items;
the items of an SSRC that is no longer bound go when the next ones are given.
Fields
ClockRateSwitch
RFC 7160 section 4.1: the local stream current took over from the streams previous
because the sender switched to another clock rate (each clock rate has an SSRC of its
own). The next compound packet “MUST contain multiple SR packets, the first one
containing the mapping for the current clock rate and the subsequent SR packet(s)
containing the mapping for the other clock rates seen during the last period”: it
leads with current’s report, followed by those of the previous streams that sent
lately.
Fields
StopRepeating
Stops the repetitions of the packets written with the RepeatInRegularReports of
this key that are still owed (RFC 7728 section 6.4: “stopping such repetition
whenever leaving the state”).
Implementations§
Source§impl RtcpSessionControl
impl RtcpSessionControl
Sourcepub fn into_packet(self, now: Instant) -> TaggedPacket
pub fn into_packet(self, now: Instant) -> TaggedPacket
The packet that carries this to the session when written into the chain at now.