pub struct Repacketizer { /* private fields */ }Expand description
Repacketizer can be used to merge multiple Opus packets into a single packet or alternatively to split Opus packets that have previously been merged
Implementations§
Source§impl Repacketizer
impl Repacketizer
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Re-initializes this Repacketizer state, resetting ongoing progress, if any.
Sourcepub fn start<'a, 'buf>(&'a mut self) -> OngoingRepacketizer<'a, 'buf>
pub fn start<'a, 'buf>(&'a mut self) -> OngoingRepacketizer<'a, 'buf>
Starts new repacketizer process, resetting self in the process.
Sourcepub fn combine_all(
&mut self,
bufs: &[&[u8]],
out: &mut [MaybeUninit<u8>],
) -> Result<usize, ErrorCode>
pub fn combine_all( &mut self, bufs: &[&[u8]], out: &mut [MaybeUninit<u8>], ) -> Result<usize, ErrorCode>
Takes all bufs combining it into single packet
This is shortcut to using start.
Trait Implementations§
impl Send for Repacketizer
Auto Trait Implementations§
impl Freeze for Repacketizer
impl RefUnwindSafe for Repacketizer
impl !Sync for Repacketizer
impl Unpin for Repacketizer
impl UnwindSafe for Repacketizer
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