1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
// DO NOT EDIT

use crate::AudioBaseSrc;

glib::wrapper! {
    /// This is the most simple base class for audio sources that only requires
    /// subclasses to implement a set of simple functions:
    ///
    /// * ``open()`` :Open the device.
    /// * ``prepare()`` :Configure the device with the specified format.
    /// * ``read()`` :Read samples from the device.
    /// * ``reset()`` :Unblock reads and flush the device.
    /// * ``delay()`` :Get the number of samples in the device but not yet read.
    /// * ``unprepare()`` :Undo operations done by prepare.
    /// * ``close()`` :Close the device.
    ///
    /// All scheduling of samples and timestamps is done in this base class
    /// together with [`AudioBaseSrc`][crate::AudioBaseSrc] using a default implementation of a
    /// `GstAudioRingBuffer` that uses threads.
    ///
    /// # Implements
    ///
    /// [`AudioBaseSrcExt`][trait@crate::prelude::AudioBaseSrcExt], [`trait@gst_base::prelude::BaseSrcExt`], [`trait@gst::prelude::ElementExt`], [`trait@gst::prelude::GstObjectExt`], [`trait@glib::ObjectExt`]
    #[doc(alias = "GstAudioSrc")]
    pub struct AudioSrc(Object<ffi::GstAudioSrc, ffi::GstAudioSrcClass>) @extends AudioBaseSrc, gst_base::BaseSrc, gst::Element, gst::Object;

    match fn {
        type_ => || ffi::gst_audio_src_get_type(),
    }
}

impl AudioSrc {
    pub const NONE: Option<&'static AudioSrc> = None;
}

unsafe impl Send for AudioSrc {}
unsafe impl Sync for AudioSrc {}