pub enum ContinuityEvent {
Continuous,
Duplicate,
NoPayload,
Dropped {
gap: u8,
},
Discontinuity,
}Expand description
Outcome of feeding one packet to a ContinuityTracker.
Variants§
Continuous
CC differs from previous by exactly 1 mod 16 (or this is the first packet) — the expected case.
Duplicate
CC matched the previous packet’s value. §2.4.3.3: “duplicate packets may be sent as two, and only two, consecutive TS packets”. The current packet may be discarded if the previous one was already emitted.
NoPayload
CC did not increment (adaptation_field_control was '00'
or '10'). Spec-permitted; not a drop.
Dropped
CC jumped by more than 1 — at least one packet was lost.
Reported delta is (current - previous - 1) mod 16, i.e.
the minimum number of packets we know are missing (the
counter is only 4 bits so larger losses are
indistinguishable).
Discontinuity
discontinuity_indicator = 1 on this packet — §2.4.3.4 says
the CC may be discontinuous and we should not interpret the
gap as a drop.
Trait Implementations§
Source§impl Clone for ContinuityEvent
impl Clone for ContinuityEvent
Source§fn clone(&self) -> ContinuityEvent
fn clone(&self) -> ContinuityEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ContinuityEvent
Source§impl Debug for ContinuityEvent
impl Debug for ContinuityEvent
impl Eq for ContinuityEvent
Source§impl PartialEq for ContinuityEvent
impl PartialEq for ContinuityEvent
Source§fn eq(&self, other: &ContinuityEvent) -> bool
fn eq(&self, other: &ContinuityEvent) -> bool
self and other values to be equal, and is used by ==.