Struct retina::rtp::ReceivedPacket
source · pub struct ReceivedPacket { /* private fields */ }
Expand description
A received RTP packet.
This holds more information than the packet itself: also a
PacketContext
, the stream, and extended timestamp.
Implementations§
source§impl ReceivedPacket
impl ReceivedPacket
pub fn timestamp(&self) -> Timestamp
pub fn mark(&self) -> bool
pub fn ctx(&self) -> &PacketContext
pub fn stream_id(&self) -> usize
pub fn ssrc(&self) -> u32
pub fn sequence_number(&self) -> u16
pub fn loss(&self) -> u16
sourcepub fn into_payload_bytes(self) -> Bytes
pub fn into_payload_bytes(self) -> Bytes
Consumes the ReceivedPacket
and returns the Payload
as a Bytes
.
This is currently is very efficient (no copying or reference-counting), although that is not an API guarantee.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for ReceivedPacket
impl RefUnwindSafe for ReceivedPacket
impl Send for ReceivedPacket
impl Sync for ReceivedPacket
impl Unpin for ReceivedPacket
impl UnwindSafe for ReceivedPacket
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