mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 08:11:16 +00:00
385b9ee5c4
Original commit message from CVS: merge in tagging Includes: - gsttag.[ch] - The definition of GstTagList and tag registering/querying - gsttaginterface.[ch] - Interface for elements that can handle setting of tags - updates and merges to gststructure.[ch] and gstvalue.[ch] - testsuite/tags - some tests for tagging - bugfixes - updates to make make distcheck work - updates the version number to 0.7.2.1 Does not include: - including tagging stuff in docs - extensive tests
116 lines
2.3 KiB
Text
116 lines
2.3 KiB
Text
<!-- ##### 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>
|
|
Use gst_element_factory_new() to create a new factory which can be added to a plugin
|
|
with gst_plugin_add_feature().
|
|
</para>
|
|
<para>
|
|
gst_element_factory_add_pad_template() 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.
|
|
</para>
|
|
<para>
|
|
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
|
|
shortcut.
|
|
</para>
|
|
<para>
|
|
The following code example shows you how to create a GstFileSrc element.
|
|
</para>
|
|
|
|
<para>
|
|
<programlisting role="C">
|
|
#include <gst/gst.h>
|
|
|
|
GstElement *src;
|
|
GstElementFactory *srcfactory;
|
|
|
|
gst_init(&argc,&argv);
|
|
|
|
srcfactory = gst_element_factory_find("filesrc");
|
|
g_return_if_fail(srcfactory != NULL);
|
|
|
|
src = gst_element_factory_create(srcfactory,"src");
|
|
g_return_if_fail(src != NULL);
|
|
...
|
|
</programlisting>
|
|
</para>
|
|
<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>
|
|
|
|
<!-- ##### 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:
|
|
|
|
<!-- ##### 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:
|
|
|
|
|