:right-sidebar: True CapsFeatures =================================================================== .. currentmodule:: gi.repository.Gst .. versionadded:: 1.2 .. class:: CapsFeatures(*args, **kwargs) :no-contents-entry: :Constructors: :: new_any() -> Gst.CapsFeatures new_empty() -> Gst.CapsFeatures new_single(feature:str) -> Gst.CapsFeatures Constructors ------------ .. rst-class:: interim-class .. class:: CapsFeatures :no-index: .. classmethod:: new_any() -> ~gi.repository.Gst.CapsFeatures Creates a new, ANY :obj:`~gi.repository.Gst.CapsFeatures`. This will be equal to any other :obj:`~gi.repository.Gst.CapsFeatures` but caps with these are unfixed. .. versionadded:: 1.2 .. classmethod:: new_empty() -> ~gi.repository.Gst.CapsFeatures Creates a new, empty :obj:`~gi.repository.Gst.CapsFeatures`. .. versionadded:: 1.2 .. classmethod:: new_single(feature: str) -> ~gi.repository.Gst.CapsFeatures Creates a new :obj:`~gi.repository.Gst.CapsFeatures` with a single feature. .. versionadded:: 1.20 :param feature: The feature Methods ------- .. rst-class:: interim-class .. class:: CapsFeatures :no-index: .. method:: add(feature: str) -> None Adds ``feature`` to ``features``. .. versionadded:: 1.2 :param feature: a feature. .. method:: add_id(feature: int) -> None Adds ``feature`` to ``features``. .. versionadded:: 1.2 :param feature: a feature. .. method:: contains(feature: str) -> bool Checks if ``features`` contains ``feature``. .. versionadded:: 1.2 :param feature: a feature .. method:: contains_id(feature: int) -> bool Checks if ``features`` contains ``feature``. .. versionadded:: 1.2 :param feature: a feature .. method:: free() -> None Frees a :obj:`~gi.repository.Gst.CapsFeatures` and all its values. The caps features must not have a parent when this function is called. .. versionadded:: 1.2 .. method:: from_string(features: str) -> ~gi.repository.Gst.CapsFeatures | None Creates a :obj:`~gi.repository.Gst.CapsFeatures` from a string representation. .. versionadded:: 1.2 :param features: a string representation of a :obj:`~gi.repository.Gst.CapsFeatures`. .. method:: get_nth(i: int) -> str | None Returns the ``i``-th feature of ``features``. .. versionadded:: 1.2 :param i: index of the feature .. method:: get_nth_id(i: int) -> int Returns the ``i``-th feature of ``features``. .. versionadded:: 1.2 :param i: index of the feature .. method:: get_size() -> int Returns the number of features in ``features``. .. versionadded:: 1.2 .. method:: is_any() -> bool Checks if ``features`` is ``%GST_CAPS_FEATURES_ANY``. .. versionadded:: 1.2 .. method:: is_equal(features2: ~gi.repository.Gst.CapsFeatures) -> bool Checks if ``features1`` and ``features2`` are equal. .. versionadded:: 1.2 :param features2: a :obj:`~gi.repository.Gst.CapsFeatures`. .. method:: remove(feature: str) -> None Removes ``feature`` from ``features``. .. versionadded:: 1.2 :param feature: a feature. .. method:: remove_id(feature: int) -> None Removes ``feature`` from ``features``. .. versionadded:: 1.2 :param feature: a feature. .. method:: set_parent_refcount(refcount: int) -> bool Sets the parent_refcount field of :obj:`~gi.repository.Gst.CapsFeatures`. This field is used to determine whether a caps features is mutable or not. This function should only be called by code implementing parent objects of :obj:`~gi.repository.Gst.CapsFeatures`, as described in `the MT refcounting design document `_. .. versionadded:: 1.2 :param refcount: a pointer to the parent's refcount .. method:: to_string() -> str Converts ``features`` to a human-readable string representation. For debugging purposes its easier to do something like this: .. code-block:: C :dedent: GST_LOG ("features is %" GST_PTR_FORMAT, features); This prints the features in human readable form. .. versionadded:: 1.2