pub struct ContinuityTracker { /* private fields */ }Expand description
Per-PID continuity-counter tracker per ISO/IEC 13818-1 §2.4.3.3.
We track only the last payload-bearing packet’s CC; the spec rule “the continuity_counter shall not be incremented when the adaptation_field_control of the packet equals ‘00’ or ‘10’” means payload-less packets carry whatever CC the most recent payload packet had, and the next payload packet’s expected CC is one more than that.
Implementations§
Source§impl ContinuityTracker
impl ContinuityTracker
Sourcepub fn observe(
&mut self,
cc: u8,
has_payload: bool,
discontinuity_indicator: bool,
) -> ContinuityEvent
pub fn observe( &mut self, cc: u8, has_payload: bool, discontinuity_indicator: bool, ) -> ContinuityEvent
Observe one TS packet’s CC + adaptation-field info.
cc is the packet’s continuity_counter,
has_payload is true when adaptation_field_control has the
payload bit (0b01 or 0b11), and
discontinuity_indicator is the adaptation field’s flag
(false when there is no adaptation field).
Trait Implementations§
Source§impl Clone for ContinuityTracker
impl Clone for ContinuityTracker
Source§fn clone(&self) -> ContinuityTracker
fn clone(&self) -> ContinuityTracker
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContinuityTracker
impl Debug for ContinuityTracker
Source§impl Default for ContinuityTracker
impl Default for ContinuityTracker
Source§fn default() -> ContinuityTracker
fn default() -> ContinuityTracker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ContinuityTracker
impl RefUnwindSafe for ContinuityTracker
impl Send for ContinuityTracker
impl Sync for ContinuityTracker
impl Unpin for ContinuityTracker
impl UnsafeUnpin for ContinuityTracker
impl UnwindSafe for ContinuityTracker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more