+ * gst_caps_get_features:
+ * @caps: a #GstCaps
+ * @index: the index of the structure
+ *
+ * Finds the features in @caps that has the index @index, and
+ * returns it.
+ *
+ * WARNING: This function takes a const GstCaps *, but returns a
+ * non-const GstCapsFeatures *. This is for programming convenience --
+ * the caller should be aware that structures inside a constant
+ * #GstCaps 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
+ * features returned in the usual way, e.g. with functions like
+ * gst_caps_features_add().
+ *
+ * You do not need to free or unref the structure returned, it
+ * belongs to the #GstCaps.
+ *
+ * Returns: (transfer none): a pointer to the #GstCapsFeatures corresponding
+ * to @index
+ */
+GstCapsFeatures *
+gst_caps_get_features (const GstCaps * caps, guint index)
+{
+ GstCapsFeatures *features;
+
+ g_return_val_if_fail (GST_IS_CAPS (caps), NULL);
+ g_return_val_if_fail (index < GST_CAPS_LEN (caps), NULL);
+
+ features = gst_caps_get_features_unchecked (caps, index);
+ if (!features)
+ features = gst_caps_features_copy (GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY);
+
+ return features;
+}
+
+/**
+ * gst_caps_set_features:
+ * @caps: a #GstCaps
+ * @index: the index of the structure
+ * @features: (allow-none) (transfer full): the #GstFeatures to set
+ *
+ * Sets the #GstCapsFeatures @features for the structure at @index.
+ */
+void
+gst_caps_set_features (GstCaps * caps, guint index, GstCapsFeatures * features)
+{
+ GstCapsFeatures **storage, *old;
+
+ g_return_if_fail (caps != NULL);
+ g_return_if_fail (index <= gst_caps_get_size (caps));
+ g_return_if_fail (IS_WRITABLE (caps));
+
+ storage = &gst_caps_get_features_unchecked (caps, index);
+ old = *storage;
+ *storage = features;
+ if (old)
+ gst_caps_features_free (old);
+}
+
+/**