#[non_exhaustive]pub enum NackControl {
LocalRtxTime {
payload_type_rtx: u8,
rtx_time: Option<Duration>,
},
RemoteRtxTime {
payload_type_rtx: u8,
rtx_time: Option<Duration>,
},
Horizon {
media_ssrc: u32,
oldest_useful: Option<u16>,
},
}Expand description
What a session description negotiated for retransmission (RFC 4588), told to the NACK interceptors while they run.
It travels as an Attribute::Custom on an empty RTCP packet written into the chain
(NackControl::into_packet). Each NACK interceptor reads what is its own and hands the
packet on.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
LocalRtxTime
The rtx-time (RFC 4588 8.1) this endpoint announced for its retransmission format
payload_type_rtx: how long the NackResponderInterceptor
keeps a sent packet of a stream repaired under that payload type available. It replaces
the builder’s with_max_packet_age for those streams; None returns them to it.
Fields
RemoteRtxTime
The rtx-time the remote endpoint announced for its retransmission format
payload_type_rtx: past it the remote sender no longer has the packet, so the
NackGeneratorInterceptor stops asking for a packet
of a stream repaired under that payload type that has been missing for longer, or for
longer than the builder’s with_max_packet_age, whichever is shorter. None leaves
the builder’s value alone.
Fields
Horizon
The oldest sequence number of the remote stream media_ssrc that the receiving
application can still use (RFC 4588 6.3: “the receiver should generally assess whether
the retransmitted packet would still be useful at the time it is received”): its video
pipeline released or gave up every frame before it. The
NackGeneratorInterceptor asks for no missing packet
older than oldest_useful from then on, and forgets the requests it had for them. A
request for them that the RtcpSessionInterceptor
still holds for its next packet (RFC 4585 3.5.2: early feedback is rate-limited, and
what is stored is sent only if it is still useful) is dropped there as well, so no
NACK that leaves after the horizon was given names a packet behind it.
None removes the horizon. Sequence numbers compare with wrap-around (RFC 3550 A.1):
a packet up to 32767 behind the horizon is older; the application moves the horizon
on as it plays out, so it never lags that far.
Implementations§
Source§impl NackControl
impl NackControl
Sourcepub fn into_packet(self, now: Instant) -> TaggedPacket
pub fn into_packet(self, now: Instant) -> TaggedPacket
The packet that carries this to the NACK interceptors when written into the chain at
now.