[−][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 new_with_limits(
reader: &mut R,
limits: Limits
) -> Result<Decoder<R>, Error>
[src]
reader: &mut R,
limits: Limits
) -> Result<Decoder<R>, Error>
Create a new decoder instance with custom limits.
pub fn read_frame(&mut self) -> Result<Frame, Error>
[src]
Iterate over frames. 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,
impl<'d, R> Unpin for Decoder<'d, R>
impl<'d, R> !UnwindSafe for Decoder<'d, R>
impl<'d, R> RefUnwindSafe for Decoder<'d, R> where
R: RefUnwindSafe,
R: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
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,