Trait gstreamer_audio::subclass::prelude::AudioSinkImpl

source ·
pub trait AudioSinkImpl: AudioSinkImplExt + AudioBaseSinkImpl {
    // 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.

Object Safety§

This trait is not object safe.

Implementors§