Gst.ElementFactory¶
- Subclasses:
- None 
Methods¶
- Inherited:
- Gst.PluginFeature (10), Gst.Object (27), GObject.Object (37) 
- Structs:
| class | 
 | 
| class | 
 | 
| class | 
 | 
| class | 
 | 
| class | 
 | 
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | |
| 
 | 
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gst.ElementFactory(**kwargs)¶
- Bases:
- Abstract:
- No 
- Structure:
 - Gst.ElementFactoryis used to create instances of elements. A- Gst.ElementFactorycan be added to a- Gst.Pluginas it is also a- Gst.PluginFeature.- Use the - Gst.ElementFactory.find() and- Gst.ElementFactory.create() functions to create element instances or use- Gst.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); ... - classmethod find(name)[source]¶
- Parameters:
- name ( - str) – name of factory to find
- Returns:
- Gst.ElementFactoryif found,- Noneotherwise
- Return type:
 - Search for an element factory of the given name. Refs the returned element factory; caller is responsible for unreffing. 
 - classmethod list_filter(list, caps, direction, subsetonly)[source]¶
- Parameters:
- list ([ - Gst.ElementFactory]) – a- GLib.Listof- Gst.ElementFactoryto filter
- direction ( - Gst.PadDirection) – a- Gst.PadDirectionto filter on
- subsetonly ( - bool) – whether to filter on caps subsets or not.
 
- Returns:
- a - GLib.Listof- Gst.ElementFactoryelements that match the given requisites. Use- Gst.PluginFeature.list_freeafter usage.
- Return type:
 - Filter out all the elementfactories in list that can handle caps in the given direction. - If subsetonly is - True, then only the elements whose pads templates are a complete superset of caps will be returned. Else any element whose pad templates caps can intersect with caps will be returned.
 - classmethod list_get_elements(type, minrank)[source]¶
- Parameters:
- Returns:
- a - GLib.Listof- Gst.ElementFactoryelements. Use- Gst.PluginFeature.list_free() after usage.
- Return type:
 - Get 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. 
 - classmethod make(factoryname, name)[source]¶
- Parameters:
- Returns:
- new - Gst.Elementor- Noneif unable to create element
- Return type:
- Gst.Elementor- None
 - Create a new element of the type defined by the given element factory. If name is - None, 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.
 - classmethod make_with_properties(factoryname, names, values)[source]¶
- Parameters:
- factoryname ( - str) – a named factory to instantiate
- values ([ - GObject.Value] or- None) – array of associated properties values
 
- Returns:
- new - Gst.Elementor- Noneif the element couldn’t be created
- Return type:
- Gst.Elementor- None
 - Create a new element of the type defined by the given elementfactory. The supplied list of properties, will be passed at object construction. - New in version 1.20. 
 - can_sink_all_caps(caps)[source]¶
- Parameters:
- caps ( - Gst.Caps) – the caps to check
- Returns:
- Trueif the caps are fully compatible.
- Return type:
 - Checks if the factory can sink all possible capabilities. 
 - can_sink_any_caps(caps)[source]¶
- Parameters:
- caps ( - Gst.Caps) – the caps to check
- Returns:
- Trueif the caps have a common subset.
- Return type:
 - Checks if the factory can sink any possible capability. 
 - can_src_all_caps(caps)[source]¶
- Parameters:
- caps ( - Gst.Caps) – the caps to check
- Returns:
- Trueif the caps are fully compatible.
- Return type:
 - Checks if the factory can src all possible capabilities. 
 - can_src_any_caps(caps)[source]¶
- Parameters:
- caps ( - Gst.Caps) – the caps to check
- Returns:
- Trueif the caps have a common subset.
- Return type:
 - Checks if the factory can src any possible capability. 
 - create(name)[source]¶
- Parameters:
- name ( - stror- None) – name of new element, or- Noneto automatically create a unique name
- Returns:
- new - Gst.Elementor- Noneif the element couldn’t be created
- Return type:
- Gst.Elementor- None
 - 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. 
 - create_with_properties(names, values)[source]¶
- Parameters:
- values ([ - GObject.Value] or- None) – array of associated properties values
 
- Returns:
- new - Gst.Elementor- Noneif the element couldn’t be created
- Return type:
- Gst.Elementor- None
 - Create a new element of the type defined by the given elementfactory. The supplied list of properties, will be passed at object construction. - New in version 1.20. 
 - get_element_type()[source]¶
- Returns:
- the - GObject.GTypefor elements managed by this factory or 0 if the factory is not loaded.
- Return type:
 - Get the - GObject.GTypefor elements managed by this factory. The type can only be retrieved if the element factory is loaded, which can be assured with- Gst.PluginFeature.load().
 - get_metadata(key)[source]¶
- Parameters:
- key ( - str) – a key
- Returns:
- the metadata with key on self or - Nonewhen there was no metadata with the given key.
- Return type:
 - Get the metadata on self with key. 
 - get_metadata_keys()[source]¶
- Returns:
- a - None-terminated array of key strings, or- Nonewhen there is no metadata. Free with- GLib.strfreev() when no longer needed.
- Return type:
 - Get the available keys for the metadata on self. 
 - get_num_pad_templates()[source]¶
- Returns:
- the number of pad_templates 
- Return type:
 - Gets the number of pad_templates in this factory. 
 - get_skip_documentation()[source]¶
- 
Queries whether registered element managed by self needs to be excluded from documentation system or not. New in version 1.20. 
 - get_static_pad_templates()[source]¶
- Returns:
- the static pad templates 
- Return type:
 - Gets the - GLib.Listof- Gst.StaticPadTemplatefor this factory.
 - get_uri_protocols()[source]¶
- 
Gets a None-terminated array of protocols this element supports orNoneif no protocols are supported. You may not change the contents of the returned array, as it is still owned by the element factory. UseGLib.strdupv() to make a copy of the protocol string array if you need to.
 - get_uri_type()[source]¶
- Returns:
- type of URIs this element supports 
- Return type:
 - Gets the type of URIs the element supports or - Gst.URIType.UNKNOWNif none.