GstElementFactory
Create GstElements from a factory
GstElementFactory is used to create instances of elements. A GstElementfactory
can be added to a #GstPlugin as it is also a #GstPluginFeature.
Use gst_element_factory_new() to create a new factory which can be added to a plugin
with gst_plugin_add_feature().
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.
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.
The following code example shows you how to create a GstFileSrc element.
#include <gst/gst.h>
GstElement *src;
GstElementFactory *srcfactory;
gst_init(&argc,&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);
...
An elementfactory can be assigned a rank with gst_element_factory_set_rank()
so that the autopluggers can select a plugin more appropriatly
#GstElement, #GstPlugin, #GstPluginFeature, #GstPadTemplate.
This struct is used to define public information about the element. It
describes the element, mostly for the benefit of editors.
@longname:
@klass:
@description:
@version:
@author:
@copyright:
@name:
@type:
@details:
@Returns:
@name:
@Returns:
@elementfactory:
@templ:
@factory:
@caps:
@Returns:
@factory:
@caps:
@Returns:
@factory:
@name:
@Returns:
@factoryname:
@name:
@Returns:
@factory:
@rank:
The element is only marginally usefull for autoplugging
The plugin may not be used in autoplugging
The plugin is well suited for autoplugging
The plugin is suited for autoplugging but only as a second
candidate.