gstreamer_audio/auto/
audio_aggregator_convert_pad.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, AudioAggregatorPad};
7use glib::{
8    prelude::*,
9    signal::{connect_raw, SignalHandlerId},
10    translate::*,
11};
12use std::boxed::Box as Box_;
13
14glib::wrapper! {
15    /// An implementation of GstPad that can be used with [`AudioAggregator`][crate::AudioAggregator].
16    ///
17    /// See [`AudioAggregator`][crate::AudioAggregator] for more details.
18    ///
19    /// ## Properties
20    ///
21    ///
22    /// #### `converter-config`
23    ///  Readable | Writeable
24    /// <details><summary><h4>AudioAggregatorPad</h4></summary>
25    ///
26    ///
27    /// #### `qos-messages`
28    ///  Emit QoS messages when dropping buffers.
29    ///
30    /// Readable | Writeable
31    /// </details>
32    /// <details><summary><h4>AggregatorPad</h4></summary>
33    ///
34    ///
35    /// #### `current-level-buffers`
36    ///  The number of currently queued buffers inside this pad
37    ///
38    /// Readable
39    ///
40    ///
41    /// #### `current-level-bytes`
42    ///  The number of currently queued bytes inside this pad
43    ///
44    /// Readable
45    ///
46    ///
47    /// #### `current-level-time`
48    ///  The amount of currently queued time inside this pad
49    ///
50    /// Readable
51    ///
52    ///
53    /// #### `emit-signals`
54    ///  Enables the emission of signals such as [`buffer-consumed`][struct@crate::gst_base::AggregatorPad#buffer-consumed]
55    ///
56    /// Readable | Writeable
57    /// </details>
58    /// <details><summary><h4>Pad</h4></summary>
59    ///
60    ///
61    /// #### `caps`
62    ///  Readable
63    ///
64    ///
65    /// #### `direction`
66    ///  Readable | Writeable | Construct Only
67    ///
68    ///
69    /// #### `offset`
70    ///  The offset that will be applied to the running time of the pad.
71    ///
72    /// Readable | Writeable
73    ///
74    ///
75    /// #### `template`
76    ///  Readable | Writeable
77    /// </details>
78    /// <details><summary><h4>Object</h4></summary>
79    ///
80    ///
81    /// #### `name`
82    ///  Readable | Writeable | Construct
83    ///
84    ///
85    /// #### `parent`
86    ///  The parent of the object. Please note, that when changing the 'parent'
87    /// property, we don't emit [`notify`][struct@crate::glib::Object#notify] and [`deep-notify`][struct@crate::gst::Object#deep-notify]
88    /// signals due to locking issues. In some cases one can use
89    /// `GstBin::element-added` or `GstBin::element-removed` signals on the parent to
90    /// achieve a similar effect.
91    ///
92    /// Readable | Writeable
93    /// </details>
94    ///
95    /// # Implements
96    ///
97    /// [`AudioAggregatorConvertPadExt`][trait@crate::prelude::AudioAggregatorConvertPadExt], [`AudioAggregatorPadExt`][trait@crate::prelude::AudioAggregatorPadExt], [`trait@gst_base::prelude::AggregatorPadExt`], [`trait@gst::prelude::GstObjectExt`], [`trait@glib::ObjectExt`]
98    #[doc(alias = "GstAudioAggregatorConvertPad")]
99    pub struct AudioAggregatorConvertPad(Object<ffi::GstAudioAggregatorConvertPad, ffi::GstAudioAggregatorConvertPadClass>) @extends AudioAggregatorPad, gst_base::AggregatorPad, gst::Object;
100
101    match fn {
102        type_ => || ffi::gst_audio_aggregator_convert_pad_get_type(),
103    }
104}
105
106impl AudioAggregatorConvertPad {
107    pub const NONE: Option<&'static AudioAggregatorConvertPad> = None;
108}
109
110unsafe impl Send for AudioAggregatorConvertPad {}
111unsafe impl Sync for AudioAggregatorConvertPad {}
112
113/// Trait containing all [`struct@AudioAggregatorConvertPad`] methods.
114///
115/// # Implementors
116///
117/// [`AudioAggregatorConvertPad`][struct@crate::AudioAggregatorConvertPad]
118pub trait AudioAggregatorConvertPadExt: IsA<AudioAggregatorConvertPad> + 'static {
119    //#[doc(alias = "converter-config")]
120    //fn converter_config(&self) -> /*Ignored*/Option<gst::Structure> {
121    //    ObjectExt::property(self.as_ref(), "converter-config")
122    //}
123
124    //#[doc(alias = "converter-config")]
125    //fn set_converter_config(&self, converter_config: /*Ignored*/Option<&gst::Structure>) {
126    //    ObjectExt::set_property(self.as_ref(),"converter-config", converter_config)
127    //}
128
129    #[doc(alias = "converter-config")]
130    fn connect_converter_config_notify<F: Fn(&Self) + Send + Sync + 'static>(
131        &self,
132        f: F,
133    ) -> SignalHandlerId {
134        unsafe extern "C" fn notify_converter_config_trampoline<
135            P: IsA<AudioAggregatorConvertPad>,
136            F: Fn(&P) + Send + Sync + 'static,
137        >(
138            this: *mut ffi::GstAudioAggregatorConvertPad,
139            _param_spec: glib::ffi::gpointer,
140            f: glib::ffi::gpointer,
141        ) {
142            let f: &F = &*(f as *const F);
143            f(AudioAggregatorConvertPad::from_glib_borrow(this).unsafe_cast_ref())
144        }
145        unsafe {
146            let f: Box_<F> = Box_::new(f);
147            connect_raw(
148                self.as_ptr() as *mut _,
149                c"notify::converter-config".as_ptr() as *const _,
150                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
151                    notify_converter_config_trampoline::<Self, F> as *const (),
152                )),
153                Box_::into_raw(f),
154            )
155        }
156    }
157}
158
159impl<O: IsA<AudioAggregatorConvertPad>> AudioAggregatorConvertPadExt for O {}