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_add_pad_template() is used to add a padtemplate to the factory.
18 This function will enable the application to query for elementfactories that handle
19 a specific media type.
22 Use the gst_element_factory_find() and gst_element_factory_create() functions
23 to create element instances or use gst_element_factory_make() as a convenient
27 The following code example shows you how to create a GstFileSrc element.
31 <programlisting role="C">
32 #include <gst/gst.h>
35 GstElementFactory *srcfactory;
37 gst_init(&argc,&argv);
39 srcfactory = gst_element_factory_find("filesrc");
40 g_return_if_fail(srcfactory != NULL);
42 src = gst_element_factory_create(srcfactory,"src");
43 g_return_if_fail(src != NULL);
48 An elementfactory can be assigned a rank with gst_element_factory_set_rank()
49 so that the autopluggers can select a plugin more appropriatly
52 <!-- ##### SECTION See_Also ##### -->
54 #GstElement, #GstPlugin, #GstPluginFeature, #GstPadTemplate.
57 <!-- ##### STRUCT GstElementFactory ##### -->
63 <!-- ##### FUNCTION gst_element_register ##### -->
73 <!-- # Unused Parameters # -->
77 <!-- ##### FUNCTION gst_element_factory_find ##### -->
86 <!-- ##### FUNCTION gst_element_factory_get_element_type ##### -->
95 <!-- ##### FUNCTION gst_element_factory_get_longname ##### -->
104 <!-- ##### FUNCTION gst_element_factory_get_klass ##### -->
113 <!-- ##### FUNCTION gst_element_factory_get_description ##### -->
122 <!-- ##### FUNCTION gst_element_factory_get_author ##### -->
131 <!-- ##### FUNCTION gst_element_factory_get_num_pad_templates ##### -->
140 <!-- ##### FUNCTION gst_element_factory_get_pad_templates ##### -->
149 <!-- ##### FUNCTION gst_element_factory_get_uri_type ##### -->
158 <!-- ##### FUNCTION gst_element_factory_get_uri_protocols ##### -->
167 <!-- ##### FUNCTION gst_element_factory_create ##### -->
177 <!-- ##### FUNCTION gst_element_factory_make ##### -->