Audio

Struct Audio 

Source
pub struct Audio(pub Opened);

Tuple Fields§

§0: Opened

Implementations§

Source§

impl Audio

Source

pub fn rate(&self) -> u32

Source

pub fn channels(&self) -> u16

Source

pub fn format(&self) -> Sample

Source

pub fn request_format(&mut self, value: Sample)

Source

pub fn frames(&self) -> usize

Source

pub fn align(&self) -> usize

Source

pub fn channel_layout(&self) -> ChannelLayout

Source

pub fn set_channel_layout(&mut self, value: ChannelLayout)

Source

pub fn request_channel_layout(&mut self, value: ChannelLayout)

Source

pub fn audio_service(&mut self) -> AudioService

Source

pub fn max_bit_rate(&self) -> usize

Source

pub fn frame_size(&self) -> u32

Source§

impl Audio

Source

pub fn resampler( &self, format: Sample, channel_layout: ChannelLayout, rate: u32, ) -> Result<Context, Error>

Methods from Deref<Target = Opened>§

Source

pub fn send_packet<P: Ref>(&mut self, packet: &P) -> Result<(), Error>

Source

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

Sends a NULL packet to the decoder to signal end of stream and enter draining mode.

Source

pub fn receive_frame(&mut self, frame: &mut Frame) -> Result<(), Error>

Source

pub fn bit_rate(&self) -> usize

Source

pub fn delay(&self) -> usize

Source

pub fn profile(&self) -> Profile

Source

pub fn frame_rate(&self) -> Option<Rational>

Source

pub fn flush(&mut self)

Methods from Deref<Target = Decoder>§

Source

pub fn conceal(&mut self, value: Conceal)

Sets error concealment strategy.

Configures how the decoder should handle corrupted data (e.g., missing macroblocks, broken slices). Higher concealment may produce visible artifacts but avoid decode failures.

Source

pub fn check(&mut self, value: Check)

Sets error detection/recognition level.

Controls how strictly the decoder validates input data. Stricter checking catches more errors but may reject valid but non-compliant streams.

Source

pub fn skip_loop_filter(&mut self, value: Discard)

Sets which frames to skip during loop filtering (deblocking).

Skipping loop filtering improves decode performance but reduces visual quality. Useful for low-power devices or when decoding for analysis rather than display.

Source

pub fn skip_idct(&mut self, value: Discard)

Sets which frames to skip during IDCT (inverse DCT) processing.

Skipping IDCT can significantly speed up decoding but produces lower quality output. Primarily useful for fast seeking or thumbnail extraction.

Source

pub fn skip_frame(&mut self, value: Discard)

Sets which frames to skip entirely during decoding.

Allows selective frame dropping (e.g., skip all B-frames, skip non-reference frames). Useful for fast playback or when only key frames are needed.

Source

pub fn packet_time_base(&self) -> Rational

Gets the time base used for packet timestamps.

This is the time unit for interpreting PTS/DTS values in input packets. Typically matches the stream’s time base.

Source

pub fn set_packet_time_base<R: Into<Rational>>(&mut self, value: R)

Sets the time base for packet timestamps.

Must match the time base of packets being sent to this decoder.

Methods from Deref<Target = Context>§

Source

pub unsafe fn as_ptr(&self) -> *const AVCodecContext

Source

pub unsafe fn as_mut_ptr(&mut self) -> *mut AVCodecContext

Source

pub fn codec(&self) -> Option<Codec>

Source

pub fn medium(&self) -> Type

Source

pub fn set_flags(&mut self, value: Flags)

Source

pub fn id(&self) -> Id

Source

pub fn compliance(&mut self, value: Compliance)

Source

pub fn debug(&mut self, value: Debug)

Source

pub fn set_threading(&mut self, config: Config)

Source

pub fn threading(&self) -> Config

Source

pub fn set_parameters<P: Into<Parameters>>( &mut self, parameters: P, ) -> Result<(), Error>

Source

pub fn time_base(&self) -> Rational

Source

pub fn set_time_base<R: Into<Rational>>(&mut self, value: R)

Source

pub fn frame_rate(&self) -> Rational

Source

pub fn set_frame_rate<R: Into<Rational>>(&mut self, value: Option<R>)

Trait Implementations§

Source§

impl AsMut<Context> for Audio

Source§

fn as_mut(&mut self) -> &mut Context

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl AsRef<Context> for Audio

Source§

fn as_ref(&self) -> &Context

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Deref for Audio

Source§

type Target = Opened

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<Self as Deref>::Target

Dereferences the value.
Source§

impl DerefMut for Audio

Source§

fn deref_mut(&mut self) -> &mut <Self as Deref>::Target

Mutably dereferences the value.

Auto Trait Implementations§

§

impl Freeze for Audio

§

impl !RefUnwindSafe for Audio

§

impl Send for Audio

§

impl !Sync for Audio

§

impl Unpin for Audio

§

impl !UnwindSafe for Audio

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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
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.