Gst.Caps.prototype.get_structure
function get_structure(index:Number):Gst.Structure { // Gjs wrapper for gst_caps_get_structure() }
Finds the structure in caps that has the index index, and returns it.
WARNING: This function takes a const GstCaps *, but returns a non-const GstStructure *. This is for programming convenience -- the caller should be aware that structures inside a constant Gst.Caps should not be modified. However, if you know the caps are writable, either because you have just copied them or made them writable with gst_caps_make_writable(), you may modify the structure returned in the usual way, e.g. with functions like Gst.set.
You do not need to free or unref the structure returned, it belongs to the Gst.Caps.
- index
the index of the structure
- Returns
a pointer to the Gst.Structure corresponding to index