gstelementfactory.sgml 2.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
<!-- ##### SECTION Title ##### -->
GstElementFactory

<!-- ##### SECTION Short_Description ##### -->
Create GstElements from a factory

<!-- ##### SECTION Long_Description ##### -->
<para>
GstElementFactory is used to create instances of elements. A GstElementfactory
can be added to a #GstPlugin as it is also a #GstPluginFeature.
</para>
<para>
13
Use gst_element_factory_new() to create a new factory which can be added to a plugin 
14 15 16
with gst_plugin_add_feature().
</para>
<para>
17
gst_element_factory_add_pad_template() is used to add a padtemplate to the factory.
18 19 20 21
This function will enable the application to query for elementfactories that handle
a specific media type.
</para>
<para>
22 23
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 
24 25 26
shortcut.
</para>
<para>
Wim Taymans's avatar
Wim Taymans committed
27
The following code example shows you how to create a GstFileSrc element.
28 29 30 31 32 33 34 35 36 37 38
</para>

<para>
  <programlisting role="C">
  #include &lt;gst/gst.h&gt;

  GstElement *src;
  GstElementFactory *srcfactory;

  gst_init(&amp;argc,&amp;argv);

39
  srcfactory = gst_element_factory_find("filesrc");
40 41
  g_return_if_fail(srcfactory != NULL);

42
  src = gst_element_factory_create(srcfactory,"src");
43 44 45 46
  g_return_if_fail(src != NULL);
  ...
  </programlisting>
</para>
Wim Taymans's avatar
Wim Taymans committed
47 48 49 50
<para>
An elementfactory can be assigned a rank with gst_element_factory_set_rank() 
so that the autopluggers can select a plugin more appropriatly
</para>
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66

<!-- ##### SECTION See_Also ##### -->
<para>
#GstElement, #GstPlugin, #GstPluginFeature, #GstPadTemplate.
</para>

<!-- ##### STRUCT GstElementDetails ##### -->
<para>
This struct is used to define public information about the element.  It
describes the element, mostly for the benefit of editors.
</para>

@longname: 
@klass: 
@description: 
@author: 
Wim Taymans's avatar
Wim Taymans committed
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116

<!-- ##### FUNCTION gst_element_factory_find ##### -->
<para>

</para>

@name: 
@Returns: 


<!-- ##### FUNCTION gst_element_factory_can_src_caps ##### -->
<para>

</para>

@factory: 
@caps: 
@Returns: 


<!-- ##### FUNCTION gst_element_factory_can_sink_caps ##### -->
<para>

</para>

@factory: 
@caps: 
@Returns: 


<!-- ##### FUNCTION gst_element_factory_create ##### -->
<para>

</para>

@factory: 
@name: 
@Returns: 


<!-- ##### FUNCTION gst_element_factory_make ##### -->
<para>

</para>

@factoryname: 
@name: 
@Returns: