gstreamer/auto/
type_find_factory.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
4// DO NOT EDIT
5
6use crate::{ffi, Caps, Object, PluginFeature};
7use glib::translate::*;
8
9glib::wrapper! {
10    #[doc(alias = "GstTypeFindFactory")]
11    pub struct TypeFindFactory(Object<ffi::GstTypeFindFactory, ffi::GstTypeFindFactoryClass>) @extends PluginFeature, Object;
12
13    match fn {
14        type_ => || ffi::gst_type_find_factory_get_type(),
15    }
16}
17
18impl TypeFindFactory {
19    #[doc(alias = "gst_type_find_factory_get_caps")]
20    #[doc(alias = "get_caps")]
21    pub fn caps(&self) -> Option<Caps> {
22        unsafe { from_glib_none(ffi::gst_type_find_factory_get_caps(self.to_glib_none().0)) }
23    }
24
25    #[doc(alias = "gst_type_find_factory_get_extensions")]
26    #[doc(alias = "get_extensions")]
27    pub fn extensions(&self) -> Vec<glib::GString> {
28        unsafe {
29            FromGlibPtrContainer::from_glib_none(ffi::gst_type_find_factory_get_extensions(
30                self.to_glib_none().0,
31            ))
32        }
33    }
34
35    #[doc(alias = "gst_type_find_factory_has_function")]
36    pub fn has_function(&self) -> bool {
37        unsafe {
38            from_glib(ffi::gst_type_find_factory_has_function(
39                self.to_glib_none().0,
40            ))
41        }
42    }
43}
44
45unsafe impl Send for TypeFindFactory {}
46unsafe impl Sync for TypeFindFactory {}