pub trait Encoder: InternalEncoder{
type Cfg;
// Provided methods
fn set_cfg(&mut self, cfg: Self::Cfg) -> Result<(), Error> { ... }
fn encode(
&mut self,
image: &Image<'_>,
pts: vpx_codec_pts_t,
duration: u64,
flags: FrameFlags,
deadline: u64,
) -> Result<(), Error> { ... }
fn flush(
&mut self,
pts: vpx_codec_pts_t,
duration: u64,
flags: vpx_enc_frame_flags_t,
deadline: u64,
) -> Result<(), Error> { ... }
fn packets<T: PacketWriter>(&mut self, dest: &mut T) -> Result<(), Error> { ... }
}Required Associated Types§
Provided Methods§
fn set_cfg(&mut self, cfg: Self::Cfg) -> Result<(), Error>
Sourcefn encode(
&mut self,
image: &Image<'_>,
pts: vpx_codec_pts_t,
duration: u64,
flags: FrameFlags,
deadline: u64,
) -> Result<(), Error>
fn encode( &mut self, image: &Image<'_>, pts: vpx_codec_pts_t, duration: u64, flags: FrameFlags, deadline: u64, ) -> Result<(), Error>
duration must be non-zero.
Sourcefn flush(
&mut self,
pts: vpx_codec_pts_t,
duration: u64,
flags: vpx_enc_frame_flags_t,
deadline: u64,
) -> Result<(), Error>
fn flush( &mut self, pts: vpx_codec_pts_t, duration: u64, flags: vpx_enc_frame_flags_t, deadline: u64, ) -> Result<(), Error>
Call once there are no more frames to encode.
fn packets<T: PacketWriter>(&mut self, dest: &mut T) -> Result<(), Error>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".