gstreamer/auto/
plugin_feature.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, Object, Plugin};
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10    #[doc(alias = "GstPluginFeature")]
11    pub struct PluginFeature(Object<ffi::GstPluginFeature, ffi::GstPluginFeatureClass>) @extends Object;
12
13    match fn {
14        type_ => || ffi::gst_plugin_feature_get_type(),
15    }
16}
17
18impl PluginFeature {
19    pub const NONE: Option<&'static PluginFeature> = None;
20}
21
22unsafe impl Send for PluginFeature {}
23unsafe impl Sync for PluginFeature {}
24
25pub trait PluginFeatureExt: IsA<PluginFeature> + 'static {
26    #[doc(alias = "gst_plugin_feature_check_version")]
27    fn check_version(&self, min_major: u32, min_minor: u32, min_micro: u32) -> bool {
28        unsafe {
29            from_glib(ffi::gst_plugin_feature_check_version(
30                self.as_ref().to_glib_none().0,
31                min_major,
32                min_minor,
33                min_micro,
34            ))
35        }
36    }
37
38    #[doc(alias = "gst_plugin_feature_get_plugin")]
39    #[doc(alias = "get_plugin")]
40    fn plugin(&self) -> Option<Plugin> {
41        unsafe {
42            from_glib_full(ffi::gst_plugin_feature_get_plugin(
43                self.as_ref().to_glib_none().0,
44            ))
45        }
46    }
47
48    #[doc(alias = "gst_plugin_feature_get_plugin_name")]
49    #[doc(alias = "get_plugin_name")]
50    fn plugin_name(&self) -> Option<glib::GString> {
51        unsafe {
52            from_glib_none(ffi::gst_plugin_feature_get_plugin_name(
53                self.as_ref().to_glib_none().0,
54            ))
55        }
56    }
57}
58
59impl<O: IsA<PluginFeature>> PluginFeatureExt for O {}