Trait afi::EncoderA [−][src]
pub trait EncoderA where
Self: Sized, { fn new(audio: &Audio) -> Self; fn run(&mut self, audio: &mut Audio) -> Vec<u8>; fn end(self) -> Vec<u8>; }
A trait for implementing encoding audio.
Required Methods
fn new(audio: &Audio) -> Self
Create a new encoder for this audio.
fn run(&mut self, audio: &mut Audio) -> Vec<u8>
Encode a frame (2000 samples / 24fps) and return appended data.
fn end(self) -> Vec<u8>
Finish the encoding and return appended data.