2018-04-23 17:34:22 +00:00
|
|
|
// This file was generated by gir (https://github.com/gtk-rs/gir)
|
|
|
|
// from gir-files (https://github.com/gtk-rs/gir-files)
|
2021-04-01 13:58:41 +00:00
|
|
|
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
|
2017-05-12 12:24:03 +00:00
|
|
|
// DO NOT EDIT
|
|
|
|
|
2020-11-21 13:46:33 +00:00
|
|
|
use crate::Object;
|
|
|
|
use crate::PluginFeature;
|
|
|
|
use crate::URIType;
|
2019-06-18 10:12:00 +00:00
|
|
|
use glib::translate::*;
|
2020-11-21 13:46:33 +00:00
|
|
|
|
2020-12-17 22:34:53 +00:00
|
|
|
glib::wrapper! {
|
2021-06-02 07:47:51 +00:00
|
|
|
#[doc(alias = "GstElementFactory")]
|
2020-11-21 13:46:33 +00:00
|
|
|
pub struct ElementFactory(Object<ffi::GstElementFactory, ffi::GstElementFactoryClass>) @extends PluginFeature, Object;
|
2017-05-12 12:24:03 +00:00
|
|
|
|
|
|
|
match fn {
|
2021-04-19 19:55:01 +00:00
|
|
|
type_ => || ffi::gst_element_factory_get_type(),
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl ElementFactory {
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_element_factory_get_element_type")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_element_type")]
|
2021-04-11 19:38:18 +00:00
|
|
|
pub fn element_type(&self) -> glib::types::Type {
|
2017-05-12 12:24:03 +00:00
|
|
|
unsafe {
|
2020-11-21 13:46:33 +00:00
|
|
|
from_glib(ffi::gst_element_factory_get_element_type(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.to_glib_none().0,
|
|
|
|
))
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_element_factory_get_metadata_keys")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_metadata_keys")]
|
2021-04-11 19:38:18 +00:00
|
|
|
pub fn metadata_keys(&self) -> Vec<glib::GString> {
|
2017-05-12 12:24:03 +00:00
|
|
|
unsafe {
|
2020-11-21 13:46:33 +00:00
|
|
|
FromGlibPtrContainer::from_glib_full(ffi::gst_element_factory_get_metadata_keys(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.to_glib_none().0,
|
|
|
|
))
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_element_factory_get_num_pad_templates")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_num_pad_templates")]
|
2021-04-11 19:38:18 +00:00
|
|
|
pub fn num_pad_templates(&self) -> u32 {
|
2020-11-21 13:46:33 +00:00
|
|
|
unsafe { ffi::gst_element_factory_get_num_pad_templates(self.to_glib_none().0) }
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
|
2022-01-12 13:40:36 +00:00
|
|
|
#[cfg(any(feature = "v1_20", feature = "dox"))]
|
|
|
|
#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_20")))]
|
|
|
|
#[doc(alias = "gst_element_factory_get_skip_documentation")]
|
|
|
|
#[doc(alias = "get_skip_documentation")]
|
|
|
|
pub fn skips_documentation(&self) -> bool {
|
|
|
|
unsafe {
|
|
|
|
from_glib(ffi::gst_element_factory_get_skip_documentation(
|
|
|
|
self.to_glib_none().0,
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_element_factory_get_uri_protocols")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_uri_protocols")]
|
2021-04-11 19:38:18 +00:00
|
|
|
pub fn uri_protocols(&self) -> Vec<glib::GString> {
|
2017-05-12 12:24:03 +00:00
|
|
|
unsafe {
|
2020-11-21 13:46:33 +00:00
|
|
|
FromGlibPtrContainer::from_glib_none(ffi::gst_element_factory_get_uri_protocols(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.to_glib_none().0,
|
|
|
|
))
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_element_factory_get_uri_type")]
|
2021-05-03 18:35:37 +00:00
|
|
|
#[doc(alias = "get_uri_type")]
|
2021-04-11 19:38:18 +00:00
|
|
|
pub fn uri_type(&self) -> URIType {
|
2020-11-21 13:46:33 +00:00
|
|
|
unsafe { from_glib(ffi::gst_element_factory_get_uri_type(self.to_glib_none().0)) }
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_element_factory_has_interface")]
|
2017-07-03 11:06:08 +00:00
|
|
|
pub fn has_interface(&self, interfacename: &str) -> bool {
|
2017-05-12 12:24:03 +00:00
|
|
|
unsafe {
|
2020-11-21 13:46:33 +00:00
|
|
|
from_glib(ffi::gst_element_factory_has_interface(
|
2019-06-18 10:12:00 +00:00
|
|
|
self.to_glib_none().0,
|
|
|
|
interfacename.to_glib_none().0,
|
|
|
|
))
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-08 13:00:17 +00:00
|
|
|
#[doc(alias = "gst_element_factory_find")]
|
2017-07-03 11:06:08 +00:00
|
|
|
pub fn find(name: &str) -> Option<ElementFactory> {
|
2017-07-10 09:36:15 +00:00
|
|
|
assert_initialized_main_thread!();
|
2020-11-21 13:46:33 +00:00
|
|
|
unsafe { from_glib_full(ffi::gst_element_factory_find(name.to_glib_none().0)) }
|
2017-07-03 11:06:08 +00:00
|
|
|
}
|
2017-05-12 12:24:03 +00:00
|
|
|
}
|
2017-07-03 11:06:08 +00:00
|
|
|
|
|
|
|
unsafe impl Send for ElementFactory {}
|
|
|
|
unsafe impl Sync for ElementFactory {}
|