:right-sidebar: True Meta =================================================================== .. currentmodule:: gi.repository.Gst .. class:: Meta(*args, **kwargs) :no-contents-entry: :Constructors: :: Meta() Methods ------- .. rst-class:: interim-class .. class:: Meta :no-index: .. method:: api_type_get_tags(api: type) -> list[str] .. versionadded:: 1.2 :param api: an API .. method:: api_type_has_tag(api: type, tag: int) -> bool Check if ``api`` was registered with ``tag``. :param api: an API :param tag: the tag to check .. method:: api_type_register(api: str, tags: ~typing.Sequence[str]) -> type Register and return a GType for the ``api`` and associate it with ``tags``. :param api: an API to register :param tags: tags for ``api`` .. method:: compare_seqnum(meta2: ~gi.repository.Gst.Meta) -> int Meta sequence number compare function. Can be used as :obj:`~gi.repository.GLib.CompareFunc` or a :obj:`~gi.repository.GLib.CompareDataFunc`. .. versionadded:: 1.16 :param meta2: a :obj:`~gi.repository.Gst.Meta` .. method:: deserialize(buffer: ~gi.repository.Gst.Buffer, data: int, size: int) -> tuple[~gi.repository.Gst.Meta | None, int] Recreate a :obj:`~gi.repository.Gst.Meta` from serialized data returned by :func:`~gi.repository.Gst.Meta.serialize` and add it to ``buffer``. Note that the meta must have been previously registered by calling one of ```gst_``*_meta_get_info ()` functions. ``consumed`` is set to the number of bytes that can be skipped from ``data`` to find the next meta serialization, if any. In case of parsing error that does not allow to determine that size, ``consumed`` is set to 0. .. versionadded:: 1.24 :param buffer: a :obj:`~gi.repository.Gst.Buffer` :param data: serialization data obtained from :func:`~gi.repository.Gst.Meta.serialize` :param size: size of ``data`` .. method:: get_info(impl: str) -> ~gi.repository.Gst.MetaInfo | None Lookup a previously registered meta info structure by its implementation name ``impl``. :param impl: the name .. method:: get_seqnum() -> int Gets seqnum for this meta. .. versionadded:: 1.16 .. method:: register_custom(name: str, tags: ~typing.Sequence[str], transform_func: ~typing.Callable[[...], bool] | None = None, *user_data: ~typing.Any) -> ~gi.repository.Gst.MetaInfo Register a new custom :obj:`~gi.repository.Gst.Meta` implementation, backed by an opaque structure holding a :obj:`~gi.repository.Gst.Structure`. The registered info can be retrieved later with :func:`~gi.repository.Gst.Meta.get_info` by using ``name`` as the key. The backing :obj:`~gi.repository.Gst.Structure` can be retrieved with :func:`~gi.repository.Gst.CustomMeta.get_structure`, its mutability is conditioned by the writability of the buffer the meta is attached to. When ``transform_func`` is :const:`None`, the meta and its backing :obj:`~gi.repository.Gst.Structure` will always be copied when the transform operation is copy, other operations are discarded, copy regions are ignored. .. versionadded:: 1.20 :param name: the name of the :obj:`~gi.repository.Gst.Meta` implementation :param tags: tags for ``api`` :param transform_func: a :obj:`~gi.repository.Gst.MetaTransformFunction` :param user_data: user data passed to ``transform_func`` .. method:: register_custom_simple(name: str) -> ~gi.repository.Gst.MetaInfo Simplified version of :func:`~gi.repository.Gst.Meta.register_custom`, with no tags and no transform function. .. versionadded:: 1.24 :param name: the name of the :obj:`~gi.repository.Gst.Meta` implementation .. method:: serialize(data: ~gi.repository.Gst.ByteArrayInterface) -> bool Serialize ``meta`` into a format that can be stored or transmitted and later deserialized by :func:`~gi.repository.Gst.Meta.deserialize`. This is only supported for meta that implements :obj:`~gi.repository.Gst.MetaInfo`.serialize_func, :const:`False` is returned otherwise. Upon failure, ``data``->data pointer could have been reallocated, but ``data``->len won't be modified. This is intended to be able to append multiple metas into the same ``GByteArray``. Since serialization size is often the same for every buffer, caller may want to remember the size of previous data to preallocate the next. .. versionadded:: 1.24 :param data: :obj:`~gi.repository.Gst.ByteArrayInterface` to append serialization data .. method:: serialize_simple(data: ~typing.Sequence[int]) -> bool Same as :func:`~gi.repository.Gst.Meta.serialize` but with a ``GByteArray`` instead of :obj:`~gi.repository.Gst.ByteArrayInterface`. .. versionadded:: 1.24 :param data: ``GByteArray`` to append serialization data Fields ------ .. rst-class:: interim-class .. class:: Meta :no-index: .. attribute:: flags Extra flags for the metadata .. attribute:: info Pointer to the :obj:`~gi.repository.Gst.MetaInfo`