gstreamer/bin: Implement iterate_all_by_element_factory_name manually

This commit is contained in:
Vivia Nikolaidou 2020-05-02 22:12:36 +03:00 committed by Sebastian Dröge
parent 05852bb19f
commit 3ac7631ea0

View file

@ -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<Element>;
fn iterate_all_by_interface(&self, iface: glib::types::Type) -> ::Iterator<Element>;
fn iterate_elements(&self) -> ::Iterator<Element>;
fn iterate_recurse(&self) -> ::Iterator<Element>;
@ -107,6 +109,16 @@ impl<O: IsA<Bin>> GstBinExtManual for O {
}
}
#[cfg(any(feature = "v1_18", feature = "dox"))]
fn iterate_all_by_element_factory_name(&self, factory_name: &str) -> ::Iterator<Element> {
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<Element> {
unsafe {
from_glib_full(gst_sys::gst_bin_iterate_all_by_interface(