Trait EncoderAV

Source
pub trait EncoderAV
where Self: Sized,
{ // Required methods fn new(video: &Video, audio: &Audio) -> Self; fn run(&mut self, audio: &mut Audio, video: &mut Video) -> Vec<u8> ; fn end(self) -> Vec<u8> ; }
Expand description

A trait for implementing encoding audio and video together.

Required Methods§

Source

fn new(video: &Video, audio: &Audio) -> Self

Create a new encoder for this audiovideo

Source

fn run(&mut self, audio: &mut Audio, video: &mut Video) -> Vec<u8>

Encode a frame (2000 samples / 24fps) and return appended data.

Source

fn end(self) -> Vec<u8>

Finish the encoding and return appended data.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§