pub struct MjpegDecoder { /* private fields */ }Expand description
MJPEG decoder that produces RGB24 frames using a reusable buffer pool.
Implementations§
Source§impl MjpegDecoder
impl MjpegDecoder
Sourcepub fn new(output: FourCc) -> Self
pub fn new(output: FourCc) -> Self
Create a decoder that outputs the given FourCc (e.g. FourCc::new(*b"RG24")).
Sourcepub fn new_for_input(input: FourCc, output: FourCc) -> Self
pub fn new_for_input(input: FourCc, output: FourCc) -> Self
Create a decoder for a specific input FourCc (e.g. MJPG or JPEG).
Sourcepub fn with_pool(output: FourCc, pool: BufferPool) -> Self
pub fn with_pool(output: FourCc, pool: BufferPool) -> Self
Create a decoder with a caller-provided buffer pool.
Sourcepub fn with_pool_for_input(
input: FourCc,
output: FourCc,
pool: BufferPool,
) -> Self
pub fn with_pool_for_input( input: FourCc, output: FourCc, pool: BufferPool, ) -> Self
Create a decoder for a specific input FourCc using a caller-provided buffer pool.
Trait Implementations§
Source§impl Codec for MjpegDecoder
impl Codec for MjpegDecoder
Source§fn descriptor(&self) -> &CodecDescriptor
fn descriptor(&self) -> &CodecDescriptor
Describes what this codec expects and produces.
Source§fn process(&self, input: FrameLease) -> Result<FrameLease, CodecError>
fn process(&self, input: FrameLease) -> Result<FrameLease, CodecError>
Process a frame and return the transformed frame. Read more
Auto Trait Implementations§
impl Freeze for MjpegDecoder
impl RefUnwindSafe for MjpegDecoder
impl Send for MjpegDecoder
impl Sync for MjpegDecoder
impl Unpin for MjpegDecoder
impl UnwindSafe for MjpegDecoder
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