From 370737fa1a119e38c769cc4d62b15b0fc36fd58c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sun, 20 Oct 2024 14:50:24 +0300 Subject: [PATCH] base: Add new `Aggregator::push_src_event()` method Part-of: --- gstreamer-base/Gir.toml | 1 + gstreamer-base/src/auto/aggregator.rs | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/gstreamer-base/Gir.toml b/gstreamer-base/Gir.toml index 73a930179..1a2cdd8ad 100644 --- a/gstreamer-base/Gir.toml +++ b/gstreamer-base/Gir.toml @@ -30,6 +30,7 @@ manual = [ "Gst.BufferPool", "Gst.ClockTimeDiff", "Gst.Element", + "Gst.Event", "Gst.EventType", "Gst.Format", "Gst.Memory", diff --git a/gstreamer-base/src/auto/aggregator.rs b/gstreamer-base/src/auto/aggregator.rs index 1370e90f8..55be8951f 100644 --- a/gstreamer-base/src/auto/aggregator.rs +++ b/gstreamer-base/src/auto/aggregator.rs @@ -128,12 +128,17 @@ pub trait AggregatorExt: IsA + sealed::Sealed + 'static { } } - //#[cfg(feature = "v1_26")] - //#[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))] - //#[doc(alias = "gst_aggregator_push_src_event")] - //fn push_src_event(&self, event: /*Ignored*/gst::Event) -> bool { - // unsafe { TODO: call ffi:gst_aggregator_push_src_event() } - //} + #[cfg(feature = "v1_26")] + #[cfg_attr(docsrs, doc(cfg(feature = "v1_26")))] + #[doc(alias = "gst_aggregator_push_src_event")] + fn push_src_event(&self, event: gst::Event) -> bool { + unsafe { + from_glib(ffi::gst_aggregator_push_src_event( + self.as_ref().to_glib_none().0, + event.into_glib_ptr(), + )) + } + } #[cfg(feature = "v1_22")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_22")))]