Gst.CapsFeatures¶
Fields¶
None
Methods¶
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Gst.CapsFeatures¶
Gst.CapsFeatures
can optionally be set on aGst.Caps
to add requirements for additional features for a specificGst.Structure
. Caps structures with the same name but with a non-equal set of caps features are not compatible. If a pad supports multiple sets of features it has to add multiple equal structures with different feature sets to the caps.Empty
Gst.CapsFeatures
are equivalent with theGst.CapsFeatures
that only containGst.CAPS_FEATURE_MEMORY_SYSTEM_MEMORY
. ANYGst.CapsFeatures
as created byGst.CapsFeatures.new_any
() are equal to any otherGst.CapsFeatures
and can be used to specify that anyGst.CapsFeatures
would be supported, e.g. for elements that don’t touch buffer memory.Gst.Caps
with ANYGst.CapsFeatures
are considered non-fixed and during negotiation someGst.CapsFeatures
have to be selected.Examples for caps features would be the requirement of a specific
Gst.Memory
types or the requirement of having a specificGst.Meta
on the buffer. Features are given as a string of the formatmemory:GstMemoryTypeName
ormeta:GstMetaAPIName
.New in version 1.2.
- classmethod from_string(features)[source]¶
- Parameters:
features (
str
) – a string representation of aGst.CapsFeatures
.- Returns:
a new
Gst.CapsFeatures
orNone
when the string could not be parsed.- Return type:
Creates a
Gst.CapsFeatures
from a string representation.New in version 1.2.
- classmethod new_any()[source]¶
- Returns:
a new, ANY
Gst.CapsFeatures
- Return type:
Creates a new, ANY
Gst.CapsFeatures
. This will be equal to any otherGst.CapsFeatures
but caps with these are unfixed.New in version 1.2.
- classmethod new_empty()[source]¶
- Returns:
a new, empty
Gst.CapsFeatures
- Return type:
Creates a new, empty
Gst.CapsFeatures
.New in version 1.2.
- classmethod new_single(feature)[source]¶
- Parameters:
feature (
str
) – The feature- Returns:
a new
Gst.CapsFeatures
- Return type:
Creates a new
Gst.CapsFeatures
with a single feature.New in version 1.20.
- add(feature)[source]¶
- Parameters:
feature (
str
) – a feature.
Adds feature to self.
New in version 1.2.
- add_id(feature)[source]¶
- Parameters:
feature (
int
) – a feature.
Adds feature to self.
New in version 1.2.
- copy()[source]¶
- Returns:
a new
Gst.CapsFeatures
.- Return type:
Duplicates a
Gst.CapsFeatures
and all its values.New in version 1.2.
- free()[source]¶
Frees a
Gst.CapsFeatures
and all its values. The caps features must not have a parent when this function is called.New in version 1.2.
- get_nth(i)[source]¶
- Parameters:
i (
int
) – index of the feature- Returns:
The i-th feature of self.
- Return type:
Returns the i-th feature of self.
New in version 1.2.
- get_size()[source]¶
- Returns:
The number of features in self.
- Return type:
Returns the number of features in self.
New in version 1.2.
- is_equal(features2)[source]¶
- Parameters:
features2 (
Gst.CapsFeatures
) – aGst.CapsFeatures
.- Returns:
True
if self and features2 are equal.- Return type:
Checks if self and features2 are equal.
New in version 1.2.
- remove(feature)[source]¶
- Parameters:
feature (
str
) – a feature.
Removes feature from self.
New in version 1.2.
- remove_id(feature)[source]¶
- Parameters:
feature (
int
) – a feature.
Removes feature from self.
New in version 1.2.
- set_parent_refcount(refcount)[source]¶
- Parameters:
refcount (
int
) – a pointer to the parent’s refcount- Returns:
True
if the parent refcount could be set.- Return type:
Sets the parent_refcount field of
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 ofGst.CapsFeatures
, as described in the MT refcounting design document.New in version 1.2.
- to_string()[source]¶
- Returns:
a pointer to string allocated by
GLib.malloc
().- Return type:
Converts self to a human-readable string representation.
For debugging purposes its easier to do something like this:
`` C GST_LOG (“features is %” GST_PTR_FORMAT, features); ``
This prints the features in human readable form.
New in version 1.2.