[−][src]Struct y4m::Decoder
YUV4MPEG2 decoder.
Methods
impl<'d, R: Read> Decoder<'d, R>
[src]
pub fn new(reader: &mut R) -> Result<Decoder<R>, Error>
[src]
Create a new decoder instance.
pub fn read_frame(&mut self) -> Result<Frame, Error>
[src]
Iterate over frames, without extra heap allocations. End of input is
indicated by Error::EOF
.
pub fn get_width(&self) -> usize
[src]
Return file width.
pub fn get_height(&self) -> usize
[src]
Return file height.
pub fn get_framerate(&self) -> Ratio
[src]
Return file framerate.
pub fn get_colorspace(&self) -> Colorspace
[src]
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]
Return file raw parameters.
pub fn get_bit_depth(&self) -> usize
[src]
Return the bit depth per sample
pub fn get_bytes_per_sample(&self) -> usize
[src]
Return the number of bytes in a sample
Auto Trait Implementations
impl<'d, R> Send for Decoder<'d, R> where
R: Send,
R: Send,
impl<'d, R> Sync for Decoder<'d, R> where
R: Sync,
R: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,