mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
synced 2024-11-25 19:11:06 +00:00
audio: Ignore ignore-inactive-pads
property in AudioAggregator
getters/setters are already generated for the `Aggregator` base class and the property in the subclass is not really needed here. It also causes problems with trait resolution as the getter/setter functions will exist twice.
This commit is contained in:
parent
99e344af4d
commit
92c6eefadd
2 changed files with 5 additions and 60 deletions
|
@ -89,6 +89,11 @@ status = "generate"
|
|||
# fraction
|
||||
manual = true
|
||||
|
||||
[[object.property]]
|
||||
name = "ignore-inactive-pads"
|
||||
# getter/setter exists in base class
|
||||
ignore = true
|
||||
|
||||
[[object]]
|
||||
name = "GstAudio.AudioBaseSink"
|
||||
status = "generate"
|
||||
|
|
|
@ -42,16 +42,6 @@ pub trait AudioAggregatorExt: 'static {
|
|||
#[doc(alias = "discont-wait")]
|
||||
fn set_discont_wait(&self, discont_wait: u64);
|
||||
|
||||
#[cfg(any(feature = "v1_20", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
|
||||
#[doc(alias = "ignore-inactive-pads")]
|
||||
fn ignores_inactive_pads(&self) -> bool;
|
||||
|
||||
#[cfg(any(feature = "v1_20", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
|
||||
#[doc(alias = "ignore-inactive-pads")]
|
||||
fn set_ignore_inactive_pads(&self, ignore_inactive_pads: bool);
|
||||
|
||||
#[doc(alias = "output-buffer-duration")]
|
||||
fn output_buffer_duration(&self) -> u64;
|
||||
|
||||
|
@ -70,14 +60,6 @@ pub trait AudioAggregatorExt: 'static {
|
|||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
|
||||
#[cfg(any(feature = "v1_20", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
|
||||
#[doc(alias = "ignore-inactive-pads")]
|
||||
fn connect_ignore_inactive_pads_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId;
|
||||
|
||||
#[doc(alias = "output-buffer-duration")]
|
||||
fn connect_output_buffer_duration_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
|
@ -102,18 +84,6 @@ impl<O: IsA<AudioAggregator>> AudioAggregatorExt for O {
|
|||
glib::ObjectExt::set_property(self.as_ref(), "discont-wait", &discont_wait)
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_20", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
|
||||
fn ignores_inactive_pads(&self) -> bool {
|
||||
glib::ObjectExt::property(self.as_ref(), "ignore-inactive-pads")
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_20", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
|
||||
fn set_ignore_inactive_pads(&self, ignore_inactive_pads: bool) {
|
||||
glib::ObjectExt::set_property(self.as_ref(), "ignore-inactive-pads", &ignore_inactive_pads)
|
||||
}
|
||||
|
||||
fn output_buffer_duration(&self) -> u64 {
|
||||
glib::ObjectExt::property(self.as_ref(), "output-buffer-duration")
|
||||
}
|
||||
|
@ -182,36 +152,6 @@ impl<O: IsA<AudioAggregator>> AudioAggregatorExt for O {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "v1_20", feature = "dox"))]
|
||||
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
|
||||
fn connect_ignore_inactive_pads_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
) -> SignalHandlerId {
|
||||
unsafe extern "C" fn notify_ignore_inactive_pads_trampoline<
|
||||
P: IsA<AudioAggregator>,
|
||||
F: Fn(&P) + Send + Sync + 'static,
|
||||
>(
|
||||
this: *mut ffi::GstAudioAggregator,
|
||||
_param_spec: glib::ffi::gpointer,
|
||||
f: glib::ffi::gpointer,
|
||||
) {
|
||||
let f: &F = &*(f as *const F);
|
||||
f(AudioAggregator::from_glib_borrow(this).unsafe_cast_ref())
|
||||
}
|
||||
unsafe {
|
||||
let f: Box_<F> = Box_::new(f);
|
||||
connect_raw(
|
||||
self.as_ptr() as *mut _,
|
||||
b"notify::ignore-inactive-pads\0".as_ptr() as *const _,
|
||||
Some(transmute::<_, unsafe extern "C" fn()>(
|
||||
notify_ignore_inactive_pads_trampoline::<Self, F> as *const (),
|
||||
)),
|
||||
Box_::into_raw(f),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
fn connect_output_buffer_duration_notify<F: Fn(&Self) + Send + Sync + 'static>(
|
||||
&self,
|
||||
f: F,
|
||||
|
|
Loading…
Reference in a new issue