pub trait CaptureFrame {
// Required method
fn capture(
&mut self,
pixels: &PixelSlice<'_>,
config: &CodecConfig,
timing: FrameTiming,
) -> Result<Frame, BoxedError>;
}Expand description
Makes a frame from packed pixels: the step between the animation API and a video encoder.
Required Methods§
Sourcefn capture(
&mut self,
pixels: &PixelSlice<'_>,
config: &CodecConfig,
timing: FrameTiming,
) -> Result<Frame, BoxedError>
fn capture( &mut self, pixels: &PixelSlice<'_>, config: &CodecConfig, timing: FrameTiming, ) -> Result<Frame, BoxedError>
A frame holding pixels with timing, in the layout the encoder
configured by config takes.
§Errors
When the pixels cannot be converted.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".