pub struct RtpPacket {
pub payload_type: u8,
pub seq: u16,
pub timestamp: u32,
pub ssrc: u32,
pub marker: bool,
pub payload: Vec<u8>,
}Expand description
A parsed inbound RTP packet (the fields [SipTransport] cares about).
crate::sip::transport::SipTransport uses seq for the jitter buffer,
payload_type to choose μ-law vs A-law decode, and payload as the G.711
bytes. timestamp/ssrc/marker are parsed for completeness (and tests).
Fields§
§payload_type: u8Payload type (0 = PCMU, 8 = PCMA for our G.711-only path).
seq: u1616-bit sequence number (wraps; used to reorder/dedupe in the jitter buffer).
timestamp: u3232-bit media timestamp (G.711: +160 per 20 ms frame).
ssrc: u32Synchronization source identifier.
marker: boolThe RTP marker bit (M). Unused for G.711 but parsed for completeness.
payload: Vec<u8>The codec payload bytes (G.711 μ-law / A-law samples, one byte each).
Trait Implementations§
impl Eq for RtpPacket
impl StructuralPartialEq for RtpPacket
Auto Trait Implementations§
impl Freeze for RtpPacket
impl RefUnwindSafe for RtpPacket
impl Send for RtpPacket
impl Sync for RtpPacket
impl Unpin for RtpPacket
impl UnsafeUnpin for RtpPacket
impl UnwindSafe for RtpPacket
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.