gstreamer/
tracer.rs

1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use glib::translate::*;
4
5use crate::{Plugin, Tracer};
6
7impl Tracer {
8    #[doc(alias = "gst_tracer_register")]
9    pub fn register(
10        plugin: Option<&Plugin>,
11        name: &str,
12        type_: glib::types::Type,
13    ) -> Result<(), glib::error::BoolError> {
14        skip_assert_initialized!();
15        unsafe {
16            glib::result_from_gboolean!(
17                crate::ffi::gst_tracer_register(
18                    plugin.to_glib_none().0,
19                    name.to_glib_none().0,
20                    type_.into_glib()
21                ),
22                "Failed to register tracer factory"
23            )
24        }
25    }
26}