pub struct Decoder { /* private fields */ }Expand description
Implementations§
Source§impl Decoder
impl Decoder
Sourcepub fn time_base(&self) -> AvRational
pub fn time_base(&self) -> AvRational
Get decoder time base.
Sourcepub fn decode_raw_iter(
&mut self,
) -> impl Iterator<Item = Result<RawFrame, Error>> + '_
pub fn decode_raw_iter( &mut self, ) -> impl Iterator<Item = Result<RawFrame, Error>> + '_
Decode frames through iterator interface. This is similar to decode_raw but it returns
frames through an infinite iterator.
Sourcepub fn decode_raw(&mut self) -> Result<RawFrame, Error>
pub fn decode_raw(&mut self) -> Result<RawFrame, Error>
Sourcepub fn seek(&mut self, timestamp_milliseconds: i64) -> Result<(), Error>
pub fn seek(&mut self, timestamp_milliseconds: i64) -> Result<(), Error>
Seek in reader.
See Reader::seek for more information.
Sourcepub fn seek_to_frame(&mut self, frame_number: i64) -> Result<(), Error>
pub fn seek_to_frame(&mut self, frame_number: i64) -> Result<(), Error>
Seek to specific frame in reader.
See Reader::seek_to_frame for more information.
Sourcepub fn seek_to_start(&mut self) -> Result<(), Error>
pub fn seek_to_start(&mut self) -> Result<(), Error>
Seek to start of reader.
See Reader::seek_to_start for more information.
Sourcepub fn into_parts(self) -> (DecoderSplit, Reader, usize)
pub fn into_parts(self) -> (DecoderSplit, Reader, usize)
Split the decoder into a decoder (of type DecoderSplit) and a Reader.
This allows the caller to detach stream reading from decoding, which is useful for advanced use cases.
§Return value
Tuple of the DecoderSplit, Reader and the reader stream index.
Sourcepub fn size(&self) -> (u32, u32)
pub fn size(&self) -> (u32, u32)
Get the decoders input size (resolution dimensions): width and height.
Sourcepub fn size_out(&self) -> (u32, u32)
pub fn size_out(&self) -> (u32, u32)
Get the decoders output size after resizing is applied (resolution dimensions): width and height.
Sourcepub fn frame_rate(&self) -> f32
pub fn frame_rate(&self) -> f32
Get the decoders input frame rate as floating-point value.