// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
// DO NOT EDIT

use crate::{Object, PluginFeature, ffi};
use glib::translate::*;

glib::wrapper! {
    #[doc(alias = "GstDynamicTypeFactory")]
    pub struct DynamicTypeFactory(Object<ffi::GstDynamicTypeFactory, ffi::GstDynamicTypeFactoryClass>) @extends PluginFeature, Object;

    match fn {
        type_ => || ffi::gst_dynamic_type_factory_get_type(),
    }
}

impl DynamicTypeFactory {
    #[doc(alias = "gst_dynamic_type_factory_load")]
    pub fn load(factoryname: &str) -> glib::types::Type {
        assert_initialized_main_thread!();
        unsafe {
            from_glib(ffi::gst_dynamic_type_factory_load(
                factoryname.to_glib_none().0,
            ))
        }
    }
}

unsafe impl Send for DynamicTypeFactory {}
unsafe impl Sync for DynamicTypeFactory {}
