gstreamer/docs/gst/tmpl/gstelementfactory.sgml
Thomas Vander Stichele 6a37dda6d6 doc fixes to match API
Original commit message from CVS:
doc fixes to match API
2002-04-12 16:22:32 +00:00

70 lines
1.8 KiB
Plaintext

<!-- ##### SECTION Title ##### -->
GstElementFactory
<!-- ##### SECTION Short_Description ##### -->
Create GstElements from a factory
<!-- ##### SECTION Long_Description ##### -->
<para>
GstElementFactory is used to create instances of elements. A GstElementfactory
can be added to a #GstPlugin as it is also a #GstPluginFeature.
</para>
<para>
Use gst_element_factory_new() to create a new factory which can be added to a plugin
with gst_plugin_add_feature().
</para>
<para>
gst_element_factory_get_list() is used to get a list of all available factories in
the plugin repository.
</para>
<para>
gst_element_factory_add_pad_template() is used to add a padtemplate to the factory.
This function will enable the application to query for elementfactories that handle
a specific media type.
</para>
<para>
Use the gst_element_factory_find() and gst_element_factory_create() functions
to create element instances or use gst_element_factory_make() as a convenient
shortcut.
</para>
<para>
The following code example shows you how to create a GstDiskSrc element.
</para>
<para>
<programlisting role="C">
#include &lt;gst/gst.h&gt;
GstElement *src;
GstElementFactory *srcfactory;
gst_init(&amp;argc,&amp;argv);
srcfactory = gst_element_factory_find("filesrc");
g_return_if_fail(srcfactory != NULL);
src = gst_element_factory_create(srcfactory,"src");
g_return_if_fail(src != NULL);
...
</programlisting>
</para>
<!-- ##### SECTION See_Also ##### -->
<para>
#GstElement, #GstPlugin, #GstPluginFeature, #GstPadTemplate.
</para>
<!-- ##### STRUCT GstElementDetails ##### -->
<para>
This struct is used to define public information about the element. It
describes the element, mostly for the benefit of editors.
</para>
@longname:
@klass:
@description:
@version:
@author:
@copyright: