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::{DeviceProvider, Object, PluginFeature};
7use glib::translate::*;
8
9glib::wrapper! {
10 #[doc(alias = "GstDeviceProviderFactory")]
11 pub struct DeviceProviderFactory(Object<ffi::GstDeviceProviderFactory, ffi::GstDeviceProviderFactoryClass>) @extends PluginFeature, Object;
12
13 match fn {
14 type_ => || ffi::gst_device_provider_factory_get_type(),
15 }
16}
17
18impl DeviceProviderFactory {
19 #[doc(alias = "gst_device_provider_factory_get")]
20 pub fn get(&self) -> Option<DeviceProvider> {
21 unsafe { from_glib_full(ffi::gst_device_provider_factory_get(self.to_glib_none().0)) }
22 }
23
24 #[doc(alias = "gst_device_provider_factory_get_device_provider_type")]
25 #[doc(alias = "get_device_provider_type")]
26 pub fn device_provider_type(&self) -> glib::types::Type {
27 unsafe {
28 from_glib(ffi::gst_device_provider_factory_get_device_provider_type(
29 self.to_glib_none().0,
30 ))
31 }
32 }
33
34 #[doc(alias = "gst_device_provider_factory_get_metadata_keys")]
35 #[doc(alias = "get_metadata_keys")]
36 pub fn metadata_keys(&self) -> Vec<glib::GString> {
37 unsafe {
38 FromGlibPtrContainer::from_glib_full(
39 ffi::gst_device_provider_factory_get_metadata_keys(self.to_glib_none().0),
40 )
41 }
42 }
43
44 #[doc(alias = "gst_device_provider_factory_has_classes")]
45 pub fn has_classes(&self, classes: Option<&str>) -> bool {
46 unsafe {
47 from_glib(ffi::gst_device_provider_factory_has_classes(
48 self.to_glib_none().0,
49 classes.to_glib_none().0,
50 ))
51 }
52 }
53
54 #[doc(alias = "gst_device_provider_factory_has_classesv")]
55 pub fn has_classesv(&self, classes: &[&str]) -> bool {
56 unsafe {
57 from_glib(ffi::gst_device_provider_factory_has_classesv(
58 self.to_glib_none().0,
59 classes.to_glib_none().0,
60 ))
61 }
62 }
63
64 #[doc(alias = "gst_device_provider_factory_find")]
65 pub fn find(name: &str) -> Option<DeviceProviderFactory> {
66 assert_initialized_main_thread!();
67 unsafe { from_glib_full(ffi::gst_device_provider_factory_find(name.to_glib_none().0)) }
68 }
69
70 #[doc(alias = "gst_device_provider_factory_get_by_name")]
71 #[doc(alias = "get_by_name")]
72 pub fn by_name(factoryname: &str) -> Option<DeviceProvider> {
73 assert_initialized_main_thread!();
74 unsafe {
75 from_glib_full(ffi::gst_device_provider_factory_get_by_name(
76 factoryname.to_glib_none().0,
77 ))
78 }
79 }
80}
81
82unsafe impl Send for DeviceProviderFactory {}
83unsafe impl Sync for DeviceProviderFactory {}
84