#[non_exhaustive]pub enum PcrRestamp {
Interpolate,
FromBitrate {
bps: u64,
},
}Expand description
PCR restamp mode.
#[non_exhaustive] — new modes (e.g. from_external_clock) may be added
in future releases without a breaking change.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Interpolate
Interpolate PCRs from each PID’s first anchor + observed inter-PCR rate (best-effort smoothing of jitter; preserves observed values where sane).
FromBitrate
Recompute PCRs from a fixed bitrate (bits per second), per PID:
PCR = anchor + (packets_since_anchor × 188 × 8 / bitrate) × 27_000_000.
Robust against corrupted PCR values (ignores the observed value).
Implementations§
Source§impl PcrRestamp
impl PcrRestamp
Sourcepub fn interpolate() -> Self
pub fn interpolate() -> Self
Interpolate PCRs from each PID’s anchor + observed rate (jitter smoothing).
§Example
use ts_fix::PcrRestamp;
let cfg = PcrRestamp::interpolate();Sourcepub fn from_bitrate(bps: u64) -> Self
pub fn from_bitrate(bps: u64) -> Self
Recompute PCRs from a fixed bitrate (bits/second) — robust repair.
§Example
use ts_fix::PcrRestamp;
let cfg = PcrRestamp::from_bitrate(27_000_000);Trait Implementations§
Source§impl Clone for PcrRestamp
impl Clone for PcrRestamp
Source§fn clone(&self) -> PcrRestamp
fn clone(&self) -> PcrRestamp
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 moreAuto Trait Implementations§
impl Freeze for PcrRestamp
impl RefUnwindSafe for PcrRestamp
impl Send for PcrRestamp
impl Sync for PcrRestamp
impl Unpin for PcrRestamp
impl UnsafeUnpin for PcrRestamp
impl UnwindSafe for PcrRestamp
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