CapsFeatures

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

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

Constructors

this
this(GstCapsFeatures* gstCapsFeatures)

Sets our main struct and passes it to the parent class

this
this()

Creates a new, empty GstCapsFeatures. Free-function: gst_caps_features_free Since 1.2

this
this(GQuark feature1, void* varargs)

Creates a new GstCapsFeatures with the given features. Free-function: gst_caps_features_free Since 1.2

this
this(string feature1, void* varargs)

Creates a new GstCapsFeatures with the given features. Free-function: gst_caps_features_free Since 1.2

Members

Functions

add
void add(string feature)

Adds feature to features. Since 1.2

addId
void addId(GQuark feature)

Adds feature to features. Since 1.2

contains
int contains(string feature)

Check if features contains feature. Since 1.2

containsId
int containsId(GQuark feature)

Check if features contains feature. Since 1.2

copy
CapsFeatures copy()

Duplicates a GstCapsFeatures and all its values. Free-function: gst_caps_features_free Since 1.2

free
void free()

Frees a GstCapsFeatures and all its values. The caps features must not have a parent when this function is called. Since 1.2

getCapsFeaturesStruct
GstCapsFeatures* getCapsFeaturesStruct()
Undocumented in source. Be warned that the author may not have intended to support it.
getNth
string getNth(uint i)

Returns the i-th feature of features. Since 1.2

getNthId
GQuark getNthId(uint i)

Returns the i-th feature of features. Since 1.2

getSize
uint getSize()

Returns the number of features in features. Since 1.2

getStruct
void* getStruct()

the main Gtk struct as a void*

isAny
int isAny()

Check if features is GST_CAPS_FEATURES_ANY. Since 1.2

isEqual
int isEqual(CapsFeatures features2)

Check if features1 and features2 are equal. Since 1.2

remove
void remove(string feature)

Removes feature from features. Since 1.2

removeId
void removeId(GQuark feature)

Removes feature from features. Since 1.2

setParentRefcount
int setParentRefcount(int* refcount)

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

toString
string toString()

Converts features to a human-readable string representation. Since 1.2

Static functions

fromString
CapsFeatures fromString(string features)

Creates a GstCapsFeatures from a string representation. Free-function: gst_caps_features_free Since 1.2

Variables

gstCapsFeatures
GstCapsFeatures* gstCapsFeatures;

the main Gtk struct

Meta