EncoderInput

Trait EncoderInput 

Source
pub trait EncoderInput {
    // Required method
    fn encode(
        self,
        encoder: &mut Encoder,
        output_buf: *mut u8,
        output_len: usize,
    ) -> c_int;
}
Expand description

Type of PCM input for encoder

Please note that while you can implement your own trait, it is your responsibility to ensure that encode function is correct and safe.

Required Methods§

Source

fn encode( self, encoder: &mut Encoder, output_buf: *mut u8, output_len: usize, ) -> c_int

Encodes self using provided encoder.

§Arguments
  • output_buf - is guaranteed to never to be null;
  • output_len - is guaranteed to be capacity of memory pointed by output_buf.
§Returns

Zero or positive integer to indicate success and number of bytes written.

Implementors§