GstDynamicTypeFactory

GstDynamicTypeFactory is used to represent a type that can be automatically loaded the first time it is used. For example, a non-standard type for use in caps fields.

In general, applications and plugins don't need to use the factory beyond registering the type in a plugin init function. Once that is done, the type is stored in the registry, and ready as soon as the registry is loaded.

Registering a type for dynamic loading


 static gboolean
 plugin_init (GstPlugin * plugin)
 {
   return gst_dynamic_type_register (plugin, GST_TYPE_CUSTOM_CAPS_FIELD);
 }

GstDynamicTypeFactory

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstPluginFeature
                ╰──GstDynamicTypeFactory

The opaque GstDynamicTypeFactory data structure.


Class structure

GstDynamicTypeFactoryClass


Gst.DynamicTypeFactoryClass


Gst.DynamicTypeFactoryClass


Gst.DynamicTypeFactory

GObject.Object
    ╰──GObject.InitiallyUnowned
        ╰──Gst.Object
            ╰──Gst.PluginFeature
                ╰──Gst.DynamicTypeFactory

The opaque Gst.DynamicTypeFactory data structure.


Gst.DynamicTypeFactory

GObject.Object
    ╰──GObject.InitiallyUnowned
        ╰──Gst.Object
            ╰──Gst.PluginFeature
                ╰──Gst.DynamicTypeFactory

The opaque Gst.DynamicTypeFactory data structure.


Functions

gst_dynamic_type_factory_load

GType
gst_dynamic_type_factory_load (const gchar * factoryname)

Parameters:

factoryname
No description available
Returns
No description available

Gst.DynamicTypeFactory.prototype.load

function Gst.DynamicTypeFactory.prototype.load(factoryname: String): {
    // javascript wrapper for 'gst_dynamic_type_factory_load'
}

Parameters:

factoryname (String)
No description available
Returns (GObject.Type)
No description available

Gst.DynamicTypeFactory.load

def Gst.DynamicTypeFactory.load (factoryname):
    #python wrapper for 'gst_dynamic_type_factory_load'

Parameters:

factoryname (str)
No description available
Returns (GObject.Type)
No description available

Functions

gst_dynamic_type_register

gboolean
gst_dynamic_type_register (GstPlugin * plugin,
                           GType type)

Registers a new GstDynamicTypeFactory in the registry

Parameters:

plugin

The GstPlugin to register dyn_type for

type

The GType to register dynamically

Returns
No description available

Since : 1.12


Gst.prototype.dynamic_type_register

function Gst.prototype.dynamic_type_register(plugin: Gst.Plugin, type: GObject.Type): {
    // javascript wrapper for 'gst_dynamic_type_register'
}

Registers a new Gst.DynamicTypeFactory in the registry

Parameters:

plugin (Gst.Plugin)

The Gst.Plugin to register dyn_type for

type (GObject.Type)

The GObject.Type to register dynamically

Returns (Number)
No description available

Since : 1.12


Gst.dynamic_type_register

def Gst.dynamic_type_register (plugin, type):
    #python wrapper for 'gst_dynamic_type_register'

Registers a new Gst.DynamicTypeFactory in the registry

Parameters:

plugin (Gst.Plugin)

The Gst.Plugin to register dyn_type for

type (GObject.Type)

The GObject.Type to register dynamically

Returns (bool)
No description available

Since : 1.12


Function Macros

GST_DYNAMIC_TYPE_CLASS

#define GST_DYNAMIC_TYPE_CLASS(klass)           (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_DYNAMIC_TYPE_FACTORY,\
                                                 GstDynamicTypeFactoryClass))

GST_DYNAMIC_TYPE_FACTORY_CAST

#define GST_DYNAMIC_TYPE_FACTORY_CAST(obj)      ((GstDynamicTypeFactory *)(obj))

GST_DYNAMIC_TYPE_REGISTER

#define GST_DYNAMIC_TYPE_REGISTER(t_n, plugin) G_PASTE(gst_dynamic_type_register_, t_n) (plugin)

This macro can be used to register a dynamic type into a GstPlugin. This method will be usually called in the plugin init function but can also be called with a NULL plugin.

Parameters:

t_n

The dynamic type name to register

plugin

The GstPlugin where to register the dynamic type.


GST_DYNAMIC_TYPE_REGISTER_DECLARE

#define GST_DYNAMIC_TYPE_REGISTER_DECLARE(t_n) \
G_BEGIN_DECLS \
gboolean G_PASTE(gst_dynamic_type_register_, t_n) (GstPlugin * plugin); \
G_END_DECLS

This macro can be used to declare a new dynamic type. It has to be used in combination with GST_DYNAMIC_TYPE_REGISTER_DEFINE macro and must be placed outside any block to declare the type find registration function.

Parameters:

t_f

The dynamic type name in lower case, with words separated by '_'.


GST_DYNAMIC_TYPE_REGISTER_DEFINE

#define GST_DYNAMIC_TYPE_REGISTER_DEFINE(t_n, t) \
G_BEGIN_DECLS \
gboolean G_PASTE (gst_dynamic_type_register_, t_n) (GstPlugin * plugin) \
{ \
  return gst_dynamic_type_register (plugin, t); \
} \
G_END_DECLS

A convenience macro to define the entry point of a dynamic type gst_dynamic_type_register_*(GstPlugin* plugin).

Parameters:

t_n

The dynamic type name in lower case, with words separated by '_'. Used to generate gst_dynamic_type_register_*(GstPlugin* plugin).

t

The GType of the dynamic type


The results of the search are