gstreamer_audio/auto/audio_src.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, AudioBaseSrc};
7
8glib::wrapper! {
9 /// This is the most simple base class for audio sources that only requires
10 /// subclasses to implement a set of simple functions:
11 ///
12 /// * ``open()`` :Open the device.
13 /// * ``prepare()`` :Configure the device with the specified format.
14 /// * ``read()`` :Read samples from the device.
15 /// * ``reset()`` :Unblock reads and flush the device.
16 /// * ``delay()`` :Get the number of samples in the device but not yet read.
17 /// * ``unprepare()`` :Undo operations done by prepare.
18 /// * ``close()`` :Close the device.
19 ///
20 /// All scheduling of samples and timestamps is done in this base class
21 /// together with [`AudioBaseSrc`][crate::AudioBaseSrc] using a default implementation of a
22 /// `GstAudioRingBuffer` that uses threads.
23 ///
24 /// # Implements
25 ///
26 /// [`AudioBaseSrcExt`][trait@crate::prelude::AudioBaseSrcExt], [`trait@gst_base::prelude::BaseSrcExt`], [`trait@gst::prelude::ElementExt`], [`trait@gst::prelude::GstObjectExt`], [`trait@glib::ObjectExt`]
27 #[doc(alias = "GstAudioSrc")]
28 pub struct AudioSrc(Object<ffi::GstAudioSrc, ffi::GstAudioSrcClass>) @extends AudioBaseSrc, gst_base::BaseSrc, gst::Element, gst::Object;
29
30 match fn {
31 type_ => || ffi::gst_audio_src_get_type(),
32 }
33}
34
35impl AudioSrc {
36 pub const NONE: Option<&'static AudioSrc> = None;
37}
38
39unsafe impl Send for AudioSrc {}
40unsafe impl Sync for AudioSrc {}