pub struct VideoDecoder(/* private fields */);
Expand description
A video decoder.
Implementations§
Source§impl VideoDecoder
impl VideoDecoder
Sourcepub const fn pixel_format(&self) -> AVPixelFormat
pub const fn pixel_format(&self) -> AVPixelFormat
Returns the pixel format of the video frame.
Sourcepub fn frame_rate(&self) -> Rational
pub fn frame_rate(&self) -> Rational
Returns the frame rate of the video frame.
Sourcepub fn sample_aspect_ratio(&self) -> Rational
pub fn sample_aspect_ratio(&self) -> Rational
Returns the sample aspect ratio of the video frame.
Sourcepub fn receive_frame(&mut self) -> Result<Option<VideoFrame>, FfmpegError>
pub fn receive_frame(&mut self) -> Result<Option<VideoFrame>, FfmpegError>
Receives a frame from the decoder.
Methods from Deref<Target = GenericDecoder>§
Sourcepub fn codec_type(&self) -> AVMediaType
pub fn codec_type(&self) -> AVMediaType
Returns the codec type of the decoder.
Sourcepub fn time_base(&self) -> Option<Rational>
pub fn time_base(&self) -> Option<Rational>
Returns the time base of the decoder or None
if the denominator is zero.
Sourcepub fn send_packet(&mut self, packet: &Packet) -> Result<(), FfmpegError>
pub fn send_packet(&mut self, packet: &Packet) -> Result<(), FfmpegError>
Sends a packet to the decoder.
Sourcepub fn send_eof(&mut self) -> Result<(), FfmpegError>
pub fn send_eof(&mut self) -> Result<(), FfmpegError>
Sends an end-of-file packet to the decoder.
Sourcepub fn receive_frame(&mut self) -> Result<Option<GenericFrame>, FfmpegError>
pub fn receive_frame(&mut self) -> Result<Option<GenericFrame>, FfmpegError>
Receives a frame from the decoder.
Trait Implementations§
Source§impl Debug for VideoDecoder
impl Debug for VideoDecoder
Source§impl Deref for VideoDecoder
impl Deref for VideoDecoder
Auto Trait Implementations§
impl Freeze for VideoDecoder
impl RefUnwindSafe for VideoDecoder
impl Send for VideoDecoder
impl !Sync for VideoDecoder
impl Unpin for VideoDecoder
impl UnwindSafe for VideoDecoder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more