/** * Get a {@link Structure} contained in this caps. * * <p>Finds the structure in @caps that has the index @index, and returns it. * * @param index The index of the structure to get. * @return The Structure corresponding to index. */ public Structure getStructure(int index) { /* * 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 * #GstCaps should not be modified. */ // The above means we return a Structure proxy which does not own the pointer. // gst_caps_get_structure is not marked as CallerOwnsReturn, so it should work return GSTCAPS_API.gst_caps_get_structure(this, index); }