Skip to main content

PostProcessor

Struct PostProcessor 

Source
pub struct PostProcessor { /* private fields */ }
Expand description

Applies the three stages to every timestamp. SPEC.md 8.5.

Implementations§

Source§

impl PostProcessor

Source

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.

Source

pub fn set_halftime(&mut self, halftime: f64)

Set the half-time of the jitter filter.

Source

pub fn options(&self) -> u32

The current options.

Source

pub fn dejitterer(&self) -> &Dejitterer

The state of the jitter filter.

Source

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).

Source

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).

Source

pub fn skip_samples(&mut self, skipped: u32)

Tell the filter that samples were skipped.

Trait Implementations§

Source§

impl Default for PostProcessor

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.