Struct opus::RepacketizerState
source · [−]pub struct RepacketizerState<'rp, 'buf> { /* private fields */ }
Expand description
An in-progress repacketization.
Implementations
sourceimpl<'rp, 'buf> RepacketizerState<'rp, 'buf>
impl<'rp, 'buf> RepacketizerState<'rp, 'buf>
sourcepub fn cat(&mut self, packet: &'buf [u8]) -> Result<()>
pub fn cat(&mut self, packet: &'buf [u8]) -> Result<()>
Add a packet to the current repacketizer state.
sourcepub fn cat_move<'b2>(
self,
packet: &'b2 [u8]
) -> Result<RepacketizerState<'rp, 'b2>> where
'buf: 'b2,
pub fn cat_move<'b2>(
self,
packet: &'b2 [u8]
) -> Result<RepacketizerState<'rp, 'b2>> where
'buf: 'b2,
Add a packet to the current repacketizer state, moving it.
sourcepub fn get_nb_frames(&mut self) -> usize
pub fn get_nb_frames(&mut self) -> usize
Get the total number of frames contained in packet data submitted so
far via cat
.
Trait Implementations
Auto Trait Implementations
impl<'rp, 'buf> RefUnwindSafe for RepacketizerState<'rp, 'buf>
impl<'rp, 'buf> Send for RepacketizerState<'rp, 'buf>
impl<'rp, 'buf> !Sync for RepacketizerState<'rp, 'buf>
impl<'rp, 'buf> Unpin for RepacketizerState<'rp, 'buf>
impl<'rp, 'buf> !UnwindSafe for RepacketizerState<'rp, 'buf>
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