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>

source§

impl<'a> RTPBuffer<'a, Writable>

source

pub fn from_buffer_writable( buffer: &'a mut BufferRef ) -> Result<RTPBuffer<'_, Writable>, BoolError>

source

pub fn set_seq(&mut self, seq: u16)

source

pub fn set_marker(&mut self, m: bool)

source

pub fn set_payload_type(&mut self, pt: u8)

source

pub fn set_ssrc(&mut self, ssrc: u32)

source

pub fn set_csrc(&mut self, idx: u8, ssrc: u32)

source

pub fn set_timestamp(&mut self, rtptime: u32)

source

pub fn set_extension(&mut self, extension: bool)

source

pub fn add_extension_onebyte_header( &mut self, id: u8, data: &[u8] ) -> Result<(), BoolError>

source

pub fn add_extension_twobytes_header( &mut self, appbits: u8, id: u8, data: &[u8] ) -> Result<(), BoolError>

source

pub fn remove_extension_data(&mut self)

source

pub fn set_padding(&mut self, padding: bool)

source§

impl<'a, T> RTPBuffer<'a, T>

source

pub fn seq(&self) -> u16

source

pub fn payload_type(&self) -> u8

source

pub fn ssrc(&self) -> u32

source

pub fn timestamp(&self) -> u32

source

pub fn csrc(&self, idx: u8) -> Option<u32>

source

pub fn csrc_count(&self) -> u8

source

pub fn is_marker(&self) -> bool

source

pub fn payload_size(&self) -> u32

source

pub fn payload(&self) -> Result<&[u8], BoolError>

source

pub fn payload_mut(&mut self) -> Result<&mut [u8], BoolError>

source

pub fn payload_buffer(&self) -> Result<Buffer, BoolError>

source

pub fn buffer(&self) -> &BufferRef

source

pub fn is_extension(&self) -> bool

source

pub fn extension_bytes(&self) -> Option<(u16, Bytes)>

source

pub fn extension_onebyte_header(&self, id: u8, nth: u32) -> Option<&[u8]>

source

pub fn extension_twobytes_header(&self, id: u8, nth: u32) -> Option<(u8, &[u8])>

source

pub fn has_padding(&self) -> bool

source

pub fn as_ptr(&self) -> *const GstRTPBuffer

source

pub fn as_mut_ptr(&self) -> *mut GstRTPBuffer

Trait Implementations§

source§

impl<'a, T> Debug for RTPBuffer<'a, T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a, T> Drop for RTPBuffer<'a, T>

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl<'a, T> Send for RTPBuffer<'a, T>

source§

impl<'a, T> Sync for RTPBuffer<'a, T>

Auto Trait Implementations§

§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.