pub struct ImageEncoder { /* private fields */ }Expand description
Image encoder for converting video frames to image files.
Implementations§
Source§impl ImageEncoder
impl ImageEncoder
Sourcepub const fn new(config: EncoderConfig) -> Self
pub const fn new(config: EncoderConfig) -> Self
Create a new image encoder.
Sourcepub fn encode(&self, frame: &VideoFrame) -> CodecResult<Vec<u8>>
pub fn encode(&self, frame: &VideoFrame) -> CodecResult<Vec<u8>>
Encode a video frame to image data.
§Errors
Returns error if encoding fails or frame format is unsupported.
Auto Trait Implementations§
impl Freeze for ImageEncoder
impl RefUnwindSafe for ImageEncoder
impl Send for ImageEncoder
impl Sync for ImageEncoder
impl Unpin for ImageEncoder
impl UnsafeUnpin for ImageEncoder
impl UnwindSafe for ImageEncoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more