doc fixes to match API
[platform/upstream/gstreamer.git] / docs / gst / tmpl / gstelementfactory.sgml
1 <!-- ##### SECTION Title ##### -->
2 GstElementFactory
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Create GstElements from a factory
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 GstElementFactory is used to create instances of elements. A GstElementfactory
10 can be added to a #GstPlugin as it is also a #GstPluginFeature.
11 </para>
12 <para>
13 Use gst_element_factory_new() to create a new factory which can be added to a plugin 
14 with gst_plugin_add_feature().
15 </para>
16 <para>
17 gst_element_factory_get_list() is used to get a list of all available factories in
18 the plugin repository.
19 </para>
20 <para>
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.
24 </para>
25 <para>
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 
28 shortcut.
29 </para>
30 <para>
31 The following code example shows you how to create a GstDiskSrc element.
32 </para>
33
34 <para>
35   <programlisting role="C">
36   #include &lt;gst/gst.h&gt;
37
38   GstElement *src;
39   GstElementFactory *srcfactory;
40
41   gst_init(&amp;argc,&amp;argv);
42
43   srcfactory = gst_element_factory_find("filesrc");
44   g_return_if_fail(srcfactory != NULL);
45
46   src = gst_element_factory_create(srcfactory,"src");
47   g_return_if_fail(src != NULL);
48   ...
49   </programlisting>
50 </para>
51
52 <!-- ##### SECTION See_Also ##### -->
53 <para>
54 #GstElement, #GstPlugin, #GstPluginFeature, #GstPadTemplate.
55 </para>
56
57 <!-- ##### STRUCT GstElementDetails ##### -->
58 <para>
59 This struct is used to define public information about the element.  It
60 describes the element, mostly for the benefit of editors.
61 </para>
62
63 @longname: 
64 @klass: 
65 @description: 
66 @version: 
67 @author: 
68 @copyright: 
69