pub trait ProcessingThread: StartVideoEncoder {
// Required method
fn process(&mut self, frame: RawVideoFrame) -> Result<()>;
// Provided methods
fn thread_setup(&mut self) -> Result<()> { ... }
fn thread_teardown(&mut self) -> Result<()> { ... }
}
Expand description
Implemented for all VideoEncoders which use a normal processing thread
ProcessingThread::process
will be called with each frame
Required Methods§
Sourcefn process(&mut self, frame: RawVideoFrame) -> Result<()>
fn process(&mut self, frame: RawVideoFrame) -> Result<()>
Process a single raw frame this is called from inside the thread started by self.start
Provided Methods§
fn thread_setup(&mut self) -> Result<()>
fn thread_teardown(&mut self) -> Result<()>
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.