gst.element_factory

Module for [ElementFactory] class

Types 3

#GstElementFactory is used to create instances of elements. A GstElementFactory can be added to a #GstPlugin as it is also a #GstPluginFeature.

Use the gst.element_factory.ElementFactory.find and gst.element_factory.ElementFactory.create functions to create element instances or use gst.element_factory.ElementFactory.make as a convenient shortcut.

The following code example shows you how to create a GstFileSrc element.

Using an element factory
#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);
...

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
ElementFactory self() nothrowReturns `this`, for use in `with` statements.
ElementFactoryGidBuilder builder() static nothrowGet builder for [gst.element_factory.ElementFactory] Returns: New builder object
gst.element_factory.ElementFactory find(string name) static nothrowSearch for an element factory of the given name. Refs the returned element factory; caller is responsible for unreffing.
gst.element_factory.ElementFactory[] listFilter(gst.element_factory.ElementFactory[] list, gst.caps.Caps caps, gst.types.PadDirection direction, bool subsetonly) static nothrowFilter out all the elementfactories in list that can handle caps in the given direction.
gst.element_factory.ElementFactory[] listGetElements(gst.types.ElementFactoryListType type, gst.types.Rank minrank) static nothrowGet a list of factories that match the given type. Only elements with a rank greater or equal to minrank will be returned. The list of factories is returned by decreasing rank.
gst.element.Element make(string factoryname, string name = null) static nothrowCreate 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. ...
gst.element.Element makeWithProperties(string factoryname, string[] names = null, gobject.value.Value[] values = null) static nothrowCreate a new element of the type defined by the given elementfactory. The supplied list of properties, will be passed at object construction.
bool canSinkAllCaps(gst.caps.Caps caps) nothrowChecks if the factory can sink all possible capabilities.
bool canSinkAnyCaps(gst.caps.Caps caps) nothrowChecks if the factory can sink any possible capability.
bool canSrcAllCaps(gst.caps.Caps caps) nothrowChecks if the factory can src all possible capabilities.
bool canSrcAnyCaps(gst.caps.Caps caps) nothrowChecks if the factory can src any possible capability.
gst.element.Element create(string name = null) nothrowCreate 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.
gst.element.Element createWithProperties(string[] names = null, gobject.value.Value[] values = null) nothrowCreate a new element of the type defined by the given elementfactory. The supplied list of properties, will be passed at object construction.
gobject.types.GType getElementType() nothrowGet the #GType for elements managed by this factory. The type can only be retrieved if the element factory is loaded, which can be assured with [gst.plugin_feature.PluginFeature.load]. Returns: the...
string getMetadata(string key) nothrowGet the metadata on factory with key.
string[] getMetadataKeys() nothrowGet the available keys for the metadata on factory. Returns: a null-terminated array of key strings, or null when there is no metadata. Free with [glib.global.strfreev] when no longer needed.
uint getNumPadTemplates() nothrowGets the number of pad_templates in this factory. Returns: the number of pad_templates
bool getSkipDocumentation() nothrowQueries whether registered element managed by factory needs to be excluded from documentation system or not. Returns: true if documentation should be skipped
string[] getUriProtocols() nothrowGets 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 fac...
gst.types.URIType getUriType() nothrowGets the type of URIs the element supports or #GST_URI_UNKNOWN if none. Returns: type of URIs this element supports
bool hasInterface(string interfacename) nothrowCheck if factory implements the interface with name interfacename.
bool listIsType(gst.types.ElementFactoryListType type) nothrowCheck if factory is of the given types.
Constructors
this(void * ptr, Flag!"Take" take)
Methods
ElementFactory build() nothrowCreate object from builder. Returns: New object