Trait av_metrics_decoders::Decoder [−][src]
pub trait Decoder: Send {
fn read_video_frame<T>(&mut self) -> Option<FrameInfo<T>>
where
T: Pixel;
fn get_bit_depth(&self) -> usize;
fn get_video_details(&self) -> VideoDetails;
fn read_specific_frame<T>(
&mut self,
frame_number: usize
) -> Option<FrameInfo<T>>
where
T: Pixel,
{ ... }
}
Expand description
A trait for allowing metrics to decode generic video formats.
Currently, y4m decoding support using the y4m
crate is built-in
to this crate. This trait is extensible so users may implement
their own decoders.
Required methods
fn read_video_frame<T>(&mut self) -> Option<FrameInfo<T>> where
T: Pixel,
fn read_video_frame<T>(&mut self) -> Option<FrameInfo<T>> where
T: Pixel,
Read the next frame from the input video.
Expected to return Err
if the end of the video is reached.
fn get_bit_depth(&self) -> usize
fn get_bit_depth(&self) -> usize
Get the bit depth of the video.
fn get_video_details(&self) -> VideoDetails
fn get_video_details(&self) -> VideoDetails
Get the Video Details