+/* copy caps */
+GST_API
+GstCaps * gst_caps_copy (const GstCaps * caps);
+
+#define gst_caps_copy(caps) GST_CAPS (gst_mini_object_copy (GST_MINI_OBJECT_CAST (caps)))
+
+/**
+ * gst_caps_is_writable:
+ * @caps: a #GstCaps
+ *
+ * Tests if you can safely modify @caps. It is only safe to modify caps when
+ * there is only one owner of the caps - ie, the object is writable.
+ */
+#define gst_caps_is_writable(caps) gst_mini_object_is_writable (GST_MINI_OBJECT_CAST (caps))
+
+/**
+ * gst_caps_make_writable:
+ * @caps: (transfer full): a #GstCaps
+ *
+ * Returns a writable copy of @caps.
+ *
+ * If there is only one reference count on @caps, the caller must be the owner,
+ * and so this function will return the caps object unchanged. If on the other
+ * hand there is more than one reference on the object, a new caps object will
+ * be returned. The caller's reference on @caps will be removed, and instead the
+ * caller will own a reference to the returned object.
+ *
+ * In short, this function unrefs the caps in the argument and refs the caps
+ * that it returns. Don't access the argument after calling this function. See
+ * also: gst_caps_ref().
+ *
+ * Returns: (transfer full): a writable caps which may or may not be the
+ * same as @caps
+ */
+#define gst_caps_make_writable(caps) GST_CAPS_CAST (gst_mini_object_make_writable (GST_MINI_OBJECT_CAST (caps)))
+
+/**
+ * gst_caps_replace:
+ * @old_caps: (inout) (transfer full) (nullable): pointer to a pointer
+ * to a #GstCaps to be replaced.
+ * @new_caps: (transfer none) (allow-none): pointer to a #GstCaps that will
+ * replace the caps pointed to by @old_caps.
+ *
+ * Modifies a pointer to a #GstCaps to point to a different #GstCaps. The
+ * modification is done atomically (so this is useful for ensuring thread safety
+ * in some cases), and the reference counts are updated appropriately (the old
+ * caps is unreffed, the new is reffed).
+ *
+ * Either @new_caps or the #GstCaps pointed to by @old_caps may be %NULL.
+ *
+ * Returns: %TRUE if @new_caps was different from @old_caps
+ */
+static inline gboolean
+gst_caps_replace (GstCaps **old_caps, GstCaps *new_caps)
+{
+ return gst_mini_object_replace ((GstMiniObject **) old_caps, (GstMiniObject *) new_caps);
+}
+
+/**
+ * gst_caps_take:
+ * @old_caps: (inout) (transfer full): pointer to a pointer to a #GstCaps to be
+ * replaced.
+ * @new_caps: (transfer full) (allow-none): pointer to a #GstCaps that will
+ * replace the caps pointed to by @old_caps.
+ *
+ * Modifies a pointer to a #GstCaps to point to a different #GstCaps. This
+ * function is similar to gst_caps_replace() except that it takes ownership
+ * of @new_caps.
+ *
+ * Returns: %TRUE if @new_caps was different from @old_caps
+ */
+static inline gboolean
+gst_caps_take (GstCaps **old_caps, GstCaps *new_caps)
+{
+ return gst_mini_object_take ((GstMiniObject **) old_caps, (GstMiniObject *) new_caps);
+}
+
+/**
+ * GstCaps:
+ * @mini_object: the parent type
+ *
+ * Object describing media types.
+ */
+struct _GstCaps {
+ GstMiniObject mini_object;