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    /// #### `emit-signals`
36    ///  Enables the emission of signals such as [`buffer-consumed`][struct@crate::gst_base::AggregatorPad#buffer-consumed]
37    ///
38    /// Readable | Writeable
39    /// </details>
40    /// <details><summary><h4>Pad</h4></summary>
41    ///
42    ///
43    /// #### `caps`
44    ///  Readable
45    ///
46    ///
47    /// #### `direction`
48    ///  Readable | Writeable | Construct Only
49    ///
50    ///
51    /// #### `offset`
52    ///  The offset that will be applied to the running time of the pad.
53    ///
54    /// Readable | Writeable
55    ///
56    ///
57    /// #### `template`
58    ///  Readable | Writeable
59    /// </details>
60    /// <details><summary><h4>Object</h4></summary>
61    ///
62    ///
63    /// #### `name`
64    ///  Readable | Writeable | Construct
65    ///
66    ///
67    /// #### `parent`
68    ///  The parent of the object. Please note, that when changing the 'parent'
69    /// property, we don't emit [`notify`][struct@crate::glib::Object#notify] and [`deep-notify`][struct@crate::gst::Object#deep-notify]
70    /// signals due to locking issues. In some cases one can use
71    /// `GstBin::element-added` or `GstBin::element-removed` signals on the parent to
72    /// achieve a similar effect.
73    ///
74    /// Readable | Writeable
75    /// </details>
76    ///
77    /// # Implements
78    ///
79    /// [`AudioAggregatorConvertPadExt`][trait@crate::prelude::AudioAggregatorConvertPadExt], [`AudioAggregatorPadExt`][trait@crate::prelude::AudioAggregatorPadExt], [`trait@gst_base::prelude::AggregatorPadExt`], [`trait@gst::prelude::GstObjectExt`], [`trait@glib::ObjectExt`]
80    #[doc(alias = "GstAudioAggregatorConvertPad")]
81    pub struct AudioAggregatorConvertPad(Object<ffi::GstAudioAggregatorConvertPad, ffi::GstAudioAggregatorConvertPadClass>) @extends AudioAggregatorPad, gst_base::AggregatorPad, gst::Object;
82
83    match fn {
84        type_ => || ffi::gst_audio_aggregator_convert_pad_get_type(),
85    }
86}
87
88impl AudioAggregatorConvertPad {
89    pub const NONE: Option<&'static AudioAggregatorConvertPad> = None;
90}
91
92unsafe impl Send for AudioAggregatorConvertPad {}
93unsafe impl Sync for AudioAggregatorConvertPad {}
94
95mod sealed {
96    pub trait Sealed {}
97    impl<T: super::IsA<super::AudioAggregatorConvertPad>> Sealed for T {}
98}
99
100/// Trait containing all [`struct@AudioAggregatorConvertPad`] methods.
101///
102/// # Implementors
103///
104/// [`AudioAggregatorConvertPad`][struct@crate::AudioAggregatorConvertPad]
105pub trait AudioAggregatorConvertPadExt:
106    IsA<AudioAggregatorConvertPad> + sealed::Sealed + 'static
107{
108    //#[doc(alias = "converter-config")]
109    //fn converter_config(&self) -> /*Ignored*/Option<gst::Structure> {
110    //    ObjectExt::property(self.as_ref(), "converter-config")
111    //}
112
113    //#[doc(alias = "converter-config")]
114    //fn set_converter_config(&self, converter_config: /*Ignored*/Option<&gst::Structure>) {
115    //    ObjectExt::set_property(self.as_ref(),"converter-config", converter_config)
116    //}
117
118    #[doc(alias = "converter-config")]
119    fn connect_converter_config_notify<F: Fn(&Self) + Send + Sync + 'static>(
120        &self,
121        f: F,
122    ) -> SignalHandlerId {
123        unsafe extern "C" fn notify_converter_config_trampoline<
124            P: IsA<AudioAggregatorConvertPad>,
125            F: Fn(&P) + Send + Sync + 'static,
126        >(
127            this: *mut ffi::GstAudioAggregatorConvertPad,
128            _param_spec: glib::ffi::gpointer,
129            f: glib::ffi::gpointer,
130        ) {
131            let f: &F = &*(f as *const F);
132            f(AudioAggregatorConvertPad::from_glib_borrow(this).unsafe_cast_ref())
133        }
134        unsafe {
135            let f: Box_<F> = Box_::new(f);
136            connect_raw(
137                self.as_ptr() as *mut _,
138                b"notify::converter-config\0".as_ptr() as *const _,
139                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
140                    notify_converter_config_trampoline::<Self, F> as *const (),
141                )),
142                Box_::into_raw(f),
143            )
144        }
145    }
146}
147
148impl<O: IsA<AudioAggregatorConvertPad>> AudioAggregatorConvertPadExt for O {}