pub struct DecoderBuilder { /* private fields */ }Expand description
Builder for creating decoders. Follows the builder pattern instead of FFmpeg’s allocate-then-mutate.
Implementations§
Source§impl DecoderBuilder
impl DecoderBuilder
pub fn new(params: CodecParameters) -> Self
Sourcepub fn option(self, key: &str, value: &str) -> Self
pub fn option(self, key: &str, value: &str) -> Self
Set a codec-private option (string key-value pair).
Sourcepub fn open(self) -> Result<Box<dyn Decoder>>
pub fn open(self) -> Result<Box<dyn Decoder>>
Consume the builder and open a decoder. Uses the codec registry to find the appropriate decoder.
pub fn params(&self) -> &CodecParameters
Auto Trait Implementations§
impl Freeze for DecoderBuilder
impl RefUnwindSafe for DecoderBuilder
impl Send for DecoderBuilder
impl Sync for DecoderBuilder
impl Unpin for DecoderBuilder
impl UnsafeUnpin for DecoderBuilder
impl UnwindSafe for DecoderBuilder
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