ac_ffmpeg::codec::video

Struct VideoDecoder

Source
pub struct VideoDecoder { /* private fields */ }
Expand description

Video decoder.

Implementations§

Source§

impl VideoDecoder

Source

pub fn new(codec: &str) -> Result<Self, Error>

Create a new video decoder for a given codec.

Source

pub fn from_codec_parameters( codec_parameters: &VideoCodecParameters, ) -> Result<VideoDecoderBuilder, Error>

Create a new video decoder builder from given codec parameters.

Source

pub fn from_stream(stream: &Stream) -> Result<VideoDecoderBuilder, Error>

Create a new decoder for a given stream.

§Panics

The method panics if the stream is not a video stream.

Source

pub fn builder(codec: &str) -> Result<VideoDecoderBuilder, Error>

Get decoder builder for a given codec.

Trait Implementations§

Source§

impl Decoder for VideoDecoder

Source§

type CodecParameters = VideoCodecParameters

Source§

type Frame = VideoFrame

Source§

fn codec_parameters(&self) -> VideoCodecParameters

Get codec parameters.
Source§

fn try_push(&mut self, packet: Packet) -> Result<(), CodecError>

Push a given packet to the decoder.
Source§

fn try_flush(&mut self) -> Result<(), CodecError>

Flush the decoder.
Source§

fn take(&mut self) -> Result<Option<VideoFrame>, Error>

Take the next frame from the decoder.
Source§

fn push(&mut self, packet: Packet) -> Result<(), Error>

Push a given packet to the decoder. Read more
Source§

fn flush(&mut self) -> Result<(), Error>

Flush the decoder. Read more
Source§

impl Drop for VideoDecoder

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl Send for VideoDecoder

Source§

impl Sync for VideoDecoder

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.