Gst.ElementFactory
const Gst = imports.gi.Gst; let element_factory = new Gst.ElementFactory();
Gst.ElementFactory is used to create instances of elements. A GstElementfactory can be added to a Gst.Plugin as it is also a Gst.PluginFeature.
Use the Gst.find and Gst.create functions to create element instances or use Gst.make as a convenient shortcut.
The following code example shows you how to create a GstFileSrc element.
<example> <title>Using an element factory</title> <programlisting language="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> </example>
Last reviewed on 2005-11-23 (0.9.5)
Hierarchy
-
GObject.Object
-
GObject.InitiallyUnowned
-
Gst.Object
-
Gst.PluginFeature
- Gst.ElementFactory
-
-
-
Methods
- Gst.ElementFactory.prototype.can_sink_all_caps
- Gst.ElementFactory.prototype.can_sink_any_caps
- Gst.ElementFactory.prototype.can_src_all_caps
- Gst.ElementFactory.prototype.can_src_any_caps
- Gst.ElementFactory.prototype.create
- Gst.ElementFactory.prototype.get_element_type
- Gst.ElementFactory.prototype.get_metadata
- Gst.ElementFactory.prototype.get_metadata_keys
- Gst.ElementFactory.prototype.get_num_pad_templates
- Gst.ElementFactory.prototype.get_static_pad_templates
- Gst.ElementFactory.prototype.get_uri_protocols
- Gst.ElementFactory.prototype.get_uri_type
- Gst.ElementFactory.prototype.has_interface
- Gst.ElementFactory.prototype.list_is_type