/**
* SECTION:gstcapsfeatures
- * @short_description: A set of features in caps
+ * @title: GstCapsFeatures
+ * @short_description: A set of features in caps
* @see_also: #GstCaps
*
* #GstCapsFeatures can optionally be set on a #GstCaps to add requirements
};
GType _gst_caps_features_type = 0;
+static gint static_caps_features_parent_refcount = G_MAXINT;
GstCapsFeatures *_gst_caps_features_any = NULL;
GstCapsFeatures *_gst_caps_features_memory_system_memory = NULL;
static GQuark _gst_caps_feature_memory_system_memory = 0;
gst_caps_features_transform_to_string);
_gst_caps_features_any = gst_caps_features_new_any ();
+ gst_caps_features_set_parent_refcount (_gst_caps_features_any,
+ &static_caps_features_parent_refcount);
_gst_caps_features_memory_system_memory =
gst_caps_features_new_id (_gst_caps_feature_memory_system_memory, 0);
+ gst_caps_features_set_parent_refcount
+ (_gst_caps_features_memory_system_memory,
+ &static_caps_features_parent_refcount);
+}
+
+void
+_priv_gst_caps_features_cleanup (void)
+{
+ gst_caps_features_set_parent_refcount (_gst_caps_features_any, NULL);
+ gst_caps_features_free (_gst_caps_features_any);
+ _gst_caps_features_any = NULL;
+ gst_caps_features_set_parent_refcount
+ (_gst_caps_features_memory_system_memory, NULL);
+ gst_caps_features_free (_gst_caps_features_memory_system_memory);
+ _gst_caps_features_memory_system_memory = NULL;
}
gboolean
* @...: additional features
*
* Creates a new #GstCapsFeatures with the given features.
- * The last argument must be NULL.
+ * The last argument must be %NULL.
*
* Free-function: gst_caps_features_free
*
* Converts @features to a human-readable string representation.
*
* For debugging purposes its easier to do something like this:
- * |[
+ * |[<!-- language="C" -->
* GST_LOG ("features is %" GST_PTR_FORMAT, features);
* ]|
* This prints the features in human readable form.
*
* Free-function: gst_caps_features_free
*
- * Returns: (transfer full): a new #GstCapsFeatures or NULL when the string could
- * not be parsed. Free with gst_caps_features_free() after use.
+ * Returns: (transfer full) (nullable): a new #GstCapsFeatures or
+ * %NULL when the string could not be parsed. Free with
+ * gst_caps_features_free() after use.
*
* Since: 1.2
*/
*
* Returns the @i-th feature of @features.
*
- * Returns: The @i-th feature of @features.
+ * Returns: (nullable): The @i-th feature of @features.
*
* Since: 1.2
*/
}
/* If features is empty it will contain sysmem, however
- * we want to add it explicitely if it is tried to be
+ * we want to add it explicitly if it is attempted to be
* added as first features
*/
if (features->array->len > 0