Skip to main content

PacketTrailerHandler

Struct PacketTrailerHandler 

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

Handler for packet trailer embedding/extraction on RTP streams.

Implementations§

Source§

impl PacketTrailerHandler

Source

pub fn set_enabled(&self, enabled: bool)

Enable/disable timestamp embedding.

Source

pub fn enabled(&self) -> bool

Check if timestamp embedding is enabled.

Source

pub fn lookup_timestamp(&self, rtp_timestamp: u32) -> u64

Lookup the user timestamp for a given RTP timestamp (receiver side). Returns -1 if not found. The entry is removed after lookup. Also caches the frame_id for retrieval via last_lookup_frame_id().

Source

pub fn last_lookup_frame_id(&self) -> u32

Returns the frame_id from the most recent successful lookup_timestamp() call.

Source

pub fn last_lookup_user_data(&self) -> Vec<u8>

Returns the user_data from the most recent successful lookup_timestamp() call. Empty if none.

Source

pub fn store_frame_metadata( &self, capture_timestamp_us: i64, user_timestamp: u64, frame_id: u32, user_data: &[u8], )

Store frame metadata for a given capture timestamp (sender side).

Source

pub fn set_publish_timing_observer( &self, observer: Box<VideoPublishTimingObserverWrapper>, )

Set a callback for sender-side publish timing events.

Source

pub fn clear_publish_timing_observer(&self)

Clear the sender-side publish timing callback.

Source

pub fn set_subscribe_timing_observer( &self, observer: Box<VideoSubscribeTimingObserverWrapper>, )

Set a callback for receiver-side subscribe timing events.

Source

pub fn clear_subscribe_timing_observer(&self)

Clear the receiver-side subscribe timing callback.

Source

pub fn emit_subscribe_timing( &self, stage: VideoSubscribeTimingStage, user_timestamp: u64, frame_id: u32, )

Emit a receiver-side subscribe timing event.

Trait Implementations§

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.