Gst.CapsFeatures¶
Fields¶
None
Methods¶
class |
|
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class Gst.CapsFeatures¶
Gst.CapsFeaturescan optionally be set on aGst.Capsto 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.CapsFeaturesare equivalent with theGst.CapsFeaturesthat only containGst.CAPS_FEATURE_MEMORY_SYSTEM_MEMORY. ANYGst.CapsFeaturesas created byGst.CapsFeatures.new_any() are equal to any otherGst.CapsFeaturesand can be used to specify that anyGst.CapsFeatureswould be supported, e.g. for elements that don’t touch buffer memory.Gst.Capswith ANYGst.CapsFeaturesare considered non-fixed and during negotiation someGst.CapsFeatureshave to be selected.Examples for caps features would be the requirement of a specific
Gst.Memorytypes or the requirement of having a specificGst.Metaon the buffer. Features are given as a string of the formatmemory:GstMemoryTypeNameormeta:GstMetaAPIName.New in version 1.2.
- classmethod from_string(features)[source]¶
- Parameters:
features (
str) – a string representation of aGst.CapsFeatures.- Returns:
a new
Gst.CapsFeaturesorNonewhen the string could not be parsed.- Return type:
Creates a
Gst.CapsFeaturesfrom 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.CapsFeaturesbut 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.CapsFeatureswith a single feature.New in version 1.20.
- classmethod new_single_static_str(feature)[source]¶
- Parameters:
feature (
str) – The feature- Returns:
a new
Gst.CapsFeatures- Return type:
Creates a new
Gst.CapsFeatureswith a single feature.feature needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
New in version 1.26.
- 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.
Deprecated since version 1.26: Use
Gst.CapsFeatures.add_id_str().
- add_id_str(feature)[source]¶
- Parameters:
feature (
Gst.IdStr) – a feature.
Adds feature to self.
New in version 1.26.
- add_static_str(feature)[source]¶
- Parameters:
feature (
str) – a feature.
Adds feature to self.
feature needs to be valid for the remaining lifetime of the process, e.g. has to be a static string.
New in version 1.26.
- contains_id(feature)[source]¶
-
Checks if self contains feature.
New in version 1.2.
Deprecated since version 1.26: Use
Gst.CapsFeatures.contains_id_str().
- contains_id_str(feature)[source]¶
-
Checks if self contains feature.
New in version 1.26.
- copy()[source]¶
- Returns:
a new
Gst.CapsFeatures.- Return type:
Duplicates a
Gst.CapsFeaturesand all its values.New in version 1.2.
- free()[source]¶
Frees a
Gst.CapsFeaturesand 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_nth_id(i)[source]¶
-
Returns the i-th feature of self.
New in version 1.2.
Deprecated since version 1.26: Use
Gst.CapsFeatures.get_nth_id_str().
- get_nth_id_str(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.26.
- 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:
Trueif 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.
Deprecated since version 1.26: Use
Gst.CapsFeatures.remove_id_str().
- remove_id_str(feature)[source]¶
- Parameters:
feature (
Gst.IdStr) – a feature.
Removes feature from self.
New in version 1.26.
- set_parent_refcount(refcount)[source]¶
- Parameters:
refcount (
int) – a pointer to the parent’s refcount- Returns:
Trueif 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.