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) -> usize
Return file width.
pub fn get_height(&self) -> usize
[src]
pub fn get_height(&self) -> usize
Return file height.
pub fn get_framerate(&self) -> Ratio
[src]
pub fn get_framerate(&self) -> Ratio
Return file framerate.
pub fn get_colorspace(&self) -> Colorspace
[src]
pub fn get_colorspace(&self) -> Colorspace
Return 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) -> usize
Return the bit depth per sample
pub fn get_bytes_per_sample(&self) -> usize
[src]
pub fn get_bytes_per_sample(&self) -> usize
Return the number of bytes in a sample