gstreamer_audio::subclass::prelude

Trait AudioSinkImpl

Source
pub trait AudioSinkImpl: AudioBaseSinkImpl + ObjectSubclass<Type: IsA<AudioSink>> {
    // 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 write(&self, audio_data: &[u8]) -> Result<i32, LoggableError> { ... }
    fn reset(&self) { ... }
}

Provided Methods§

Source

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

Close the device.

Source

fn delay(&self) -> u32

Return how many frames are still in the device. Participates in computing the time for audio clocks and drives the synchronisation.

Source

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

Open the device. No configuration needs to be done at this point. This function is also used to check if the device is available.

Source

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

Prepare the device to operate with the specified parameters.

Source

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

Undo operations done in prepare.

Source

fn write(&self, audio_data: &[u8]) -> Result<i32, LoggableError>

Write samples to the device.

Source

fn reset(&self)

Returns as quickly as possible from a write and flush any pending samples from the device. This vmethod is deprecated. Please provide pause and stop instead.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§