pub struct DriftConfig {
pub frame_rate: FrameRate,
pub tolerance_frames: u32,
pub min_samples: usize,
pub ppm_threshold: f64,
}Expand description
Configuration for drift detection.
Fields§
§frame_rate: FrameRateFrame rate of the timecode source.
tolerance_frames: u32Maximum acceptable drift in frames before correction is recommended.
min_samples: usizeMinimum number of samples before analysis is valid.
ppm_threshold: f64PPM threshold above which rate-adjust is recommended.
Implementations§
Source§impl DriftConfig
impl DriftConfig
Sourcepub fn new(frame_rate: FrameRate) -> Self
pub fn new(frame_rate: FrameRate) -> Self
Creates a default configuration for the given frame rate.
Sourcepub fn with_tolerance(self, frames: u32) -> Self
pub fn with_tolerance(self, frames: u32) -> Self
Sets the tolerance in frames.
Sourcepub fn with_min_samples(self, n: usize) -> Self
pub fn with_min_samples(self, n: usize) -> Self
Sets the minimum sample count.
Sourcepub fn with_ppm_threshold(self, ppm: f64) -> Self
pub fn with_ppm_threshold(self, ppm: f64) -> Self
Sets the PPM threshold.
Trait Implementations§
Source§impl Clone for DriftConfig
impl Clone for DriftConfig
Source§fn clone(&self) -> DriftConfig
fn clone(&self) -> DriftConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 DriftConfig
impl RefUnwindSafe for DriftConfig
impl Send for DriftConfig
impl Sync for DriftConfig
impl Unpin for DriftConfig
impl UnsafeUnpin for DriftConfig
impl UnwindSafe for DriftConfig
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