mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
70cfc6cb4d
Original commit message from CVS: * new parser that uses flex and bison - doesn't do dynamic pipelines yet... * added GErrors to the gst_parse_launch[v] api * added --gst-mask-help command line option * fixed -o option for gst-launch * GstElement api change: - gst_element_get_pad - gst_element_get_request_pad, gst_element_get_static_pad - gst_element_get_compatible_pad - gst_element_get_compatible_static_pad, gst_element_get_compatible_request_pad - gst_element_[dis]connect -> gst_element_[dis]connect_pads - gst_element_[dis]connect_elements -> gst_element_[dis]connect * manual update * example, tool, and doc updates for the api changes - no more plugin docs in the core docs, plugins require a more extensive doc system
75 lines
2 KiB
XML
75 lines
2 KiB
XML
<chapter id="cha-plugins">
|
|
<title>What are Plugins</title>
|
|
<para>
|
|
A plugin is a shared library that contains at least one of the following items:
|
|
</para>
|
|
|
|
<itemizedlist>
|
|
<listitem>
|
|
<para>
|
|
one or more elementfactories
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
one or more typedefinitions
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
one or more autopluggers
|
|
</para>
|
|
</listitem>
|
|
<listitem>
|
|
<para>
|
|
exported symbols for use in other plugins
|
|
</para>
|
|
</listitem>
|
|
</itemizedlist>
|
|
<para>
|
|
The plugins have one simple method: plugin_init () where all the elementfactories are
|
|
created and the typedefinitions are registered.
|
|
</para>
|
|
<para>
|
|
the plugins are maintained in the plugin system. Optionally, the typedefinitions and
|
|
the elementfactories can be saved into an XML representation so that the plugin system
|
|
does not have to load all available plugins in order to know their definition.
|
|
</para>
|
|
|
|
<para>
|
|
The basic plugin structure has the following fields:
|
|
</para>
|
|
<programlisting>
|
|
struct _GstPlugin {
|
|
gchar *name; /* name of the plugin */
|
|
gchar *longname; /* long name of plugin */
|
|
gchar *filename; /* filename it came from */
|
|
|
|
GList *types; /* list of types provided */
|
|
gint numtypes;
|
|
GList *elements; /* list of elements provided */
|
|
gint numelements;
|
|
GList *autopluggers; /* list of autopluggers provided */
|
|
gint numautopluggers;
|
|
|
|
gboolean loaded; /* if the plugin is in memory */
|
|
};
|
|
</programlisting>
|
|
|
|
<para>
|
|
You can query a GList of available plugins with:
|
|
</para>
|
|
<programlisting>
|
|
GList *plugins;
|
|
|
|
plugins = gst_plugin_get_list ();
|
|
|
|
while (plugins) {
|
|
GstPlugin *plugin = (GstPlugin *)plugins->data;
|
|
|
|
g_print ("plugin: %s\n", gst_plugin_get_name (plugin));
|
|
|
|
plugins = g_list_next (plugins);
|
|
}
|
|
</programlisting>
|
|
</chapter>
|