pub struct PacketTrailerHandler { /* private fields */ }Expand description
Handler for packet trailer embedding/extraction on RTP streams.
Implementations§
Source§impl PacketTrailerHandler
impl PacketTrailerHandler
Sourcepub fn set_enabled(&self, enabled: bool)
pub fn set_enabled(&self, enabled: bool)
Enable/disable timestamp embedding.
Sourcepub fn lookup_timestamp(&self, rtp_timestamp: u32) -> u64
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().
Sourcepub fn last_lookup_frame_id(&self) -> u32
pub fn last_lookup_frame_id(&self) -> u32
Returns the frame_id from the most recent successful lookup_timestamp() call.
Sourcepub fn last_lookup_user_data(&self) -> Vec<u8> ⓘ
pub fn last_lookup_user_data(&self) -> Vec<u8> ⓘ
Returns the user_data from the most recent successful lookup_timestamp() call. Empty if none.
Sourcepub fn store_frame_metadata(
&self,
capture_timestamp_us: i64,
user_timestamp: u64,
frame_id: u32,
user_data: &[u8],
)
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).
Sourcepub fn set_publish_timing_observer(
&self,
observer: Box<VideoPublishTimingObserverWrapper>,
)
pub fn set_publish_timing_observer( &self, observer: Box<VideoPublishTimingObserverWrapper>, )
Set a callback for sender-side publish timing events.
Sourcepub fn clear_publish_timing_observer(&self)
pub fn clear_publish_timing_observer(&self)
Clear the sender-side publish timing callback.
Sourcepub fn set_subscribe_timing_observer(
&self,
observer: Box<VideoSubscribeTimingObserverWrapper>,
)
pub fn set_subscribe_timing_observer( &self, observer: Box<VideoSubscribeTimingObserverWrapper>, )
Set a callback for receiver-side subscribe timing events.
Sourcepub fn clear_subscribe_timing_observer(&self)
pub fn clear_subscribe_timing_observer(&self)
Clear the receiver-side subscribe timing callback.
Sourcepub fn emit_subscribe_timing(
&self,
stage: VideoSubscribeTimingStage,
user_timestamp: u64,
frame_id: u32,
)
pub fn emit_subscribe_timing( &self, stage: VideoSubscribeTimingStage, user_timestamp: u64, frame_id: u32, )
Emit a receiver-side subscribe timing event.