pub enum Decoder {
Video(VideoDecoder),
Audio(AudioDecoder),
}
Expand description
Either a VideoDecoder
or an AudioDecoder
.
This is the most common way to interact with decoders.
Variants§
Implementations§
Source§impl Decoder
impl Decoder
Sourcepub fn new(ist: &Stream<'_>) -> Result<Self, FfmpegError>
pub fn new(ist: &Stream<'_>) -> Result<Self, FfmpegError>
Creates a new Decoder
with the default options.
Sourcepub fn with_options(
ist: &Stream<'_>,
options: DecoderOptions,
) -> Result<Self, FfmpegError>
pub fn with_options( ist: &Stream<'_>, options: DecoderOptions, ) -> Result<Self, FfmpegError>
Creates a new Decoder
with the given options.
Sourcepub fn video(self) -> Result<VideoDecoder, Self>
pub fn video(self) -> Result<VideoDecoder, Self>
Returns the video decoder if the decoder is a video decoder.
Sourcepub fn audio(self) -> Result<AudioDecoder, Self>
pub fn audio(self) -> Result<AudioDecoder, Self>
Returns the audio decoder if the decoder is an audio decoder.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Decoder
impl RefUnwindSafe for Decoder
impl Send for Decoder
impl !Sync for Decoder
impl Unpin for Decoder
impl UnwindSafe for Decoder
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