pub struct RtpSendConfig {
pub payload_type: u8,
pub ssrc: u32,
pub initial_seq: u16,
pub initial_timestamp: u32,
pub samples_per_frame: u32,
}Expand description
Initial RTP state when starting a send_loop. Hold it across calls
only if you intend to resume a stream — for a fresh call, pick a new
ssrc and fresh seq / timestamp (random per RFC 3550 §5.1).
Fields§
§payload_type: u8Static RTP payload type — 0 for PCMU, 8 for PCMA, etc.
ssrc: u32Synchronization source. One per call; pick fresh randomness so the remote can distinguish streams that re-use the same 5-tuple.
initial_seq: u16Initial RTP sequence number. Wraps at u16 by spec.
initial_timestamp: u32Initial RTP timestamp. The clock domain is the codec’s sample rate — 8000 Hz for G.711 — not the audio device rate.
samples_per_frame: u32Amount to advance the RTP timestamp per packet. For 20 ms G.711 frames that’s 160 (= 8 kHz × 20 ms).
Trait Implementations§
Source§impl Clone for RtpSendConfig
impl Clone for RtpSendConfig
Source§fn clone(&self) -> RtpSendConfig
fn clone(&self) -> RtpSendConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RtpSendConfig
impl Debug for RtpSendConfig
impl Copy for RtpSendConfig
Auto Trait Implementations§
impl Freeze for RtpSendConfig
impl RefUnwindSafe for RtpSendConfig
impl Send for RtpSendConfig
impl Sync for RtpSendConfig
impl Unpin for RtpSendConfig
impl UnsafeUnpin for RtpSendConfig
impl UnwindSafe for RtpSendConfig
Blanket Implementations§
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