pub struct Ffv1Decoder { /* private fields */ }Expand description
FFV1 decoder.
Implements the VideoDecoder trait for decoding FFV1 lossless video.
The decoder processes compressed packets and outputs decoded VideoFrames.
§Usage
ⓘ
use oximedia_codec::ffv1::Ffv1Decoder;
use oximedia_codec::VideoDecoder;
let mut decoder = Ffv1Decoder::new();
decoder.send_packet(&compressed_data, pts)?;
if let Some(frame) = decoder.receive_frame()? {
// Process decoded frame
}Implementations§
Source§impl Ffv1Decoder
impl Ffv1Decoder
Sourcepub fn with_extradata(extradata: &[u8]) -> CodecResult<Self>
pub fn with_extradata(extradata: &[u8]) -> CodecResult<Self>
Create a decoder initialized with extradata (configuration record).
Trait Implementations§
Source§impl VideoDecoder for Ffv1Decoder
impl VideoDecoder for Ffv1Decoder
Source§fn send_packet(&mut self, data: &[u8], pts: i64) -> CodecResult<()>
fn send_packet(&mut self, data: &[u8], pts: i64) -> CodecResult<()>
Send a compressed packet to the decoder. Read more
Source§fn receive_frame(&mut self) -> CodecResult<Option<VideoFrame>>
fn receive_frame(&mut self) -> CodecResult<Option<VideoFrame>>
Receive a decoded frame. Read more
Source§fn output_format(&self) -> Option<PixelFormat>
fn output_format(&self) -> Option<PixelFormat>
Get decoder output format.
Auto Trait Implementations§
impl Freeze for Ffv1Decoder
impl RefUnwindSafe for Ffv1Decoder
impl Send for Ffv1Decoder
impl Sync for Ffv1Decoder
impl Unpin for Ffv1Decoder
impl UnsafeUnpin for Ffv1Decoder
impl UnwindSafe for Ffv1Decoder
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