pub struct GenericDecoder { /* private fields */ }
Expand description
A generic decoder that can be used to decode any type of media.
Implementations§
Source§impl GenericDecoder
impl GenericDecoder
Sourcepub const fn codec_type(&self) -> AVMediaType
pub const fn codec_type(&self) -> AVMediaType
Returns the codec type of the decoder.
Sourcepub const fn time_base(&self) -> Option<Rational>
pub const 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 GenericDecoder
impl Debug for GenericDecoder
impl Send for GenericDecoder
Safety: GenericDecoder
can be sent between threads.
Auto Trait Implementations§
impl Freeze for GenericDecoder
impl RefUnwindSafe for GenericDecoder
impl !Sync for GenericDecoder
impl Unpin for GenericDecoder
impl UnwindSafe for GenericDecoder
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