:right-sidebar: True ElementFactory =================================================================== .. currentmodule:: gi.repository.Gst .. class:: ElementFactory(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gst.PluginFeature`, :class:`~gi.repository.Gst.Object`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` :Constructors: :: ElementFactory(**properties) Methods ------- .. rst-class:: interim-class .. class:: ElementFactory :no-index: .. method:: can_sink_all_caps(caps: ~gi.repository.Gst.Caps) -> bool Checks if the factory can sink all possible capabilities. :param caps: the caps to check .. method:: can_sink_any_caps(caps: ~gi.repository.Gst.Caps) -> bool Checks if the factory can sink any possible capability. :param caps: the caps to check .. method:: can_src_all_caps(caps: ~gi.repository.Gst.Caps) -> bool Checks if the factory can src all possible capabilities. :param caps: the caps to check .. method:: can_src_any_caps(caps: ~gi.repository.Gst.Caps) -> bool Checks if the factory can src any possible capability. :param caps: the caps to check .. method:: create(name: str | None = None) -> ~gi.repository.Gst.Element | 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. :param name: name of new element, or :const:`None` to automatically create a unique name .. method:: create_with_properties(names: ~typing.Sequence[str] | None = None, values: ~typing.Sequence[~typing.Any] | None = None) -> ~gi.repository.Gst.Element | None Create a new element of the type defined by the given elementfactory. The supplied list of properties, will be passed at object construction. .. versionadded:: 1.20 :param names: array of properties names :param values: array of associated properties values .. method:: find(name: str) -> ~gi.repository.Gst.ElementFactory | None Search for an element factory of the given name. Refs the returned element factory; caller is responsible for unreffing. :param name: name of factory to find .. method:: get_element_type() -> type Get the :obj:`~gi.repository.GObject.Type` for elements managed by this factory. The type can only be retrieved if the element factory is loaded, which can be assured with :func:`~gi.repository.Gst.PluginFeature.load`. .. method:: get_metadata(key: str) -> str | None Get the metadata on ``factory`` with ``key``. :param key: a key .. method:: get_metadata_keys() -> list[str] | None Get the available keys for the metadata on ``factory``. .. method:: get_num_pad_templates() -> int Gets the number of pad_templates in this factory. .. method:: get_skip_documentation() -> bool Queries whether registered element managed by ``factory`` needs to be excluded from documentation system or not. .. versionadded:: 1.20 .. method:: get_static_pad_templates() -> list[~gi.repository.Gst.StaticPadTemplate] Gets the ``GList`` of :obj:`~gi.repository.Gst.StaticPadTemplate` for this factory. .. method:: get_uri_protocols() -> list[str] Gets a :const:`None`-terminated array of protocols this element supports or :const:`None` 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 :func:`~gi.repository.GLib.strdupv` to make a copy of the protocol string array if you need to. .. method:: get_uri_type() -> ~gi.repository.Gst.URIType Gets the type of URIs the element supports or ``GST_URI_UNKNOWN`` if none. .. method:: has_interface(interfacename: str) -> bool Check if ``factory`` implements the interface with name ``interfacename``. :param interfacename: an interface name .. method:: list_filter(list: list[~gi.repository.Gst.ElementFactory], caps: ~gi.repository.Gst.Caps, direction: ~gi.repository.Gst.PadDirection, subsetonly: bool) -> list[~gi.repository.Gst.ElementFactory] Filter out all the elementfactories in ``list`` that can handle ``caps`` in the given direction. If ``subsetonly`` is :const:`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. :param list: a ``GList`` of :obj:`~gi.repository.Gst.ElementFactory` to filter :param caps: a :obj:`~gi.repository.Gst.Caps` :param direction: a :obj:`~gi.repository.Gst.PadDirection` to filter on :param subsetonly: whether to filter on caps subsets or not. .. method:: list_get_elements(type: int, minrank: ~gi.repository.Gst.Rank) -> list[~gi.repository.Gst.ElementFactory] 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. :param type: a :obj:`~gi.repository.Gst.ElementFactoryListType` :param minrank: Minimum rank .. method:: list_is_type(type: int) -> bool Check if ``factory`` is of the given types. :param type: a :obj:`~gi.repository.Gst.ElementFactoryListType` .. method:: make(factoryname: str, name: str | None = None) -> ~gi.repository.Gst.Element | None Create a new element of the type defined by the given element factory. If name is :const:`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. :param factoryname: a named factory to instantiate :param name: name of new element, or :const:`None` to automatically create a unique name .. method:: make_with_properties(factoryname: str, names: ~typing.Sequence[str] | None = None, values: ~typing.Sequence[~typing.Any] | None = None) -> ~gi.repository.Gst.Element | None Create a new element of the type defined by the given elementfactory. The supplied list of properties, will be passed at object construction. .. versionadded:: 1.20 :param factoryname: a named factory to instantiate :param names: array of properties names :param values: array of associated properties values