pub struct TimestampMapper { /* private fields */ }Expand description
Manages timestamp mappings between multiple streams
Implementations§
Source§impl TimestampMapper
impl TimestampMapper
Sourcepub fn register_stream(
&self,
ssrc: RtpSsrc,
clock_rate: u32,
initial_rtp: RtpTimestamp,
)
pub fn register_stream( &self, ssrc: RtpSsrc, clock_rate: u32, initial_rtp: RtpTimestamp, )
Register a new stream with its clock rate
Sourcepub fn update_from_sr(
&self,
ssrc: RtpSsrc,
ntp: NtpTimestamp,
rtp: RtpTimestamp,
)
pub fn update_from_sr( &self, ssrc: RtpSsrc, ntp: NtpTimestamp, rtp: RtpTimestamp, )
Update stream timing information from an RTCP sender report
Sourcepub fn map_streams(
&self,
source_ssrc: RtpSsrc,
target_ssrc: RtpSsrc,
source_rtp: RtpTimestamp,
target_rtp: RtpTimestamp,
ntp: NtpTimestamp,
) -> Option<f64>
pub fn map_streams( &self, source_ssrc: RtpSsrc, target_ssrc: RtpSsrc, source_rtp: RtpTimestamp, target_rtp: RtpTimestamp, ntp: NtpTimestamp, ) -> Option<f64>
Create or update a mapping between two streams
Sourcepub fn map_timestamp(
&self,
source_ssrc: RtpSsrc,
target_ssrc: RtpSsrc,
source_rtp: RtpTimestamp,
) -> Option<RtpTimestamp>
pub fn map_timestamp( &self, source_ssrc: RtpSsrc, target_ssrc: RtpSsrc, source_rtp: RtpTimestamp, ) -> Option<RtpTimestamp>
Map a timestamp from one stream to another
Sourcepub fn get_drift(
&self,
source_ssrc: RtpSsrc,
target_ssrc: RtpSsrc,
) -> Option<f64>
pub fn get_drift( &self, source_ssrc: RtpSsrc, target_ssrc: RtpSsrc, ) -> Option<f64>
Get estimated clock drift between two streams in PPM
Sourcepub fn rtp_to_wallclock(
&self,
ssrc: RtpSsrc,
rtp: RtpTimestamp,
) -> Option<Instant>
pub fn rtp_to_wallclock( &self, ssrc: RtpSsrc, rtp: RtpTimestamp, ) -> Option<Instant>
Convert an RTP timestamp to wall clock time
Sourcepub fn wallclock_to_rtp(
&self,
ssrc: RtpSsrc,
time: Instant,
) -> Option<RtpTimestamp>
pub fn wallclock_to_rtp( &self, ssrc: RtpSsrc, time: Instant, ) -> Option<RtpTimestamp>
Convert wall clock time to an RTP timestamp
Trait Implementations§
Source§impl Clone for TimestampMapper
impl Clone for TimestampMapper
Source§fn clone(&self) -> TimestampMapper
fn clone(&self) -> TimestampMapper
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 TimestampMapper
impl RefUnwindSafe for TimestampMapper
impl Send for TimestampMapper
impl Sync for TimestampMapper
impl Unpin for TimestampMapper
impl UnwindSafe for TimestampMapper
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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