| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>GstElementFactory</title> |
| <meta name="generator" content="DocBook XSL Stylesheets V1.76.1"> |
| <link rel="home" href="index.html" title="GStreamer 1.0 Core Reference Manual"> |
| <link rel="up" href="libgstreamer.html" title="GStreamer Core Library"> |
| <link rel="prev" href="GstElement.html" title="GstElement"> |
| <link rel="next" href="gstreamer-GstGError.html" title="GstGError"> |
| <meta name="generator" content="GTK-Doc V1.18 (XML mode)"> |
| <link rel="stylesheet" href="style.css" type="text/css"> |
| </head> |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> |
| <tr valign="middle"> |
| <td><a accesskey="p" href="GstElement.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> |
| <td><a accesskey="u" href="libgstreamer.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> |
| <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> |
| <th width="100%" align="center">GStreamer 1.0 Core Reference Manual</th> |
| <td><a accesskey="n" href="gstreamer-GstGError.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> |
| </tr> |
| <tr><td colspan="5" class="shortcuts"> |
| <a href="#GstElementFactory.synopsis" class="shortcut">Top</a> |
| | |
| <a href="#GstElementFactory.description" class="shortcut">Description</a> |
| | |
| <a href="#GstElementFactory.object-hierarchy" class="shortcut">Object Hierarchy</a> |
| </td></tr> |
| </table> |
| <div class="refentry"> |
| <a name="GstElementFactory"></a><div class="titlepage"></div> |
| <div class="refnamediv"><table width="100%"><tr> |
| <td valign="top"> |
| <h2><span class="refentrytitle"><a name="GstElementFactory.top_of_page"></a>GstElementFactory</span></h2> |
| <p>GstElementFactory — Create GstElements from a factory</p> |
| </td> |
| <td valign="top" align="right"></td> |
| </tr></table></div> |
| <div class="refsynopsisdiv"> |
| <a name="GstElementFactory.synopsis"></a><h2>Synopsis</h2> |
| <pre class="synopsis"> |
| #include <gst/gst.h> |
| |
| struct <a class="link" href="GstElementFactory.html#GstElementFactory-struct" title="struct GstElementFactory">GstElementFactory</a>; |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GstElementFactory.html#gst-element-register" title="gst_element_register ()">gst_element_register</a> (<em class="parameter"><code><a class="link" href="GstPlugin.html" title="GstPlugin"><span class="type">GstPlugin</span></a> *plugin</code></em>, |
| <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> rank</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>); |
| <a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="returnvalue">GstElementFactory</span></a> * <a class="link" href="GstElementFactory.html#gst-element-factory-find" title="gst_element_factory_find ()">gst_element_factory_find</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>); |
| <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> <a class="link" href="GstElementFactory.html#gst-element-factory-get-element-type" title="gst_element_factory_get_element_type ()">gst_element_factory_get_element_type</a> |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>); |
| const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="GstElementFactory.html#gst-element-factory-get-metadata" title="gst_element_factory_get_metadata ()">gst_element_factory_get_metadata</a> (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>, |
| <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="GstElementFactory.html#gst-element-factory-get-num-pad-templates" title="gst_element_factory_get_num_pad_templates ()">gst_element_factory_get_num_pad_templates</a> |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>); |
| <a class="link" href="gstreamer-GstUriHandler.html#GstURIType" title="enum GstURIType"><span class="returnvalue">GstURIType</span></a> <a class="link" href="GstElementFactory.html#gst-element-factory-get-uri-type" title="gst_element_factory_get_uri_type ()">gst_element_factory_get_uri_type</a> (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>); |
| const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * const * <a class="link" href="GstElementFactory.html#gst-element-factory-get-uri-protocols" title="gst_element_factory_get_uri_protocols ()">gst_element_factory_get_uri_protocols</a> |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GstElementFactory.html#gst-element-factory-has-interface" title="gst_element_factory_has_interface ()">gst_element_factory_has_interface</a> (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>, |
| <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interfacename</code></em>); |
| <a class="link" href="GstElement.html" title="GstElement"><span class="returnvalue">GstElement</span></a> * <a class="link" href="GstElementFactory.html#gst-element-factory-create" title="gst_element_factory_create ()">gst_element_factory_create</a> (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>, |
| <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>); |
| <a class="link" href="GstElement.html" title="GstElement"><span class="returnvalue">GstElement</span></a> * <a class="link" href="GstElementFactory.html#gst-element-factory-make" title="gst_element_factory_make ()">gst_element_factory_make</a> (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *factoryname</code></em>, |
| <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GstElementFactory.html#gst-element-factory-can-sink-all-caps" title="gst_element_factory_can_sink_all_caps ()">gst_element_factory_can_sink_all_caps</a> |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>, |
| <em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GstElementFactory.html#gst-element-factory-can-src-all-caps" title="gst_element_factory_can_src_all_caps ()">gst_element_factory_can_src_all_caps</a> |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>, |
| <em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GstElementFactory.html#gst-element-factory-can-sink-any-caps" title="gst_element_factory_can_sink_any_caps ()">gst_element_factory_can_sink_any_caps</a> |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>, |
| <em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GstElementFactory.html#gst-element-factory-can-src-any-caps" title="gst_element_factory_can_src_any_caps ()">gst_element_factory_can_src_any_caps</a> |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>, |
| <em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>); |
| const <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="GstElementFactory.html#gst-element-factory-get-static-pad-templates" title="gst_element_factory_get_static_pad_templates ()">gst_element_factory_get_static_pad_templates</a> |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>); |
| typedef <a class="link" href="GstElementFactory.html#GstElementFactoryListType" title="GstElementFactoryListType">GstElementFactoryListType</a>; |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-ANY:CAPS" title="GST_ELEMENT_FACTORY_TYPE_ANY">GST_ELEMENT_FACTORY_TYPE_ANY</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-AUDIOVIDEO-SINKS:CAPS" title="GST_ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS">GST_ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-AUDIO-ENCODER:CAPS" title="GST_ELEMENT_FACTORY_TYPE_AUDIO_ENCODER">GST_ELEMENT_FACTORY_TYPE_AUDIO_ENCODER</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-DECODABLE:CAPS" title="GST_ELEMENT_FACTORY_TYPE_DECODABLE">GST_ELEMENT_FACTORY_TYPE_DECODABLE</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-DECODER:CAPS" title="GST_ELEMENT_FACTORY_TYPE_DECODER">GST_ELEMENT_FACTORY_TYPE_DECODER</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-DEMUXER:CAPS" title="GST_ELEMENT_FACTORY_TYPE_DEMUXER">GST_ELEMENT_FACTORY_TYPE_DEMUXER</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-DEPAYLOADER:CAPS" title="GST_ELEMENT_FACTORY_TYPE_DEPAYLOADER">GST_ELEMENT_FACTORY_TYPE_DEPAYLOADER</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-ENCODER:CAPS" title="GST_ELEMENT_FACTORY_TYPE_ENCODER">GST_ELEMENT_FACTORY_TYPE_ENCODER</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-FORMATTER:CAPS" title="GST_ELEMENT_FACTORY_TYPE_FORMATTER">GST_ELEMENT_FACTORY_TYPE_FORMATTER</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-MAX-ELEMENTS:CAPS" title="GST_ELEMENT_FACTORY_TYPE_MAX_ELEMENTS">GST_ELEMENT_FACTORY_TYPE_MAX_ELEMENTS</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-MEDIA-AUDIO:CAPS" title="GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO">GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-MEDIA-IMAGE:CAPS" title="GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE">GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-MEDIA-METADATA:CAPS" title="GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA">GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-MEDIA-SUBTITLE:CAPS" title="GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE">GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-MEDIA-VIDEO:CAPS" title="GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO">GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-MEDIA-ANY:CAPS" title="GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY">GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-MUXER:CAPS" title="GST_ELEMENT_FACTORY_TYPE_MUXER">GST_ELEMENT_FACTORY_TYPE_MUXER</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-PARSER:CAPS" title="GST_ELEMENT_FACTORY_TYPE_PARSER">GST_ELEMENT_FACTORY_TYPE_PARSER</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-PAYLOADER:CAPS" title="GST_ELEMENT_FACTORY_TYPE_PAYLOADER">GST_ELEMENT_FACTORY_TYPE_PAYLOADER</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-SINK:CAPS" title="GST_ELEMENT_FACTORY_TYPE_SINK">GST_ELEMENT_FACTORY_TYPE_SINK</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-SRC:CAPS" title="GST_ELEMENT_FACTORY_TYPE_SRC">GST_ELEMENT_FACTORY_TYPE_SRC</a> |
| #define <a class="link" href="GstElementFactory.html#GST-ELEMENT-FACTORY-TYPE-VIDEO-ENCODER:CAPS" title="GST_ELEMENT_FACTORY_TYPE_VIDEO_ENCODER">GST_ELEMENT_FACTORY_TYPE_VIDEO_ENCODER</a> |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="GstElementFactory.html#gst-element-factory-list-filter" title="gst_element_factory_list_filter ()">gst_element_factory_list_filter</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *list</code></em>, |
| <em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>, |
| <em class="parameter"><code><a class="link" href="GstPad.html#GstPadDirection" title="enum GstPadDirection"><span class="type">GstPadDirection</span></a> direction</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> subsetonly</code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * <a class="link" href="GstElementFactory.html#gst-element-factory-list-get-elements" title="gst_element_factory_list_get_elements ()">gst_element_factory_list_get_elements</a> |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html#GstElementFactoryListType" title="GstElementFactoryListType"><span class="type">GstElementFactoryListType</span></a> type</code></em>, |
| <em class="parameter"><code><a class="link" href="GstPluginFeature.html#GstRank" title="enum GstRank"><span class="type">GstRank</span></a> minrank</code></em>); |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="GstElementFactory.html#gst-element-factory-list-is-type" title="gst_element_factory_list_is_type ()">gst_element_factory_list_is_type</a> (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>, |
| <em class="parameter"><code><a class="link" href="GstElementFactory.html#GstElementFactoryListType" title="GstElementFactoryListType"><span class="type">GstElementFactoryListType</span></a> type</code></em>); |
| </pre> |
| </div> |
| <div class="refsect1"> |
| <a name="GstElementFactory.object-hierarchy"></a><h2>Object Hierarchy</h2> |
| <pre class="synopsis"> |
| <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a> |
| +----<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a> |
| +----<a class="link" href="GstObject.html" title="GstObject">GstObject</a> |
| +----<a class="link" href="GstPluginFeature.html" title="GstPluginFeature">GstPluginFeature</a> |
| +----GstElementFactory |
| </pre> |
| </div> |
| <div class="refsect1"> |
| <a name="GstElementFactory.description"></a><h2>Description</h2> |
| <p> |
| <a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> is used to create instances of elements. A |
| GstElementfactory can be added to a <a class="link" href="GstPlugin.html" title="GstPlugin"><span class="type">GstPlugin</span></a> as it is also a |
| <a class="link" href="GstPluginFeature.html" title="GstPluginFeature"><span class="type">GstPluginFeature</span></a>. |
| </p> |
| <p> |
| Use the <a class="link" href="GstElementFactory.html#gst-element-factory-find" title="gst_element_factory_find ()"><code class="function">gst_element_factory_find()</code></a> and <a class="link" href="GstElementFactory.html#gst-element-factory-create" title="gst_element_factory_create ()"><code class="function">gst_element_factory_create()</code></a> |
| functions to create element instances or use <a class="link" href="GstElementFactory.html#gst-element-factory-make" title="gst_element_factory_make ()"><code class="function">gst_element_factory_make()</code></a> as a |
| convenient shortcut. |
| </p> |
| <p> |
| The following code example shows you how to create a GstFileSrc element. |
| </p> |
| <p> |
| </p> |
| <div class="example"> |
| <a name="idp13088976"></a><p class="title"><b>Example 6. Using an element factory</b></p> |
| <div class="example-contents"> |
| <table class="listing_frame" border="0" cellpadding="0" cellspacing="0"> |
| <tbody> |
| <tr> |
| <td class="listing_lines" align="right"><pre>1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |
| 7 |
| 8 |
| 9 |
| 10 |
| 11 |
| 12</pre></td> |
| <td class="listing_code"><pre class="programlisting"><span class="gtkdoc ppc">#include <gst/gst.h></span> |
| |
| GstElement <span class="gtkdoc opt">*</span>src<span class="gtkdoc opt">;</span> |
| GstElementFactory <span class="gtkdoc opt">*</span>srcfactory<span class="gtkdoc opt">;</span> |
| |
| <span class="function"><a href="../gstreamer-1.0/gstreamer-Gst.html#gst-init">gst_init</a></span> <span class="gtkdoc opt">(&</span>argc<span class="gtkdoc opt">, &</span>argv<span class="gtkdoc opt">);</span> |
| |
| srcfactory <span class="gtkdoc opt">=</span> <span class="function"><a href="../gstreamer-1.0/GstElementFactory.html#gst-element-factory-find">gst_element_factory_find</a></span> <span class="gtkdoc opt">(</span><span class="string">"filesrc"</span><span class="gtkdoc opt">);</span> |
| <span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Warnings-and-Assertions.html#g-return-if-fail">g_return_if_fail</a></span> <span class="gtkdoc opt">(</span>srcfactory <span class="gtkdoc opt">!=</span> NULL<span class="gtkdoc opt">);</span> |
| src <span class="gtkdoc opt">=</span> <span class="function"><a href="../gstreamer-1.0/GstElementFactory.html#gst-element-factory-create">gst_element_factory_create</a></span> <span class="gtkdoc opt">(</span>srcfactory<span class="gtkdoc opt">,</span> <span class="string">"src"</span><span class="gtkdoc opt">);</span> |
| <span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Warnings-and-Assertions.html#g-return-if-fail">g_return_if_fail</a></span> <span class="gtkdoc opt">(</span>src <span class="gtkdoc opt">!=</span> NULL<span class="gtkdoc opt">);</span> |
| <span class="gtkdoc opt">...</span></pre></td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| |
| </div> |
| <p><br class="example-break"> |
| </p> |
| <p> |
| Last reviewed on 2005-11-23 (0.9.5) |
| </p> |
| </div> |
| <div class="refsect1"> |
| <a name="GstElementFactory.details"></a><h2>Details</h2> |
| <div class="refsect2"> |
| <a name="GstElementFactory-struct"></a><h3>struct GstElementFactory</h3> |
| <pre class="programlisting">struct GstElementFactory;</pre> |
| <p> |
| The opaque <a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> data structure. |
| </p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-register"></a><h3>gst_element_register ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_element_register (<em class="parameter"><code><a class="link" href="GstPlugin.html" title="GstPlugin"><span class="type">GstPlugin</span></a> *plugin</code></em>, |
| <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> rank</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>);</pre> |
| <p> |
| Create a new elementfactory capable of instantiating objects of the |
| <em class="parameter"><code>type</code></em> and add the factory to <em class="parameter"><code>plugin</code></em>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td> |
| <td> |
| <a class="link" href="GstPlugin.html" title="GstPlugin"><span class="type">GstPlugin</span></a> to register the element with, or NULL for |
| a static element (note that passing NULL only works in GStreamer 0.10.13 |
| and later). <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td> |
| <td>name of elements of this type</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>rank</code></em> :</span></p></td> |
| <td>rank of element (higher rank means more importance when autoplugging)</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
| <td>GType of element to register</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>TRUE, if the registering succeeded, FALSE on error</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-find"></a><h3>gst_element_factory_find ()</h3> |
| <pre class="programlisting"><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="returnvalue">GstElementFactory</span></a> * gst_element_factory_find (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre> |
| <p> |
| Search for an element factory of the given name. Refs the returned |
| element factory; caller is responsible for unreffing. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td> |
| <td>name of factory to find</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> |
| <a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> if found, NULL otherwise. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-get-element-type"></a><h3>gst_element_factory_get_element_type ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="returnvalue">GType</span></a> gst_element_factory_get_element_type |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>);</pre> |
| <p> |
| Get the <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> for elements managed by this factory. The type can |
| only be retrieved if the element factory is loaded, which can be |
| assured with <a class="link" href="GstPluginFeature.html#gst-plugin-feature-load" title="gst_plugin_feature_load ()"><code class="function">gst_plugin_feature_load()</code></a>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td> |
| <td>factory to get managed <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> from</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>the <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"><span class="type">GType</span></a> for elements managed by this factory or 0 if |
| the factory is not loaded.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-get-metadata"></a><h3>gst_element_factory_get_metadata ()</h3> |
| <pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * gst_element_factory_get_metadata (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>, |
| <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *key</code></em>);</pre> |
| <p> |
| Get the metadata on <em class="parameter"><code>factory</code></em> with <em class="parameter"><code>key</code></em>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>factory,</code></em> :</span></p></td> |
| <td>a <a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td> |
| <td>a key</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>the metadata with <em class="parameter"><code>key</code></em> on <em class="parameter"><code>factory</code></em> or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> when there was no |
| metadata with the given <em class="parameter"><code>key</code></em>.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-get-num-pad-templates"></a><h3>gst_element_factory_get_num_pad_templates ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> gst_element_factory_get_num_pad_templates |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>);</pre> |
| <p> |
| Gets the number of pad_templates in this factory. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td> |
| <td>a <a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>the number of pad_templates</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-get-uri-type"></a><h3>gst_element_factory_get_uri_type ()</h3> |
| <pre class="programlisting"><a class="link" href="gstreamer-GstUriHandler.html#GstURIType" title="enum GstURIType"><span class="returnvalue">GstURIType</span></a> gst_element_factory_get_uri_type (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>);</pre> |
| <p> |
| Gets the type of URIs the element supports or <a class="link" href="gstreamer-GstUriHandler.html#GST-URI-UNKNOWN:CAPS"><span class="type">GST_URI_UNKNOWN</span></a> if none. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td> |
| <td>a <a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>type of URIs this element supports</td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-get-uri-protocols"></a><h3>gst_element_factory_get_uri_protocols ()</h3> |
| <pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * const * gst_element_factory_get_uri_protocols |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>);</pre> |
| <p> |
| Gets a NULL-terminated array of protocols this element supports or NULL if |
| no protocols are supported. You may not change the contents of the returned |
| array, as it is still owned by the element factory. Use <a href="http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-strdupv"><code class="function">g_strdupv()</code></a> to |
| make a copy of the protocol string array if you need to. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td> |
| <td>a <a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>the supported protocols |
| or NULL. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-has-interface"></a><h3>gst_element_factory_has_interface ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_element_factory_has_interface (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>, |
| <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *interfacename</code></em>);</pre> |
| <p> |
| Check if <em class="parameter"><code>factory</code></em> implements the interface with name <em class="parameter"><code>interfacename</code></em>. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td> |
| <td>a <a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>interfacename</code></em> :</span></p></td> |
| <td>an interface name</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> when <em class="parameter"><code>factory</code></em> implement the interface.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 0.10.14</p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-create"></a><h3>gst_element_factory_create ()</h3> |
| <pre class="programlisting"><a class="link" href="GstElement.html" title="GstElement"><span class="returnvalue">GstElement</span></a> * gst_element_factory_create (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>, |
| <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre> |
| <p> |
| Create a new element of the type defined by the given elementfactory. |
| It will be given the name supplied, since all elements require a name as |
| their first argument. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td> |
| <td>factory to instantiate</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td> |
| <td>name of new element, or NULL to automatically create |
| a unique name. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>new <a class="link" href="GstElement.html" title="GstElement"><span class="type">GstElement</span></a> or NULL if the element couldn't |
| be created. <span class="annotation">[transfer floating]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-make"></a><h3>gst_element_factory_make ()</h3> |
| <pre class="programlisting"><a class="link" href="GstElement.html" title="GstElement"><span class="returnvalue">GstElement</span></a> * gst_element_factory_make (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *factoryname</code></em>, |
| <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre> |
| <p> |
| Create a new element of the type defined by the given element factory. |
| If name is NULL, then the element will receive a guaranteed unique name, |
| consisting of the element factory name and a number. |
| If name is given, it will be given the name supplied. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>factoryname</code></em> :</span></p></td> |
| <td>a named factory to instantiate</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td> |
| <td>name of new element, or NULL to automatically create |
| a unique name. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>new <a class="link" href="GstElement.html" title="GstElement"><span class="type">GstElement</span></a> or NULL if unable to create element. <span class="annotation">[transfer floating]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-can-sink-all-caps"></a><h3>gst_element_factory_can_sink_all_caps ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_element_factory_can_sink_all_caps |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>, |
| <em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>);</pre> |
| <p> |
| Checks if the factory can sink all possible capabilities. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td> |
| <td>factory to query</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td> |
| <td>the caps to check</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the caps are fully compatible.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 0.10.33</p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-can-src-all-caps"></a><h3>gst_element_factory_can_src_all_caps ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_element_factory_can_src_all_caps |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>, |
| <em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>);</pre> |
| <p> |
| Checks if the factory can src all possible capabilities. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td> |
| <td>factory to query</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td> |
| <td>the caps to check</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the caps are fully compatible.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 0.10.33</p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-can-sink-any-caps"></a><h3>gst_element_factory_can_sink_any_caps ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_element_factory_can_sink_any_caps |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>, |
| <em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>);</pre> |
| <p> |
| Checks if the factory can sink any possible capability. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td> |
| <td>factory to query</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td> |
| <td>the caps to check</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the caps have a common subset.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 0.10.33</p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-can-src-any-caps"></a><h3>gst_element_factory_can_src_any_caps ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_element_factory_can_src_any_caps |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>, |
| <em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>);</pre> |
| <p> |
| Checks if the factory can src any possible capability. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td> |
| <td>factory to query</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td> |
| <td>the caps to check</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the caps have a common subset.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 0.10.33</p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-get-static-pad-templates"></a><h3>gst_element_factory_get_static_pad_templates ()</h3> |
| <pre class="programlisting">const <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * gst_element_factory_get_static_pad_templates |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>);</pre> |
| <p> |
| Gets the <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of <a class="link" href="GstPadTemplate.html#GstStaticPadTemplate" title="struct GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> for this factory. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td> |
| <td>a <a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>the |
| static pad templates. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> Gst.StaticPadTemplate]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GstElementFactoryListType"></a><h3>GstElementFactoryListType</h3> |
| <pre class="programlisting">typedef guint64 GstElementFactoryListType; |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-ANY:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_ANY</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_ANY ((G_GUINT64_CONSTANT (1) << 49) - 1) |
| </pre> |
| <p> |
| Elements of any of the defined GST_ELEMENT_FACTORY_LIST types |
| </p> |
| <p class="since">Since 0.10.31</p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-AUDIOVIDEO-SINKS:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_AUDIOVIDEO_SINKS (GST_ELEMENT_FACTORY_TYPE_SINK | GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO | GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO | GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE) |
| </pre> |
| <p> |
| All sinks handling audio, video or image media types |
| </p> |
| <p class="since">Since 0.10.31</p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-AUDIO-ENCODER:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_AUDIO_ENCODER</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_AUDIO_ENCODER (GST_ELEMENT_FACTORY_TYPE_ENCODER | GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO) |
| </pre> |
| <p> |
| All encoders handling audio media types |
| </p> |
| <p class="since">Since 0.10.31</p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-DECODABLE:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_DECODABLE</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_DECODABLE</pre> |
| <p> |
| All elements used to 'decode' streams (decoders, demuxers, parsers, depayloaders) |
| </p> |
| <p class="since">Since 0.10.31</p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-DECODER:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_DECODER</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_DECODER (G_GUINT64_CONSTANT (1) << 0) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-DEMUXER:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_DEMUXER</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_DEMUXER (G_GUINT64_CONSTANT (1) << 5) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-DEPAYLOADER:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_DEPAYLOADER</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_DEPAYLOADER (G_GUINT64_CONSTANT (1) << 8) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-ENCODER:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_ENCODER</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_ENCODER (G_GUINT64_CONSTANT (1) << 1) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-FORMATTER:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_FORMATTER</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_FORMATTER (G_GUINT64_CONSTANT (1) << 9) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-MAX-ELEMENTS:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_MAX_ELEMENTS</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_MAX_ELEMENTS (G_GUINT64_CONSTANT (1) << 48) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-MEDIA-AUDIO:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_MEDIA_AUDIO (G_GUINT64_CONSTANT (1) << 50) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-MEDIA-IMAGE:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE (G_GUINT64_CONSTANT (1) << 51) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-MEDIA-METADATA:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_MEDIA_METADATA (G_GUINT64_CONSTANT (1) << 53) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-MEDIA-SUBTITLE:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_MEDIA_SUBTITLE (G_GUINT64_CONSTANT (1) << 52) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-MEDIA-VIDEO:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO (G_GUINT64_CONSTANT (1) << 49) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-MEDIA-ANY:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_MEDIA_ANY (~G_GUINT64_CONSTANT (0) << 48) |
| </pre> |
| <p> |
| Elements matching any of the defined GST_ELEMENT_FACTORY_TYPE_MEDIA types |
| </p> |
| <p> |
| Note: Do not use this if you wish to not filter against any of the defined |
| media types. If you wish to do this, simply don't specify any |
| GST_ELEMENT_FACTORY_TYPE_MEDIA flag. |
| </p> |
| <p class="since">Since 0.10.31</p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-MUXER:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_MUXER</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_MUXER (G_GUINT64_CONSTANT (1) << 4) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-PARSER:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_PARSER</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_PARSER (G_GUINT64_CONSTANT (1) << 6) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-PAYLOADER:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_PAYLOADER</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_PAYLOADER (G_GUINT64_CONSTANT (1) << 7) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-SINK:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_SINK</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_SINK (G_GUINT64_CONSTANT (1) << 2) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-SRC:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_SRC</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_SRC (G_GUINT64_CONSTANT (1) << 3) |
| </pre> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="GST-ELEMENT-FACTORY-TYPE-VIDEO-ENCODER:CAPS"></a><h3>GST_ELEMENT_FACTORY_TYPE_VIDEO_ENCODER</h3> |
| <pre class="programlisting">#define GST_ELEMENT_FACTORY_TYPE_VIDEO_ENCODER (GST_ELEMENT_FACTORY_TYPE_ENCODER | GST_ELEMENT_FACTORY_TYPE_MEDIA_VIDEO | GST_ELEMENT_FACTORY_TYPE_MEDIA_IMAGE) |
| </pre> |
| <p> |
| All encoders handling video or image media types |
| </p> |
| <p class="since">Since 0.10.31</p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-list-filter"></a><h3>gst_element_factory_list_filter ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * gst_element_factory_list_filter (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *list</code></em>, |
| <em class="parameter"><code>const <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> *caps</code></em>, |
| <em class="parameter"><code><a class="link" href="GstPad.html#GstPadDirection" title="enum GstPadDirection"><span class="type">GstPadDirection</span></a> direction</code></em>, |
| <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> subsetonly</code></em>);</pre> |
| <p> |
| Filter out all the elementfactories in <em class="parameter"><code>list</code></em> that can handle <em class="parameter"><code>caps</code></em> in |
| the given direction. |
| </p> |
| <p> |
| If <em class="parameter"><code>subsetonly</code></em> is <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, then only the elements whose pads templates |
| are a complete superset of <em class="parameter"><code>caps</code></em> will be returned. Else any element |
| whose pad templates caps can intersect with <em class="parameter"><code>caps</code></em> will be returned. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td> |
| <td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of |
| <a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> to filter. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> Gst.ElementFactory]</span> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>caps</code></em> :</span></p></td> |
| <td>a <a class="link" href="gstreamer-GstCaps.html#GstCaps" title="struct GstCaps"><span class="type">GstCaps</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>direction</code></em> :</span></p></td> |
| <td>a <a class="link" href="GstPad.html#GstPadDirection" title="enum GstPadDirection"><span class="type">GstPadDirection</span></a> to filter on</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>subsetonly</code></em> :</span></p></td> |
| <td>whether to filter on caps subsets or not.</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of |
| <a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> elements that match the given requisits. |
| Use <a class="link" href="GstPluginFeature.html#gst-plugin-feature-list-free" title="gst_plugin_feature_list_free ()"><span class="type">gst_plugin_feature_list_free</span></a> after usage. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> Gst.ElementFactory]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 0.10.31</p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-list-get-elements"></a><h3>gst_element_factory_list_get_elements ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="returnvalue">GList</span></a> * gst_element_factory_list_get_elements |
| (<em class="parameter"><code><a class="link" href="GstElementFactory.html#GstElementFactoryListType" title="GstElementFactoryListType"><span class="type">GstElementFactoryListType</span></a> type</code></em>, |
| <em class="parameter"><code><a class="link" href="GstPluginFeature.html#GstRank" title="enum GstRank"><span class="type">GstRank</span></a> minrank</code></em>);</pre> |
| <p> |
| Get a list of factories that match the given <em class="parameter"><code>type</code></em>. Only elements |
| with a rank greater or equal to <em class="parameter"><code>minrank</code></em> will be returned. |
| The list of factories is returned by decreasing rank. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
| <td>a <a class="link" href="GstElementFactory.html#GstElementFactoryListType" title="GstElementFactoryListType"><span class="type">GstElementFactoryListType</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>minrank</code></em> :</span></p></td> |
| <td>Minimum rank</td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td>a <a href="http://library.gnome.org/devel/glib/unstable/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of |
| <a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> elements. Use <a class="link" href="GstPluginFeature.html#gst-plugin-feature-list-free" title="gst_plugin_feature_list_free ()"><code class="function">gst_plugin_feature_list_free()</code></a> after |
| usage. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> Gst.ElementFactory]</span> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 0.10.31</p> |
| </div> |
| <hr> |
| <div class="refsect2"> |
| <a name="gst-element-factory-list-is-type"></a><h3>gst_element_factory_list_is_type ()</h3> |
| <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> gst_element_factory_list_is_type (<em class="parameter"><code><a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> *factory</code></em>, |
| <em class="parameter"><code><a class="link" href="GstElementFactory.html#GstElementFactoryListType" title="GstElementFactoryListType"><span class="type">GstElementFactoryListType</span></a> type</code></em>);</pre> |
| <p> |
| Check if <em class="parameter"><code>factory</code></em> is of the given types. |
| </p> |
| <div class="variablelist"><table border="0"> |
| <col align="left" valign="top"> |
| <tbody> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>factory</code></em> :</span></p></td> |
| <td>a <a class="link" href="GstElementFactory.html" title="GstElementFactory"><span class="type">GstElementFactory</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td> |
| <td>a <a class="link" href="GstElementFactory.html#GstElementFactoryListType" title="GstElementFactoryListType"><span class="type">GstElementFactoryListType</span></a> |
| </td> |
| </tr> |
| <tr> |
| <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td> |
| <td> |
| <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>factory</code></em> is of <em class="parameter"><code>type</code></em>.</td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p class="since">Since 0.10.31</p> |
| </div> |
| </div> |
| <div class="refsect1"> |
| <a name="GstElementFactory.see-also"></a><h2>See Also</h2> |
| <a class="link" href="GstElement.html" title="GstElement"><span class="type">GstElement</span></a>, <a class="link" href="GstPlugin.html" title="GstPlugin"><span class="type">GstPlugin</span></a>, <a class="link" href="GstPluginFeature.html" title="GstPluginFeature"><span class="type">GstPluginFeature</span></a>, <a class="link" href="GstPadTemplate.html" title="GstPadTemplate"><span class="type">GstPadTemplate</span></a>. |
| </div> |
| </div> |
| <div class="footer"> |
| <hr> |
| Generated by GTK-Doc V1.18</div> |
| </body> |
| </html> |