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 &lt;gst/gst.h&gt;

GstElement *src; GstElementFactory *srcfactory;

gst_init (&amp;argc, &amp;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