Name
GstElementFactory -- Create GstElements from a factory
Description
GstElementFactory is used to create instances of elements. A GstElementfactory
can be added to a GstPlugin as it is also a GstPluginFeature.
Use gst_elementfactory_new() to create a new factory which can be added to a plugin
with gst_plugin_add_feature().
gst_elementfactory_get_list() is used to get a list of all available factories in
the plugin repository.
gst_elementfactory_add_padtemplate() 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_elementfactory_find() and gst_elementfactory_create() functions
to create element instances or use gst_elementfactory_make() as a convenient
shortcut.
The following code example shows you how to create a GstDiskSrc element.
include <gst/gst.h>
GstElement *src;
GstElementFactory *srcfactory;
gst_init(&argc,&argv);
srcfactory = gst_elementfactory_find("filesrc");
g_return_if_fail(srcfactory != NULL);
src = gst_elementfactory_create(srcfactory,"src");
g_return_if_fail(src != NULL);
...
|
Details
struct GstElementDetails
struct GstElementDetails {
gchar *longname; /* long, english name */
gchar *klass; /* type of element, as hierarchy */
gchar *description; /* insights of one form or another */
gchar *version; /* version of the element */
gchar *author; /* who wrote this thing? */
gchar *copyright; /* copyright details (year, etc.) */
}; |
This struct is used to define public information about the element. It
describes the element, mostly for the benefit of editors.
gst_elementfactory_new ()
Create a new elementfactory capable of insantiating objects of the
given type.
gst_elementfactory_find ()
Search for an elementfactory of the given name.
gst_elementfactory_get_list ()
const GList* gst_elementfactory_get_list (void); |
Get the global list of elementfactories.
gst_elementfactory_add_padtemplate ()
Add the given padtemplate to this elementfactory.
gst_elementfactory_can_src_caps ()
Checks if the factory can source the given capability.
gst_elementfactory_can_sink_caps ()
Checks if the factory can sink the given capability.
gst_elementfactory_create ()
Create a new element of the type defined by the given elementfactory.
It wll be given the name supplied, since all elements require a name as
their first argument.
gst_elementfactory_make ()
GstElement* gst_elementfactory_make (const gchar *factoryname,
const gchar *name); |
Create a new element of the type defined by the given elementfactory.
It wll be given the name supplied, since all elements require a name as
their first argument.