[−][src]Struct ac_ffmpeg::codec::audio::resampler::AudioResampler
Audio resampler.
Resampler operation
- Push an audio frame to the resampler.
- Take all frames from the resampler until you get None.
- If there are more frames to be resampled, continue with 1.
- Flush the resampler.
- Take all frames from the resampler until you get None.
Timestamps of the output frames will be in 1 / target_sample_rate time base.
Implementations
impl AudioResampler
[src]
pub fn builder() -> AudioResamplerBuilder
[src]
Get a builder for the audio resampler.
pub fn push(&mut self, frame: AudioFrame) -> Result<(), Error>
[src]
Push a given frame to the resampler.
Panics
The method panics if the operation is not expected (i.e. another operation needs to be done).
pub fn try_push(&mut self, frame: AudioFrame) -> Result<(), CodecError>
[src]
Push a given frame to the resampler.
pub fn flush(&mut self) -> Result<(), Error>
[src]
Flush the resampler.
Panics
The method panics if the operation is not expected (i.e. another operation needs to be done).
pub fn try_flush(&mut self) -> Result<(), CodecError>
[src]
Flush the resampler.
pub fn take(&mut self) -> Result<Option<AudioFrame>, Error>
[src]
Take a frame from the resampler (if available).
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for AudioResampler
impl Unpin for AudioResampler
impl UnwindSafe for AudioResampler
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,