Struct opus::RepacketizerState [] [src]

pub struct RepacketizerState<'rp, 'buf> {
    // some fields omitted
}

An in-progress repacketization.

Methods

impl<'rp, 'buf> RepacketizerState<'rp, 'buf>
[src]

fn cat(&mut self, packet: &'buf [u8]) -> Result<()>

Add a packet to the current repacketizer state.

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.

fn get_nb_frames(&mut self) -> usize

Get the total number of frames contained in packet data submitted so far via cat.

fn out(&mut self, buffer: &mut [u8]) -> Result<usize>

Construct a new packet from data previously submitted via cat.

All previously submitted frames are used.

fn out_range(&mut self, begin: usize, end: usize, buffer: &mut [u8]) -> Result<usize>

Construct a new packet from data previously submitted via cat, with a manually specified subrange.

The end index should not exceed the value of get_nb_frames().