CapsFeatures
Added in version 1.2.
- class CapsFeatures(*args, **kwargs)
- Constructors:
new_any() -> Gst.CapsFeatures
new_empty() -> Gst.CapsFeatures
new_single(feature:str) -> Gst.CapsFeatures
Constructors
- class CapsFeatures
- classmethod new_any() CapsFeatures
Creates a new, ANY
CapsFeatures
. This will be equal to any otherCapsFeatures
but caps with these are unfixed.Added in version 1.2.
- classmethod new_empty() CapsFeatures
Creates a new, empty
CapsFeatures
.Added in version 1.2.
- classmethod new_single(feature: str) CapsFeatures
Creates a new
CapsFeatures
with a single feature.Added in version 1.20.
- Parameters:
feature – The feature
Methods
- class CapsFeatures
- add(feature: str) None
Adds
feature
tofeatures
.Added in version 1.2.
- Parameters:
feature – a feature.
- add_id(feature: int) None
Adds
feature
tofeatures
.Added in version 1.2.
- Parameters:
feature – a feature.
- contains(feature: str) bool
Checks if
features
containsfeature
.Added in version 1.2.
- Parameters:
feature – a feature
- contains_id(feature: int) bool
Checks if
features
containsfeature
.Added in version 1.2.
- Parameters:
feature – a feature
- free() None
Frees a
CapsFeatures
and all its values. The caps features must not have a parent when this function is called.Added in version 1.2.
- from_string(features: str) CapsFeatures | None
Creates a
CapsFeatures
from a string representation.Added in version 1.2.
- Parameters:
features – a string representation of a
CapsFeatures
.
- get_nth(i: int) str | None
Returns the
i
-th feature offeatures
.Added in version 1.2.
- Parameters:
i – index of the feature
- get_nth_id(i: int) int
Returns the
i
-th feature offeatures
.Added in version 1.2.
- Parameters:
i – index of the feature
- is_equal(features2: CapsFeatures) bool
Checks if
features1
andfeatures2
are equal.Added in version 1.2.
- Parameters:
features2 – a
CapsFeatures
.
- remove(feature: str) None
Removes
feature
fromfeatures
.Added in version 1.2.
- Parameters:
feature – a feature.
- remove_id(feature: int) None
Removes
feature
fromfeatures
.Added in version 1.2.
- Parameters:
feature – a feature.
- set_parent_refcount(refcount: int) bool
Sets the parent_refcount field of
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 ofCapsFeatures
, as described in the MT refcounting design document.Added in version 1.2.
- Parameters:
refcount – a pointer to the parent’s refcount