pub struct GStreamerAudioSink {
pipeline: Pipeline,
appsrc: Arc<AppSrc>,
sample_rate: Cell<f32>,
audio_info: RefCell<Option<AudioInfo>>,
sample_offset: Cell<u64>,
}Fields§
§pipeline: Pipeline§appsrc: Arc<AppSrc>§sample_rate: Cell<f32>§audio_info: RefCell<Option<AudioInfo>>§sample_offset: Cell<u64>Implementations§
Source§impl GStreamerAudioSink
impl GStreamerAudioSink
pub fn new() -> Result<Self, AudioSinkError>
Source§impl GStreamerAudioSink
impl GStreamerAudioSink
fn set_audio_info( &self, sample_rate: f32, channels: u8, ) -> Result<(), AudioSinkError>
fn set_channels_if_changed(&self, channels: u8) -> Result<(), AudioSinkError>
Trait Implementations§
Source§impl AudioSink for GStreamerAudioSink
impl AudioSink for GStreamerAudioSink
fn init( &self, sample_rate: f32, graph_thread_channel: Sender<AudioRenderThreadMsg>, ) -> Result<(), AudioSinkError>
fn init_stream( &self, channels: u8, sample_rate: f32, socket: Box<dyn MediaSocket>, ) -> Result<(), AudioSinkError>
fn play(&self) -> Result<(), AudioSinkError>
fn stop(&self) -> Result<(), AudioSinkError>
fn has_enough_data(&self) -> bool
fn push_data(&self, chunk: Chunk) -> Result<(), AudioSinkError>
fn set_eos_callback( &self, _: Box<dyn Fn(Box<dyn AsRef<[f32]>>) + Send + Sync + 'static>, )
Auto Trait Implementations§
impl !Freeze for GStreamerAudioSink
impl !RefUnwindSafe for GStreamerAudioSink
impl Send for GStreamerAudioSink
impl !Sync for GStreamerAudioSink
impl Unpin for GStreamerAudioSink
impl UnwindSafe for GStreamerAudioSink
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more