pub struct Repacketizer { /* private fields */ }Expand description
opus_repacketizer: accumulate frames from one or more same-config packets, then emit them as a single re-framed packet.
Implementations§
Source§impl Repacketizer
impl Repacketizer
pub fn new() -> Self
pub fn nb_frames(&self) -> usize
Sourcepub fn cat(&mut self, data: &[u8]) -> Result<(), &'static str>
pub fn cat(&mut self, data: &[u8]) -> Result<(), &'static str>
Append the frames of data (opus_repacketizer_cat). Errors if the TOC
config differs from frames already held, or the 120 ms cap is exceeded.
Sourcepub fn out_range(
&self,
begin: usize,
end: usize,
) -> Result<Vec<u8>, &'static str>
pub fn out_range( &self, begin: usize, end: usize, ) -> Result<Vec<u8>, &'static str>
Emit frames [begin, end) as one packet (opus_repacketizer_out_range).
Trait Implementations§
Source§impl Default for Repacketizer
impl Default for Repacketizer
Source§fn default() -> Repacketizer
fn default() -> Repacketizer
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Repacketizer
impl RefUnwindSafe for Repacketizer
impl Send for Repacketizer
impl Sync for Repacketizer
impl Unpin for Repacketizer
impl UnsafeUnpin 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