pub struct PostProcessor { /* private fields */ }Expand description
Applies the three stages to every timestamp. SPEC.md 8.5.
Implementations§
Source§impl PostProcessor
impl PostProcessor
Sourcepub fn new() -> Self
pub fn new() -> Self
Build a post-processor with no stage enabled.
src/time_postprocessor.cpp:21-27 starts the last value at the lowest
possible number, so the first sample always passes the clamp.
Sourcepub fn set_halftime(&mut self, halftime: f64)
pub fn set_halftime(&mut self, halftime: f64)
Set the half-time of the jitter filter.
Sourcepub fn set_device_delay(&mut self, delay_s: f64)
pub fn set_device_delay(&mut self, delay_s: f64)
Set the calibrated device delay (in seconds) subtracted when
flags::DEVICE_DELAY is enabled (docs/roadmap.md, step 15).
Sourcepub fn device_delay(&self) -> f64
pub fn device_delay(&self) -> f64
The configured device delay in seconds.
Sourcepub fn dejitterer(&self) -> &Dejitterer
pub fn dejitterer(&self) -> &Dejitterer
The state of the jitter filter.
Sourcepub fn set_options(&mut self, options: u32)
pub fn set_options(&mut self, options: u32)
Choose the stages.
A change to a stage clears the state of that stage
(src/time_postprocessor.cpp:45-58).
Sourcepub fn process(&mut self, value: f64, src: &mut impl OffsetSource) -> f64
pub fn process(&mut self, value: f64, src: &mut impl OffsetSource) -> f64
Take one timestamp and return the processed value.
The order is clock sync, then jitter removal, then the clamp
(src/time_postprocessor.cpp:60-105).
Sourcepub fn skip_samples(&mut self, skipped: u32)
pub fn skip_samples(&mut self, skipped: u32)
Tell the filter that samples were skipped.