gstreamer_audio/auto/audio_sink.rs
1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
4// DO NOT EDIT
5
6use crate::{ffi, AudioBaseSink};
7
8glib::wrapper! {
9 /// This is the most simple base class for audio sinks that only requires
10 /// subclasses to implement a set of simple functions:
11 ///
12 /// * ``open()`` :Open the device.
13 ///
14 /// * ``prepare()`` :Configure the device with the specified format.
15 ///
16 /// * ``write()`` :Write samples to the device.
17 ///
18 /// * ``reset()`` :Unblock writes and flush the device.
19 ///
20 /// * ``delay()`` :Get the number of samples written but not yet played
21 /// by the device.
22 ///
23 /// * ``unprepare()`` :Undo operations done by prepare.
24 ///
25 /// * ``close()`` :Close the device.
26 ///
27 /// All scheduling of samples and timestamps is done in this base class
28 /// together with [`AudioBaseSink`][crate::AudioBaseSink] using a default implementation of a
29 /// `GstAudioRingBuffer` that uses threads.
30 ///
31 /// # Implements
32 ///
33 /// [`AudioBaseSinkExt`][trait@crate::prelude::AudioBaseSinkExt], [`trait@gst_base::prelude::BaseSinkExt`], [`trait@gst::prelude::ElementExt`], [`trait@gst::prelude::GstObjectExt`], [`trait@glib::ObjectExt`]
34 #[doc(alias = "GstAudioSink")]
35 pub struct AudioSink(Object<ffi::GstAudioSink, ffi::GstAudioSinkClass>) @extends AudioBaseSink, gst_base::BaseSink, gst::Element, gst::Object;
36
37 match fn {
38 type_ => || ffi::gst_audio_sink_get_type(),
39 }
40}
41
42impl AudioSink {
43 pub const NONE: Option<&'static AudioSink> = None;
44}
45
46unsafe impl Send for AudioSink {}
47unsafe impl Sync for AudioSink {}