Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

536 B
Raw Blame
use ffmpeg::{format, frame};

pub trait AudioEncoder {
    fn boxed(self) -> Box<dyn AudioEncoder + Send + 'static>
    where
        Self: Send + Sized + 'static,
    {
        Box::new(self)
    }

    fn send_frame(&mut self, frame: frame::Audio, output: &mut format::context::Output);
    fn try_send_frame(
        &mut self,
        frame: frame::Audio,
        output: &mut format::context::Output,
    ) -> Result<(), ffmpeg::Error>;
    fn flush(&mut self, output: &mut format::context::Output) -> Result<(), ffmpeg::Error>;
}