From 3ac7631ea0b653cda24a41ade9c46889ad6d5a2f Mon Sep 17 00:00:00 2001 From: Vivia Nikolaidou Date: Sat, 2 May 2020 22:12:36 +0300 Subject: [PATCH] gstreamer/bin: Implement iterate_all_by_element_factory_name manually --- gstreamer/src/bin.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gstreamer/src/bin.rs b/gstreamer/src/bin.rs index ab97e95ca..519230a4a 100644 --- a/gstreamer/src/bin.rs +++ b/gstreamer/src/bin.rs @@ -34,6 +34,8 @@ pub trait GstBinExtManual: 'static { f: F, ) -> SignalHandlerId; + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> ::Iterator; fn iterate_all_by_interface(&self, iface: glib::types::Type) -> ::Iterator; fn iterate_elements(&self) -> ::Iterator; fn iterate_recurse(&self) -> ::Iterator; @@ -107,6 +109,16 @@ impl> GstBinExtManual for O { } } + #[cfg(any(feature = "v1_18", feature = "dox"))] + fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> ::Iterator { + unsafe { + from_glib_full(gst_sys::gst_bin_iterate_all_by_element_factory_name( + self.as_ref().to_glib_none().0, + factory_name.to_glib_none().0, + )) + } + } + fn iterate_all_by_interface(&self, iface: glib::types::Type) -> ::Iterator { unsafe { from_glib_full(gst_sys::gst_bin_iterate_all_by_interface(