1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 Create GstElements from a factory
7 <!-- ##### SECTION Long_Description ##### -->
9 GstElementFactory is used to create instances of elements. A GstElementfactory
10 can be added to a #GstPlugin as it is also a #GstPluginFeature.
13 Use gst_element_factory_new() to create a new factory which can be added to a plugin
14 with gst_plugin_add_feature().
17 gst_element_factory_get_list() is used to get a list of all available factories in
18 the plugin repository.
21 gst_element_factory_add_pad_template() is used to add a padtemplate to the factory.
22 This function will enable the application to query for elementfactories that handle
23 a specific media type.
26 Use the gst_element_factory_find() and gst_element_factory_create() functions
27 to create element instances or use gst_element_factory_make() as a convenient
31 The following code example shows you how to create a GstDiskSrc element.
35 <programlisting role="C">
36 #include <gst/gst.h>
39 GstElementFactory *srcfactory;
41 gst_init(&argc,&argv);
43 srcfactory = gst_element_factory_find("filesrc");
44 g_return_if_fail(srcfactory != NULL);
46 src = gst_element_factory_create(srcfactory,"src");
47 g_return_if_fail(src != NULL);
52 <!-- ##### SECTION See_Also ##### -->
54 #GstElement, #GstPlugin, #GstPluginFeature, #GstPadTemplate.
57 <!-- ##### STRUCT GstElementDetails ##### -->
59 This struct is used to define public information about the element. It
60 describes the element, mostly for the benefit of editors.