Struct y4m::Decoder [−][src]
pub struct Decoder<'d, R: Read + 'd> { /* fields omitted */ }
YUV4MPEG2 decoder.
Methods
impl<'d, R: Read> Decoder<'d, R>[src]
impl<'d, R: Read> Decoder<'d, R>pub fn new(reader: &mut R) -> Result<Decoder<R>, Error>[src]
pub fn new(reader: &mut R) -> Result<Decoder<R>, Error>Create a new decoder instance.
pub fn read_frame(&mut self) -> Result<Frame, Error>[src]
pub fn read_frame(&mut self) -> Result<Frame, Error>Iterate over frames, without extra heap allocations. End of input is
indicated by Error::EOF.
pub fn get_width(&self) -> usize[src]
pub fn get_width(&self) -> usizeReturn file width.
pub fn get_height(&self) -> usize[src]
pub fn get_height(&self) -> usizeReturn file height.
pub fn get_framerate(&self) -> Ratio[src]
pub fn get_framerate(&self) -> RatioReturn file framerate.
pub fn get_colorspace(&self) -> Colorspace[src]
pub fn get_colorspace(&self) -> ColorspaceReturn file colorspace.
NOTE: normally all .y4m should have colorspace param, but there are files encoded without that tag and it's unclear what should we do in that case. Currently C420 is implied by default as per ffmpeg behavior.
pub fn get_raw_params(&self) -> &[u8][src]
pub fn get_raw_params(&self) -> &[u8]Return file raw parameters.
pub fn get_bit_depth(&self) -> usize[src]
pub fn get_bit_depth(&self) -> usizeReturn the bit depth per sample
pub fn get_bytes_per_sample(&self) -> usize[src]
pub fn get_bytes_per_sample(&self) -> usizeReturn the number of bytes in a sample