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    #[doc(alias = "GstAudioAggregatorConvertPad")]
16    pub struct AudioAggregatorConvertPad(Object<ffi::GstAudioAggregatorConvertPad, ffi::GstAudioAggregatorConvertPadClass>) @extends AudioAggregatorPad, gst_base::AggregatorPad, gst::Object;
17
18    match fn {
19        type_ => || ffi::gst_audio_aggregator_convert_pad_get_type(),
20    }
21}
22
23impl AudioAggregatorConvertPad {
24    pub const NONE: Option<&'static AudioAggregatorConvertPad> = None;
25}
26
27unsafe impl Send for AudioAggregatorConvertPad {}
28unsafe impl Sync for AudioAggregatorConvertPad {}
29
30mod sealed {
31    pub trait Sealed {}
32    impl<T: super::IsA<super::AudioAggregatorConvertPad>> Sealed for T {}
33}
34
35pub trait AudioAggregatorConvertPadExt:
36    IsA<AudioAggregatorConvertPad> + sealed::Sealed + 'static
37{
38    //#[doc(alias = "converter-config")]
39    //fn converter_config(&self) -> /*Ignored*/Option<gst::Structure> {
40    //    ObjectExt::property(self.as_ref(), "converter-config")
41    //}
42
43    //#[doc(alias = "converter-config")]
44    //fn set_converter_config(&self, converter_config: /*Ignored*/Option<&gst::Structure>) {
45    //    ObjectExt::set_property(self.as_ref(),"converter-config", converter_config)
46    //}
47
48    #[doc(alias = "converter-config")]
49    fn connect_converter_config_notify<F: Fn(&Self) + Send + Sync + 'static>(
50        &self,
51        f: F,
52    ) -> SignalHandlerId {
53        unsafe extern "C" fn notify_converter_config_trampoline<
54            P: IsA<AudioAggregatorConvertPad>,
55            F: Fn(&P) + Send + Sync + 'static,
56        >(
57            this: *mut ffi::GstAudioAggregatorConvertPad,
58            _param_spec: glib::ffi::gpointer,
59            f: glib::ffi::gpointer,
60        ) {
61            let f: &F = &*(f as *const F);
62            f(AudioAggregatorConvertPad::from_glib_borrow(this).unsafe_cast_ref())
63        }
64        unsafe {
65            let f: Box_<F> = Box_::new(f);
66            connect_raw(
67                self.as_ptr() as *mut _,
68                b"notify::converter-config\0".as_ptr() as *const _,
69                Some(std::mem::transmute::<*const (), unsafe extern "C" fn()>(
70                    notify_converter_config_trampoline::<Self, F> as *const (),
71                )),
72                Box_::into_raw(f),
73            )
74        }
75    }
76}
77
78impl<O: IsA<AudioAggregatorConvertPad>> AudioAggregatorConvertPadExt for O {}