Next: GstQuery, Previous: GstPluginFeature, Up: Top
Container for features loaded from a shared object module
GStreamer is extensible, so <gst-element>
instances can be loaded at
runtime. A plugin system can provide one or more of the basic
GStreamer<gst-plugin-feature>
subclasses.
A plugin should export a symbol gst_plugin_desc
that is a struct of type
<gst-plugin-desc>
. the plugin loader will check the version of the core
library the plugin was linked against and will create a new <gst-plugin>
.
It will then call the <gst-plugin-init-func>
function that was provided
in the gst_plugin_desc
.
Once you have a handle to a <gst-plugin>
(e.g. from the
<gst-registry-pool>
), you can add any object that subclasses
<gst-plugin-feature>
.
Use gst-plugin-find-feature
and gst-plugin-get-feature-list
to
find features in a plugin.
Usually plugins are always automaticlly loaded so you don't need to call
gst-plugin-load
explicitly to bring it into memory. There are options to
statically link plugins to an app or even use GStreamer without a plugin
repository in which case gst-plugin-load
can be needed to bring the
plugin into memory.
This
<gobject>
class defines no properties, other than those defined by its superclasses.
unsigned-int
)Get the error quark.
- ret
- The error quark used in GError messages
<gst-plugin>
) (ret mchars
)Get the short name of the plugin
- plugin
- plugin to get the name of
- ret
- the name of the plugin
<gst-plugin>
) (ret mchars
)Get the long descriptive name of the plugin
- plugin
- plugin to get long name of
- ret
- the long name of the plugin
<gst-plugin>
) (ret mchars
)get the filename of the plugin
- plugin
- plugin to get the filename of
- ret
- the filename of the plugin
<gst-plugin>
) (ret mchars
)get the license of the plugin
- plugin
- plugin to get the license of
- ret
- the license of the plugin
<gst-plugin>
) (ret mchars
)get the package the plugin belongs to.
- plugin
- plugin to get the package of
- ret
- the package of the plugin
<gst-plugin>
) (ret mchars
)get the URL where the plugin comes from
- plugin
- plugin to get the origin of
- ret
- the origin of the plugin
<gst-plugin>
) (ret mchars
)get the source module the plugin belongs to.
- plugin
- plugin to get the source of
- ret
- the source of the plugin
<gst-plugin>
) (ret mchars
)get the version of the plugin
- plugin
- plugin to get the version of
- ret
- the version of the plugin
<gst-plugin>
) (ret <g-module*>
)Gets the
<g-module>
of the plugin. If the plugin isn't loaded yet, NULL is returned.
- plugin
- plugin to query
- ret
- module belonging to the plugin or NULL if the plugin isn't loaded yet.
<gst-plugin>
) (ret bool
)queries if the plugin is loaded into memory
- plugin
- plugin to query
- ret
- TRUE is loaded, FALSE otherwise
<gst-plugin>
) (name mchars
) (ret bool
)A standard filter that returns TRUE when the plugin is of the given name.
- plugin
- the plugin to check
- name
- the name of the plugin
- ret
- TRUE if the plugin is of the given name.
mchars
) (ret <gst-plugin>
)Loads the given plugin and refs it. Caller needs to unref after use.
- filename
- the plugin filename to load
- error
- pointer to a NULL-valued GError
- ret
- a reference to the existing loaded GstPlugin, a reference to the newly-loaded GstPlugin, or NULL if an error occurred.
<gst-plugin>
) (ret <gst-plugin>
)Loads plugin. Note that the *return value* is the loaded plugin; plugin is untouched. The normal use pattern of this function goes like this:
GstPlugin *loaded_plugin; loaded_plugin = gst_plugin_load (plugin); // presumably, we're no longer interested in the potentially-unloaded plugin gst_object_unref (plugin); plugin = loaded_plugin;
- plugin
- plugin to load
- ret
- A reference to a loaded plugin, or NULL on error.