Struct gstreamer_rtp::rtp_buffer::RTPBuffer
source · pub struct RTPBuffer<'a, T> { /* private fields */ }
Expand description
The GstRTPBuffer helper functions makes it easy to parse and create regular
gst::Buffer
objects that contain RTP payloads. These buffers are typically of
‘application/x-rtp’ gst::Caps
.
Implementations§
source§impl<'a> RTPBuffer<'a, Readable>
impl<'a> RTPBuffer<'a, Readable>
pub fn from_buffer_readable( buffer: &'a BufferRef, ) -> Result<RTPBuffer<'_, Readable>, BoolError>
pub unsafe fn from_glib_borrow<'b>( rtp_buffer: *mut GstRTPBuffer, ) -> Borrowed<RTPBuffer<'b, Readable>>
source§impl<'a> RTPBuffer<'a, Writable>
impl<'a> RTPBuffer<'a, Writable>
pub fn from_buffer_writable( buffer: &'a mut BufferRef, ) -> Result<RTPBuffer<'_, Writable>, BoolError>
pub fn set_seq(&mut self, seq: u16)
pub fn set_marker(&mut self, m: bool)
pub fn set_payload_type(&mut self, pt: u8)
pub fn set_ssrc(&mut self, ssrc: u32)
pub fn set_csrc(&mut self, idx: u8, ssrc: u32)
pub fn set_timestamp(&mut self, rtptime: u32)
pub fn set_extension(&mut self, extension: bool)
pub fn add_extension_onebyte_header( &mut self, id: u8, data: &[u8], ) -> Result<(), BoolError>
pub fn add_extension_twobytes_header( &mut self, appbits: u8, id: u8, data: &[u8], ) -> Result<(), BoolError>
pub fn remove_extension_data(&mut self)
pub fn set_padding(&mut self, padding: bool)
source§impl<'a, T> RTPBuffer<'a, T>
impl<'a, T> RTPBuffer<'a, T>
pub fn seq(&self) -> u16
pub fn payload_type(&self) -> u8
pub fn ssrc(&self) -> u32
pub fn timestamp(&self) -> u32
pub fn csrc(&self, idx: u8) -> Option<u32>
pub fn csrc_count(&self) -> u8
pub fn is_marker(&self) -> bool
pub fn payload_size(&self) -> u32
pub fn payload(&self) -> Result<&[u8], BoolError>
pub fn payload_mut(&mut self) -> Result<&mut [u8], BoolError>
pub fn payload_buffer(&self) -> Result<Buffer, BoolError>
pub fn buffer(&self) -> &BufferRef
pub fn is_extension(&self) -> bool
pub fn extension_bytes(&self) -> Option<(u16, Bytes)>
pub fn extension_onebyte_header(&self, id: u8, nth: u32) -> Option<&[u8]>
pub fn extension_twobytes_header(&self, id: u8, nth: u32) -> Option<(u8, &[u8])>
pub fn has_padding(&self) -> bool
pub fn as_ptr(&self) -> *const GstRTPBuffer
pub fn as_mut_ptr(&self) -> *mut GstRTPBuffer
Trait Implementations§
impl<'a, T> Send for RTPBuffer<'a, T>
impl<'a, T> Sync for RTPBuffer<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for RTPBuffer<'a, T>
impl<'a, T> RefUnwindSafe for RTPBuffer<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Unpin for RTPBuffer<'a, T>
impl<'a, T> UnwindSafe for RTPBuffer<'a, T>where
T: RefUnwindSafe,
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
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more