gstreamer-rs/gstreamer/src/auto/element_factory.rs

94 lines
3 KiB
Rust
Raw Normal View History

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)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
// DO NOT EDIT
2020-11-21 13:46:33 +00:00
use crate::Object;
use crate::PluginFeature;
use crate::URIType;
use glib::translate::*;
2020-11-21 13:46:33 +00:00
2020-12-17 22:34:53 +00:00
glib::wrapper! {
#[doc(alias = "GstElementFactory")]
2020-11-21 13:46:33 +00:00
pub struct ElementFactory(Object<ffi::GstElementFactory, ffi::GstElementFactoryClass>) @extends PluginFeature, Object;
match fn {
type_ => || ffi::gst_element_factory_get_type(),
}
}
impl ElementFactory {
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_element_factory_get_element_type")]
#[doc(alias = "get_element_type")]
2021-04-11 19:38:18 +00:00
pub fn element_type(&self) -> glib::types::Type {
unsafe {
2020-11-21 13:46:33 +00:00
from_glib(ffi::gst_element_factory_get_element_type(
self.to_glib_none().0,
))
}
}
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_element_factory_get_metadata_keys")]
#[doc(alias = "get_metadata_keys")]
2021-04-11 19:38:18 +00:00
pub fn metadata_keys(&self) -> Vec<glib::GString> {
unsafe {
2020-11-21 13:46:33 +00:00
FromGlibPtrContainer::from_glib_full(ffi::gst_element_factory_get_metadata_keys(
self.to_glib_none().0,
))
}
}
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_element_factory_get_num_pad_templates")]
#[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) }
}
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")]
#[doc(alias = "get_uri_protocols")]
2021-04-11 19:38:18 +00:00
pub fn uri_protocols(&self) -> Vec<glib::GString> {
unsafe {
2020-11-21 13:46:33 +00:00
FromGlibPtrContainer::from_glib_none(ffi::gst_element_factory_get_uri_protocols(
self.to_glib_none().0,
))
}
}
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_element_factory_get_uri_type")]
#[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)) }
}
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_element_factory_has_interface")]
pub fn has_interface(&self, interfacename: &str) -> bool {
unsafe {
2020-11-21 13:46:33 +00:00
from_glib(ffi::gst_element_factory_has_interface(
self.to_glib_none().0,
interfacename.to_glib_none().0,
))
}
}
2020-12-08 13:00:17 +00:00
#[doc(alias = "gst_element_factory_find")]
pub fn find(name: &str) -> Option<ElementFactory> {
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)) }
}
}
unsafe impl Send for ElementFactory {}
unsafe impl Sync for ElementFactory {}