[][src]Struct ffmpeg_next::software::resampling::context::Context

pub struct Context { /* fields omitted */ }

Implementations

impl Context[src]

pub fn get(
    src_format: Sample,
    src_channel_layout: ChannelLayout,
    src_rate: u32,
    dst_format: Sample,
    dst_channel_layout: ChannelLayout,
    dst_rate: u32
) -> Result<Self, Error>
[src]

Create a resampler with the given definitions.

pub fn get_with(
    src_format: Sample,
    src_channel_layout: ChannelLayout,
    src_rate: u32,
    dst_format: Sample,
    dst_channel_layout: ChannelLayout,
    dst_rate: u32,
    options: Dictionary<'_>
) -> Result<Self, Error>
[src]

Create a resampler with the given definitions and custom options dictionary.

pub fn input(&self) -> &Definition[src]

Get the input definition.

pub fn output(&self) -> &Definition[src]

Get the output definition.

pub fn delay(&self) -> Option<Delay>[src]

Get the remaining delay.

pub fn run(
    &mut self,
    input: &Audio,
    output: &mut Audio
) -> Result<Option<Delay>, Error>
[src]

Run the resampler from the given input to the given output.

When there are internal frames to process it will return Ok(Some(Delay { .. })).

pub fn flush(&mut self, output: &mut Audio) -> Result<Option<Delay>, Error>[src]

Convert one of the remaining internal frames.

When there are no more internal frames Ok(None) will be returned.

Trait Implementations

impl Drop for Context[src]

impl Send for Context[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.