gstreamer-rs/gstreamer/src/auto/type_find_factory.rs

53 lines
1.5 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)
2017-12-18 07:52:22 +00:00
// DO NOT EDIT
use Caps;
use Object;
use PluginFeature;
use glib::GString;
2017-12-18 07:52:22 +00:00
use glib::translate::*;
2019-03-19 07:40:05 +00:00
use gst_sys;
2017-12-18 07:52:22 +00:00
glib_wrapper! {
2019-03-19 07:40:05 +00:00
pub struct TypeFindFactory(Object<gst_sys::GstTypeFindFactory, gst_sys::GstTypeFindFactoryClass, TypeFindFactoryClass>) @extends PluginFeature, Object;
2017-12-18 07:52:22 +00:00
match fn {
2019-03-19 07:40:05 +00:00
get_type => || gst_sys::gst_type_find_factory_get_type(),
2017-12-18 07:52:22 +00:00
}
}
impl TypeFindFactory {
//pub fn call_function(&self, find: /*Ignored*/&mut TypeFind) {
2019-03-19 07:40:05 +00:00
// unsafe { TODO: call gst_sys:gst_type_find_factory_call_function() }
2017-12-18 07:52:22 +00:00
//}
pub fn get_caps(&self) -> Option<Caps> {
unsafe {
2019-03-19 07:40:05 +00:00
from_glib_none(gst_sys::gst_type_find_factory_get_caps(self.to_glib_none().0))
2017-12-18 07:52:22 +00:00
}
}
pub fn get_extensions(&self) -> Vec<GString> {
2017-12-18 07:52:22 +00:00
unsafe {
2019-03-19 07:40:05 +00:00
FromGlibPtrContainer::from_glib_none(gst_sys::gst_type_find_factory_get_extensions(self.to_glib_none().0))
2017-12-18 07:52:22 +00:00
}
}
pub fn has_function(&self) -> bool {
unsafe {
2019-03-19 07:40:05 +00:00
from_glib(gst_sys::gst_type_find_factory_has_function(self.to_glib_none().0))
2017-12-18 07:52:22 +00:00
}
}
pub fn get_list() -> Vec<TypeFindFactory> {
assert_initialized_main_thread!();
unsafe {
2019-03-19 07:40:05 +00:00
FromGlibPtrContainer::from_glib_full(gst_sys::gst_type_find_factory_get_list())
2017-12-18 07:52:22 +00:00
}
}
}
unsafe impl Send for TypeFindFactory {}
unsafe impl Sync for TypeFindFactory {}