Skip to main content

AudioSrcImpl

Trait AudioSrcImpl 

Source
pub trait AudioSrcImpl: AudioBaseSrcImpl + ObjectSubclass<Type: IsA<AudioSrc>> {
    // Provided methods
    fn close(&self) -> Result<(), LoggableError> { ... }
    fn delay(&self) -> u32 { ... }
    fn open(&self) -> Result<(), LoggableError> { ... }
    fn prepare(
        &self,
        spec: &mut AudioRingBufferSpec,
    ) -> Result<(), LoggableError> { ... }
    fn unprepare(&self) -> Result<(), LoggableError> { ... }
    fn read(
        &self,
        audio_data: &mut [u8],
    ) -> Result<(u32, Option<ClockTime>), LoggableError> { ... }
    fn reset(&self) { ... }
}

Provided Methods§

Source

fn close(&self) -> Result<(), LoggableError>

close the device

Source

fn delay(&self) -> u32

the number of frames queued in the device

Source

fn open(&self) -> Result<(), LoggableError>

open the device with the specified caps

Source

fn prepare(&self, spec: &mut AudioRingBufferSpec) -> Result<(), LoggableError>

configure device with format

Source

fn unprepare(&self) -> Result<(), LoggableError>

undo the configuration

Source

fn read( &self, audio_data: &mut [u8], ) -> Result<(u32, Option<ClockTime>), LoggableError>

Read samples from the device.

§Returns
§timestamp

a GstClockTime

Source

fn reset(&self)

unblock a read to the device and reset.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§