pub struct RtpHeader { /* private fields */ }
Expand description
RTP header.
Implementations
sourceimpl RtpHeader
impl RtpHeader
sourcepub fn decode(data: &mut Bytes) -> Result<Self, InvalidInput>
pub fn decode(data: &mut Bytes) -> Result<Self, InvalidInput>
Decode an RTP header from given data.
sourcepub fn with_padding(self, padding: bool) -> Self
pub fn with_padding(self, padding: bool) -> Self
Set the padding bit.
sourcepub fn extension(&self) -> Option<&RtpHeaderExtension>
pub fn extension(&self) -> Option<&RtpHeaderExtension>
Check if there is an RTP header extension.
sourcepub fn with_extension(self, extension: Option<RtpHeaderExtension>) -> Self
pub fn with_extension(self, extension: Option<RtpHeaderExtension>) -> Self
Set the extension bit.
sourcepub fn with_marker(self, marker: bool) -> Self
pub fn with_marker(self, marker: bool) -> Self
Set the marker bit.
sourcepub fn payload_type(&self) -> u8
pub fn payload_type(&self) -> u8
Get RTP payload type.
Note: Only the lower 7 bits are used.
sourcepub fn with_payload_type(self, payload_type: u8) -> Self
pub fn with_payload_type(self, payload_type: u8) -> Self
sourcepub fn sequence_number(&self) -> u16
pub fn sequence_number(&self) -> u16
Get RTP sequence number.
sourcepub fn with_sequence_number(self, n: u16) -> Self
pub fn with_sequence_number(self, n: u16) -> Self
Set the sequence number.
sourcepub fn with_timestamp(self, timestamp: u32) -> Self
pub fn with_timestamp(self, timestamp: u32) -> Self
Set RTP timestamp.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for RtpHeader
impl Send for RtpHeader
impl Sync for RtpHeader
impl Unpin for RtpHeader
impl UnwindSafe for RtpHeader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more