gstreamer/auto/
tracer_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, Object, PluginFeature};
7use glib::translate::*;
8
9glib::wrapper! {
10    /// Use [`factories()`][Self::factories()] to get a list of tracer factories known to
11    /// GStreamer.
12    ///
13    /// # Implements
14    ///
15    /// [`PluginFeatureExt`][trait@crate::prelude::PluginFeatureExt], [`GstObjectExt`][trait@crate::prelude::GstObjectExt], [`trait@glib::ObjectExt`], [`PluginFeatureExtManual`][trait@crate::prelude::PluginFeatureExtManual]
16    #[doc(alias = "GstTracerFactory")]
17    pub struct TracerFactory(Object<ffi::GstTracerFactory, ffi::GstTracerFactoryClass>) @extends PluginFeature, Object;
18
19    match fn {
20        type_ => || ffi::gst_tracer_factory_get_type(),
21    }
22}
23
24impl TracerFactory {
25    /// Get the `GType` for elements managed by this factory. The type can
26    /// only be retrieved if the element factory is loaded, which can be
27    /// assured with [`PluginFeatureExtManual::load()`][crate::prelude::PluginFeatureExtManual::load()].
28    ///
29    /// # Returns
30    ///
31    /// the `GType` for tracers managed by this factory or 0 if
32    /// the factory is not loaded.
33    #[doc(alias = "gst_tracer_factory_get_tracer_type")]
34    #[doc(alias = "get_tracer_type")]
35    pub fn tracer_type(&self) -> glib::types::Type {
36        unsafe {
37            from_glib(ffi::gst_tracer_factory_get_tracer_type(
38                self.to_glib_none().0,
39            ))
40        }
41    }
42}
43
44unsafe impl Send for TracerFactory {}
45unsafe impl Sync for TracerFactory {}