CapsFeatures

gstreamer.CapsFeatures can optionally be set on a gstreamer.Caps to add requirements for additional features for a specific gstreamer.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 gstreamer.CapsFeatures are equivalent with the gstreamer.CapsFeatures that only contain GST_CAPS_FEATURE_MEMORY_SYSTEM_MEMORY ANY gstreamer.CapsFeatures as created by Caps.featuresNewAny are equal to any other gstreamer.CapsFeatures and can be used to specify that any gstreamer.CapsFeatures would be supported, e.g. for elements that don't touch buffer memory. gstreamer.Caps with ANY gstreamer.CapsFeatures are considered non-fixed and during negotiation some gstreamer.CapsFeatures have to be selected.

Examples for caps features would be the requirement of a specific gstreamer.Memory types or the requirement of having a specific gstreamer.Meta on the buffer. Features are given as a string of the format "memory:GstMemoryTypeName" or "meta:GstMetaAPIName".

Constructors

this
this(GstCapsFeatures* gstCapsFeatures, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Creates a new, empty gstreamer.CapsFeatures

this
this(GQuark feature1, void* varargs)

Creates a new gstreamer.CapsFeatures with the given features.

this
this(string feature1, void* varargs)

Creates a new gstreamer.CapsFeatures with the given features.

Destructor

A destructor is present on this object, but not explicitly documented in the source.

Members

Functions

add
void add(string feature)

Adds feature to features.

addId
void addId(GQuark feature)

Adds feature to features.

contains
bool contains(string feature)

Check if features contains feature.

containsId
bool containsId(GQuark feature)

Check if features contains feature.

copy
CapsFeatures copy()

Duplicates a gstreamer.CapsFeatures and all its values.

free
void free()

Frees a gstreamer.CapsFeatures and all its values. The caps features must not have a parent when this function is called.

getCapsFeaturesStruct
GstCapsFeatures* getCapsFeaturesStruct(bool transferOwnership)

Get the main Gtk struct

getNth
string getNth(uint i)

Returns the i-th feature of features.

getNthId
GQuark getNthId(uint i)

Returns the i-th feature of features.

getSize
uint getSize()

Returns the number of features in features.

getStruct
void* getStruct()

the main Gtk struct as a void*

isAny
bool isAny()

Check if features is GST_CAPS_FEATURES_ANY.

isEqual
bool isEqual(CapsFeatures features2)

Check if features1 and features2 are equal.

remove
void remove(string feature)

Removes feature from features.

removeId
void removeId(GQuark feature)

Removes feature from features.

setParentRefcount
bool setParentRefcount(int* refcount)

Sets the parent_refcount field of gstreamer.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 gstreamer.CapsFeatures, as described in the MT Refcounting section of the design documents.

toString
string toString()

Converts features to a human-readable string representation.

Static functions

fromString
CapsFeatures fromString(string features)

Creates a gstreamer.CapsFeatures from a string representation.

getType
GType getType()
newAny
newAny()

Creates a new, ANY gstreamer.CapsFeatures This will be equal to any other gstreamer.CapsFeatures but caps with these are unfixed.

Variables

gstCapsFeatures
GstCapsFeatures* gstCapsFeatures;

the main Gtk struct

Meta