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
95/// Trait containing all [`struct@AudioAggregatorConvertPad`] methods.
96///
97/// # Implementors
98///
99/// [`AudioAggregatorConvertPad`][struct@crate::AudioAggregatorConvertPad]
100pub trait AudioAggregatorConvertPadExt: IsA<AudioAggregatorConvertPad> + 'static {
101 //#[doc(alias = "converter-config")]
102 //fn converter_config(&self) -> /*Ignored*/Option<gst::Structure> {
103 // ObjectExt::property(self.as_ref(), "converter-config")
104 //}
105
106 //#[doc(alias = "converter-config")]
107 //fn set_converter_config(&self, converter_config: /*Ignored*/Option<&gst::Structure>) {
108 // ObjectExt::set_property(self.as_ref(),"converter-config", converter_config)
109 //}
110
111 #[doc(alias = "converter-config")]
112 fn connect_converter_config_notify<F: Fn(&Self) + Send + Sync + 'static>(
113 &self,
114 f: F,
115 ) -> SignalHandlerId {
116 unsafe extern "C" fn notify_converter_config_trampoline<
117 P: IsA<AudioAggregatorConvertPad>,
118 F: Fn(&P) + Send + Sync + 'static,
119 >(
120 this: *mut ffi::GstAudioAggregatorConvertPad,
121 _param_spec: glib::ffi::gpointer,
122 f: glib::ffi::gpointer,
123 ) {
124 let f: &F = &*(f as *const F);
125 f(AudioAggregatorConvertPad::from_glib_borrow(this).unsafe_cast_ref())
126 }
127 unsafe {
128 let f: Box_<F> = Box_::new(f);
129 connect_raw(
130 self.as_ptr() as *mut _,
131 c"notify::converter-config".as_ptr() as *const _,
132 Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
133 notify_converter_config_trampoline::<Self, F> as *const (),
134 )),
135 Box_::into_raw(f),
136 )
137 }
138 }
139}
140
141impl<O: IsA<AudioAggregatorConvertPad>> AudioAggregatorConvertPadExt for O {}