#[non_exhaustive]pub enum PacerQueueOverflow {
Drop,
Drain,
}Expand description
What the pacer does with media the target has no room for: a packet that has waited the queue time limit, or the oldest one when a packet arrives at a full queue. It happens only when the application writes faster than the congestion controller’s target for longer than the limit.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Drop
The media is discarded here, whole frames at a time (see PacerDiscard; counted by
PacerInterceptor::dropped and PacerInterceptor::discarded_frames): nothing
leaves above the target. The congestion controller’s target is what the path carries (RFC
8836 section 2; RFC 8083 section 4 stops a flow that does not keep to it), so a sender
that put the excess on the path anyway would fill the bottleneck’s queue, lose there
and drive the estimate to its floor: a 2.4 Mbit/s source on a 600 kbit/s link
(tests/gcc_rate_limited_link_rtc2rtc.rs, and netem in
testenv_impairment::gcc_follows_a_rate_limited_link) held a target of 500 to 590
kbit/s this way, and fell to 100 kbit/s with QueueOverflow::Drain. The receiver
counts the dropped packets as lost, which they are; the NACK responder does not resend
them, and the application is asked for a key frame (see PacerDiscard).
Drain
libwebrtc’s pacer (drain_large_queues, MaybeUpdateMediaRateDueToLongQueue): the
pacing rate is raised above the target as far as it takes to drain the queue before
its oldest packet has waited the limit, a packet that has waited it leaves whatever the
budget says, and a full queue releases its oldest over the budget (counted by
PacerInterceptor::forced). Nothing the application wrote is lost here, and a
source that keeps above the target puts all of it on the path. For an encoder that
follows the target, as libwebrtc’s does.