base: Add new Aggregator::push_src_event() method

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1574>
This commit is contained in:
Sebastian Dröge 2024-10-20 14:50:24 +03:00 committed by GStreamer Marge Bot
parent fa1b7e22e0
commit 370737fa1a
2 changed files with 12 additions and 6 deletions

View file

@ -30,6 +30,7 @@ manual = [
"Gst.BufferPool",
"Gst.ClockTimeDiff",
"Gst.Element",
"Gst.Event",
"Gst.EventType",
"Gst.Format",
"Gst.Memory",

View file

@ -128,12 +128,17 @@ pub trait AggregatorExt: IsA<Aggregator> + 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")))]