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
41
42
43
44
45
46
47
// 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::AudioBaseSink;

glib::wrapper! {
    /// This is the most simple base class for audio sinks that only requires
    /// subclasses to implement a set of simple functions:
    ///
    /// * ``open()`` :Open the device.
    ///
    /// * ``prepare()`` :Configure the device with the specified format.
    ///
    /// * ``write()`` :Write samples to the device.
    ///
    /// * ``reset()`` :Unblock writes and flush the device.
    ///
    /// * ``delay()`` :Get the number of samples written but not yet played
    /// by the device.
    ///
    /// * ``unprepare()`` :Undo operations done by prepare.
    ///
    /// * ``close()`` :Close the device.
    ///
    /// All scheduling of samples and timestamps is done in this base class
    /// together with [`AudioBaseSink`][crate::AudioBaseSink] using a default implementation of a
    /// `GstAudioRingBuffer` that uses threads.
    ///
    /// # Implements
    ///
    /// [`AudioBaseSinkExt`][trait@crate::prelude::AudioBaseSinkExt], [`trait@gst_base::prelude::BaseSinkExt`], [`trait@gst::prelude::ElementExt`], [`trait@gst::prelude::GstObjectExt`], [`trait@glib::ObjectExt`]
    #[doc(alias = "GstAudioSink")]
    pub struct AudioSink(Object<ffi::GstAudioSink, ffi::GstAudioSinkClass>) @extends AudioBaseSink, gst_base::BaseSink, gst::Element, gst::Object;

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

impl AudioSink {}

unsafe impl Send for AudioSink {}
unsafe impl Sync for AudioSink {}

pub const NONE_AUDIO_SINK: Option<&AudioSink> = None;