X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=gst%2Fgstcaps.c;h=9e6408d574ea34d19b1557bd9575d4de197b992e;hb=dac5966da6a0f53d0443dfa1ac239289028c415d;hp=9106f9f88f09a2b96a4ff1aa75ecd27d3c6359c6;hpb=8d7e11e307dbd4a8a8a053f2a05af1098957a070;p=platform%2Fupstream%2Fgstreamer.git
diff --git a/gst/gstcaps.c b/gst/gstcaps.c
index 9106f9f..9e6408d 100644
--- a/gst/gstcaps.c
+++ b/gst/gstcaps.c
@@ -19,6 +19,7 @@
/**
* SECTION:gstcaps
+ * @title: GstCaps
* @short_description: Structure describing sets of media formats
* @see_also: #GstStructure, #GstMiniObject
*
@@ -34,20 +35,15 @@
* handle or produce at runtime.
*
* A #GstCaps can be constructed with the following code fragment:
- *
- *
- * Creating caps
- *
- * GstCaps *caps;
- * caps = gst_caps_new_simple ("video/x-raw",
- * "format", G_TYPE_STRING, "I420",
- * "framerate", GST_TYPE_FRACTION, 25, 1,
- * "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1,
- * "width", G_TYPE_INT, 320,
- * "height", G_TYPE_INT, 240,
- * NULL);
- *
- *
+ * |[
+ * GstCaps *caps = gst_caps_new_simple ("video/x-raw",
+ * "format", G_TYPE_STRING, "I420",
+ * "framerate", GST_TYPE_FRACTION, 25, 1,
+ * "pixel-aspect-ratio", GST_TYPE_FRACTION, 1, 1,
+ * "width", G_TYPE_INT, 320,
+ * "height", G_TYPE_INT, 240,
+ * NULL);
+ * ]|
*
* A #GstCaps is fixed when it has no properties with ranges or lists. Use
* gst_caps_is_fixed() to test for fixed caps. Fixed caps can be used in a
@@ -61,8 +57,6 @@
* support one level of nesting. Using more levels will lead to unexpected
* behavior when using serialization features, such as gst_caps_to_string() or
* gst_value_serialize() and their counterparts.
- *
- * Last reviewed on 2011-03-28 (0.11.3)
*/
#ifdef HAVE_CONFIG_H
@@ -99,7 +93,7 @@ typedef struct _GstCapsImpl
/* same as gst_caps_is_any () */
#define CAPS_IS_ANY(caps) \
- (GST_CAPS_FLAGS(caps) & GST_CAPS_FLAG_ANY)
+ (!!(GST_CAPS_FLAGS(caps) & GST_CAPS_FLAG_ANY))
/* same as gst_caps_is_empty () */
#define CAPS_IS_EMPTY(caps) \
@@ -152,6 +146,21 @@ _priv_gst_caps_initialize (void)
G_TYPE_STRING, gst_caps_transform_to_string);
}
+void
+_priv_gst_caps_cleanup (void)
+{
+ gst_caps_unref (_gst_caps_any);
+ _gst_caps_any = NULL;
+ gst_caps_unref (_gst_caps_none);
+ _gst_caps_none = NULL;
+}
+
+GstCapsFeatures *
+__gst_caps_get_features_unchecked (const GstCaps * caps, guint idx)
+{
+ return gst_caps_get_features_unchecked (caps, idx);
+}
+
static GstCaps *
_gst_caps_copy (const GstCaps * caps)
{
@@ -166,8 +175,7 @@ _gst_caps_copy (const GstCaps * caps)
GST_CAPS_FLAGS (newcaps) = GST_CAPS_FLAGS (caps);
n = GST_CAPS_LEN (caps);
- GST_CAT_DEBUG_OBJECT (GST_CAT_PERFORMANCE, caps, "doing copy %p -> %p",
- caps, newcaps);
+ GST_CAT_DEBUG (GST_CAT_PERFORMANCE, "doing copy %p -> %p", caps, newcaps);
for (i = 0; i < n; i++) {
structure = gst_caps_get_structure_unchecked (caps, i);
@@ -207,6 +215,11 @@ _gst_caps_free (GstCaps * caps)
#ifdef DEBUG_REFCOUNT
GST_CAT_TRACE (GST_CAT_CAPS, "freeing caps %p", caps);
#endif
+
+#ifdef USE_POISONING
+ memset (caps, 0xff, sizeof (GstCapsImpl));
+#endif
+
g_slice_free1 (sizeof (GstCapsImpl), caps);
}
@@ -334,7 +347,7 @@ gst_caps_new_simple (const char *media_type, const char *fieldname, ...)
* @...: additional structures to add
*
* Creates a new #GstCaps and adds all the structures listed as
- * arguments. The list must be NULL-terminated. The structures
+ * arguments. The list must be %NULL-terminated. The structures
* are not copied; the returned #GstCaps owns the structures.
*
* Returns: (transfer full): the new #GstCaps
@@ -358,7 +371,7 @@ gst_caps_new_full (GstStructure * struct1, ...)
* @var_args: additional structures to add
*
* Creates a new #GstCaps and adds all the structures listed as
- * arguments. The list must be NULL-terminated. The structures
+ * arguments. The list must be %NULL-terminated. The structures
* are not copied; the returned #GstCaps owns the structures.
*
* Returns: (transfer full): the new #GstCaps
@@ -386,9 +399,10 @@ G_DEFINE_POINTER_TYPE (GstStaticCaps, gst_static_caps);
*
* Converts a #GstStaticCaps to a #GstCaps.
*
- * Returns: (transfer full): a pointer to the #GstCaps. Unref after usage.
- * Since the core holds an additional ref to the returned caps,
- * use gst_caps_make_writable() on the returned caps to modify it.
+ * Returns: (transfer full) (nullable): a pointer to the #GstCaps. Unref
+ * after usage. Since the core holds an additional ref to the
+ * returned caps, use gst_caps_make_writable() on the returned caps
+ * to modify it.
*/
GstCaps *
gst_static_caps_get (GstStaticCaps * static_caps)
@@ -416,8 +430,13 @@ gst_static_caps_get (GstStaticCaps * static_caps)
*caps = gst_caps_from_string (string);
/* convert to string */
- if (G_UNLIKELY (*caps == NULL))
+ if (G_UNLIKELY (*caps == NULL)) {
g_critical ("Could not convert static caps \"%s\"", string);
+ goto done;
+ }
+
+ /* Caps generated from static caps are usually leaked */
+ GST_MINI_OBJECT_FLAG_SET (*caps, GST_MINI_OBJECT_FLAG_MAY_BE_LEAKED);
GST_CAT_TRACE (GST_CAT_CAPS, "created %p from string %s", static_caps,
string);
@@ -491,8 +510,6 @@ gst_caps_remove_and_get_structure (GstCaps * caps, guint idx)
return s;
}
-
-
/**
* gst_caps_steal_structure:
* @caps: the #GstCaps to retrieve from
@@ -501,8 +518,8 @@ gst_caps_remove_and_get_structure (GstCaps * caps, guint idx)
* Retrieves the structure with the given index from the list of structures
* contained in @caps. The caller becomes the owner of the returned structure.
*
- * Returns: (transfer full): a pointer to the #GstStructure corresponding
- * to @index.
+ * Returns: (transfer full) (nullable): a pointer to the #GstStructure
+ * corresponding to @index.
*/
GstStructure *
gst_caps_steal_structure (GstCaps * caps, guint index)
@@ -844,8 +861,8 @@ gst_caps_get_structure (const GstCaps * caps, guint index)
* 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
+ * Returns: (transfer none) (nullable): a pointer to the #GstCapsFeatures
+ * corresponding to @index
*
* Since: 1.2
*/
@@ -908,8 +925,43 @@ gst_caps_set_features (GstCaps * caps, guint index, GstCapsFeatures * features)
if (features)
gst_caps_features_set_parent_refcount (features, &GST_CAPS_REFCOUNT (caps));
- if (old)
+ if (old) {
+ gst_caps_features_set_parent_refcount (old, NULL);
gst_caps_features_free (old);
+ }
+}
+
+/**
+ * gst_caps_set_features_simple:
+ * @caps: a #GstCaps
+ * @features: (allow-none) (transfer full): the #GstCapsFeatures to set
+ *
+ * Sets the #GstCapsFeatures @features for all the structures of @caps.
+ *
+ * Since: 1.16
+ */
+void
+gst_caps_set_features_simple (GstCaps * caps, GstCapsFeatures * features)
+{
+ guint i;
+ guint n;
+
+ g_return_if_fail (caps != NULL);
+ g_return_if_fail (IS_WRITABLE (caps));
+
+ n = gst_caps_get_size (caps);
+
+ for (i = 0; i < n; i++) {
+ GstCapsFeatures *f;
+
+ /* Transfer ownership of @features to the last structure */
+ if (features && i < n - 1)
+ f = gst_caps_features_copy (features);
+ else
+ f = features;
+
+ gst_caps_set_features (caps, i, f);
+ }
}
/**
@@ -921,6 +973,8 @@ gst_caps_set_features (GstCaps * caps, guint index, GstCapsFeatures * features)
* contained in @caps.
*
* Returns: (transfer full): the new #GstCaps
+ *
+ * Since: 1.16
*/
GstCaps *
gst_caps_copy_nth (const GstCaps * caps, guint nth)
@@ -952,6 +1006,10 @@ gst_caps_copy_nth (const GstCaps * caps, guint nth)
* Discard all but the first structure from @caps. Useful when
* fixating.
*
+ * This function takes ownership of @caps and will call gst_caps_make_writable()
+ * on it if necessary, so you must not use @caps afterwards unless you keep an
+ * additional reference to it with gst_caps_ref().
+ *
* Returns: (transfer full): truncated caps
*/
GstCaps *
@@ -1006,7 +1064,7 @@ gst_caps_set_value (GstCaps * caps, const char *field, const GValue * value)
* @varargs: additional parameters
*
* Sets fields in a #GstCaps. The arguments must be passed in the same
- * manner as gst_structure_set(), and be NULL-terminated.
+ * manner as gst_structure_set(), and be %NULL-terminated.
*/
void
gst_caps_set_simple_valist (GstCaps * caps, const char *field, va_list varargs)
@@ -1025,6 +1083,7 @@ gst_caps_set_simple_valist (GstCaps * caps, const char *field, va_list varargs)
G_VALUE_COLLECT_INIT (&value, type, varargs, 0, &err);
if (G_UNLIKELY (err)) {
g_critical ("%s", err);
+ g_free (err);
return;
}
@@ -1043,7 +1102,7 @@ gst_caps_set_simple_valist (GstCaps * caps, const char *field, va_list varargs)
* @...: additional parameters
*
* Sets fields in a #GstCaps. The arguments must be passed in the same
- * manner as gst_structure_set(), and be NULL-terminated.
+ * manner as gst_structure_set(), and be %NULL-terminated.
*/
void
gst_caps_set_simple (GstCaps * caps, const char *field, ...)
@@ -1066,7 +1125,7 @@ gst_caps_set_simple (GstCaps * caps, const char *field, ...)
*
* Determines if @caps represents any media format.
*
- * Returns: TRUE if @caps represents any format.
+ * Returns: %TRUE if @caps represents any format.
*/
gboolean
gst_caps_is_any (const GstCaps * caps)
@@ -1082,7 +1141,7 @@ gst_caps_is_any (const GstCaps * caps)
*
* Determines if @caps represents no media formats.
*
- * Returns: TRUE if @caps represents no formats.
+ * Returns: %TRUE if @caps represents no formats.
*/
gboolean
gst_caps_is_empty (const GstCaps * caps)
@@ -1110,7 +1169,7 @@ gst_caps_is_fixed_foreach (GQuark field_id, const GValue * value,
* one structure, and each field in the structure describes a fixed type.
* Examples of non-fixed types are GST_TYPE_INT_RANGE and GST_TYPE_LIST.
*
- * Returns: TRUE if @caps is fixed
+ * Returns: %TRUE if @caps is fixed
*/
gboolean
gst_caps_is_fixed (const GstCaps * caps)
@@ -1140,7 +1199,7 @@ gst_caps_is_fixed (const GstCaps * caps)
* Tests if two #GstCaps are equal. This function only works on fixed
* #GstCaps.
*
- * Returns: TRUE if the arguments represent the same format
+ * Returns: %TRUE if the arguments represent the same format
*/
gboolean
gst_caps_is_equal_fixed (const GstCaps * caps1, const GstCaps * caps2)
@@ -1173,7 +1232,7 @@ gst_caps_is_equal_fixed (const GstCaps * caps1, const GstCaps * caps2)
* every media format that is in the first is also contained in the
* second. That is, @caps1 is a subset of @caps2.
*
- * Returns: TRUE if @caps1 is a subset of @caps2.
+ * Returns: %TRUE if @caps1 is a subset of @caps2.
*/
gboolean
gst_caps_is_always_compatible (const GstCaps * caps1, const GstCaps * caps2)
@@ -1329,7 +1388,7 @@ gst_caps_is_subset_structure_full (const GstCaps * caps,
*
* Checks if the given caps represent the same set of caps.
*
- * Returns: TRUE if both caps are equal.
+ * Returns: %TRUE if both caps are equal.
*/
gboolean
gst_caps_is_equal (const GstCaps * caps1, const GstCaps * caps2)
@@ -1353,7 +1412,7 @@ gst_caps_is_equal (const GstCaps * caps1, const GstCaps * caps2)
*
* Checks if the given caps are exactly the same set of caps.
*
- * Returns: TRUE if both caps are strictly equal.
+ * Returns: %TRUE if both caps are strictly equal.
*/
gboolean
gst_caps_is_strictly_equal (const GstCaps * caps1, const GstCaps * caps2)
@@ -1447,7 +1506,7 @@ gst_caps_can_intersect (const GstCaps * caps1, const GstCaps * caps2)
len1 = GST_CAPS_LEN (caps1);
len2 = GST_CAPS_LEN (caps2);
for (i = 0; i < len1 + len2 - 1; i++) {
- /* superset index goes from 0 to sgst_caps_structure_intersectuperset->structs->len-1 */
+ /* superset index goes from 0 to superset->structs->len-1 */
j = MIN (i, len1 - 1);
/* subset index stays 0 until i reaches superset->structs->len, then it
* counts up from 1 to subset->structs->len - 1 */
@@ -1575,7 +1634,7 @@ gst_caps_intersect_zig_zag (GstCaps * caps1, GstCaps * caps2)
* Unlike @gst_caps_intersect, the returned caps will be ordered in a similar
* fashion as @caps1.
*
- * Returns: the new #GstCaps
+ * Returns: (transfer full): the new #GstCaps
*/
static GstCaps *
gst_caps_intersect_first (GstCaps * caps1, GstCaps * caps2)
@@ -1646,7 +1705,7 @@ gst_caps_intersect_first (GstCaps * caps1, GstCaps * caps2)
* to both @caps1 and @caps2, the order is defined by the #GstCapsIntersectMode
* used.
*
- * Returns: the new #GstCaps
+ * Returns: (transfer full): the new #GstCaps
*/
GstCaps *
gst_caps_intersect_full (GstCaps * caps1, GstCaps * caps2,
@@ -1674,7 +1733,7 @@ gst_caps_intersect_full (GstCaps * caps1, GstCaps * caps2,
* Creates a new #GstCaps that contains all the formats that are common
* to both @caps1 and @caps2. Defaults to %GST_CAPS_INTERSECT_ZIG_ZAG mode.
*
- * Returns: the new #GstCaps
+ * Returns: (transfer full): the new #GstCaps
*/
GstCaps *
gst_caps_intersect (GstCaps * caps1, GstCaps * caps2)
@@ -1751,10 +1810,10 @@ gst_caps_structure_subtract (GSList ** into, const GstStructure * minuend,
* @subtrahend: #GstCaps to subtract
*
* Subtracts the @subtrahend from the @minuend.
- * This function does not work reliably if optional properties for caps
- * are included on one caps and omitted on the other.
+ * > This function does not work reliably if optional properties for caps
+ * > are included on one caps and omitted on the other.
*
- * Returns: the resulting caps
+ * Returns: (transfer full): the resulting caps
*/
GstCaps *
gst_caps_subtract (GstCaps * minuend, GstCaps * subtrahend)
@@ -1887,7 +1946,9 @@ gst_caps_normalize_foreach (GQuark field_id, const GValue * value, gpointer ptr)
* @caps, but contains no lists. Each list is expanded into separate
* @GstStructures.
*
- * This function takes ownership of @caps.
+ * This function takes ownership of @caps and will call gst_caps_make_writable()
+ * on it so you must not use @caps afterwards unless you keep an additional
+ * reference to it with gst_caps_ref().
*
* Returns: (transfer full): the normalized #GstCaps
*/
@@ -2044,9 +2105,13 @@ gst_caps_switch_structures (GstCaps * caps, GstStructure * old,
* identical are merged. Component structures that have values that can be
* merged are also merged.
*
+ * This function takes ownership of @caps and will call gst_caps_make_writable()
+ * on it if necessary, so you must not use @caps afterwards unless you keep an
+ * additional reference to it with gst_caps_ref().
+ *
* This method does not preserve the original order of @caps.
*
- * Returns: The simplified caps.
+ * Returns: (transfer full): The simplified caps.
*/
GstCaps *
gst_caps_simplify (GstCaps * caps)
@@ -2114,6 +2179,10 @@ gst_caps_simplify (GstCaps * caps)
* values. First the caps will be truncated and then the first structure will be
* fixated with gst_structure_fixate().
*
+ * This function takes ownership of @caps and will call gst_caps_make_writable()
+ * on it so you must not use @caps afterwards unless you keep an additional
+ * reference to it with gst_caps_ref().
+ *
* Returns: (transfer full): the fixated caps
*/
GstCaps *
@@ -2150,7 +2219,7 @@ gst_caps_fixate (GstCaps * caps)
* can be converted back to a #GstCaps by gst_caps_from_string().
*
* For debugging purposes its easier to do something like this:
- * |[
+ * |[
* GST_LOG ("caps are %" GST_PTR_FORMAT, caps);
* ]|
* This prints the caps in human readable form.
@@ -2306,12 +2375,15 @@ gst_caps_from_string_inplace (GstCaps * caps, const gchar * string)
if (!priv_gst_structure_parse_fields (s, &s, structure)) {
gst_structure_free (structure);
+ if (features)
+ gst_caps_features_free (features);
g_free (copy);
return FALSE;
}
append:
gst_caps_append_structure_unchecked (caps, structure, features);
+ features = NULL;
if (*s == '\0')
break;
} while (TRUE);
@@ -2330,7 +2402,7 @@ gst_caps_from_string_inplace (GstCaps * caps, const gchar * string)
* The current implementation of serialization will lead to unexpected results
* when there are nested #GstCaps / #GstStructure deeper than one level.
*
- * Returns: (transfer full): a newly allocated #GstCaps
+ * Returns: (transfer full) (nullable): a newly allocated #GstCaps
*/
GstCaps *
gst_caps_from_string (const gchar * string)
@@ -2360,3 +2432,171 @@ gst_caps_transform_to_string (const GValue * src_value, GValue * dest_value)
g_value_take_string (dest_value,
gst_caps_to_string (gst_value_get_caps (src_value)));
}
+
+/**
+ * gst_caps_foreach:
+ * @caps: a #GstCaps
+ * @func: (scope call): a function to call for each field
+ * @user_data: (closure): private data
+ *
+ * Calls the provided function once for each structure and caps feature in the
+ * #GstCaps. The function must not modify the fields.
+ * Also see gst_caps_map_in_place() and gst_caps_filter_and_map_in_place().
+ *
+ * Returns: %TRUE if the supplied function returns %TRUE for each call,
+ * %FALSE otherwise.
+ *
+ * Since: 1.6
+ */
+gboolean
+gst_caps_foreach (const GstCaps * caps, GstCapsForeachFunc func,
+ gpointer user_data)
+{
+ guint i, n;
+ GstCapsFeatures *features;
+ GstStructure *structure;
+ gboolean ret;
+
+ g_return_val_if_fail (GST_IS_CAPS (caps), FALSE);
+ g_return_val_if_fail (func != NULL, FALSE);
+
+ n = GST_CAPS_LEN (caps);
+
+ for (i = 0; i < n; i++) {
+ features = gst_caps_get_features_unchecked (caps, i);
+ structure = gst_caps_get_structure_unchecked (caps, i);
+
+ ret = func (features, structure, user_data);
+ if (G_UNLIKELY (!ret))
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/**
+ * gst_caps_map_in_place:
+ * @caps: a #GstCaps
+ * @func: (scope call): a function to call for each field
+ * @user_data: (closure): private data
+ *
+ * Calls the provided function once for each structure and caps feature in the
+ * #GstCaps. In contrast to gst_caps_foreach(), the function may modify but not
+ * delete the structures and features. The caps must be mutable.
+ *
+ * Returns: %TRUE if the supplied function returns %TRUE for each call,
+ * %FALSE otherwise.
+ *
+ * Since: 1.6
+ */
+gboolean
+gst_caps_map_in_place (GstCaps * caps, GstCapsMapFunc func, gpointer user_data)
+{
+ guint i, n;
+ GstCapsFeatures *features;
+ GstStructure *structure;
+ gboolean ret;
+
+ g_return_val_if_fail (GST_IS_CAPS (caps), FALSE);
+ g_return_val_if_fail (gst_caps_is_writable (caps), FALSE);
+ g_return_val_if_fail (func != NULL, FALSE);
+
+ n = GST_CAPS_LEN (caps);
+
+ for (i = 0; i < n; i++) {
+ features = gst_caps_get_features_unchecked (caps, i);
+ structure = gst_caps_get_structure_unchecked (caps, i);
+
+ /* Provide sysmem features if there are none yet */
+ if (!features) {
+ features =
+ gst_caps_features_copy (GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY);
+ gst_caps_set_features (caps, i, features);
+ }
+
+ ret = func (features, structure, user_data);
+ if (G_UNLIKELY (!ret))
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/**
+ * gst_caps_filter_and_map_in_place:
+ * @caps: a #GstCaps
+ * @func: (scope call): a function to call for each field
+ * @user_data: (closure): private data
+ *
+ * Calls the provided function once for each structure and caps feature in the
+ * #GstCaps. In contrast to gst_caps_foreach(), the function may modify the
+ * structure and features. In contrast to gst_caps_filter_and_map_in_place(),
+ * the structure and features are removed from the caps if %FALSE is returned
+ * from the function.
+ * The caps must be mutable.
+ *
+ * Since: 1.6
+ */
+void
+gst_caps_filter_and_map_in_place (GstCaps * caps, GstCapsFilterMapFunc func,
+ gpointer user_data)
+{
+ guint i, n;
+ GstCapsFeatures *features;
+ GstStructure *structure;
+ gboolean ret;
+
+ g_return_if_fail (GST_IS_CAPS (caps));
+ g_return_if_fail (gst_caps_is_writable (caps));
+ g_return_if_fail (func != NULL);
+
+ n = GST_CAPS_LEN (caps);
+
+ for (i = 0; i < n;) {
+ features = gst_caps_get_features_unchecked (caps, i);
+ structure = gst_caps_get_structure_unchecked (caps, i);
+
+ /* Provide sysmem features if there are none yet */
+ if (!features) {
+ features =
+ gst_caps_features_copy (GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY);
+ gst_caps_set_features (caps, i, features);
+ }
+
+ ret = func (features, structure, user_data);
+ if (!ret) {
+ GST_CAPS_ARRAY (caps) = g_array_remove_index (GST_CAPS_ARRAY (caps), i);
+
+ gst_structure_set_parent_refcount (structure, NULL);
+ gst_structure_free (structure);
+ if (features) {
+ gst_caps_features_set_parent_refcount (features, NULL);
+ gst_caps_features_free (features);
+ }
+
+ n = GST_CAPS_LEN (caps);
+ } else {
+ i++;
+ }
+ }
+}
+
+/**
+ * gst_caps_copy:
+ * @caps: a #GstCaps.
+ *
+ * Creates a new #GstCaps as a copy of the old @caps. The new caps will have a
+ * refcount of 1, owned by the caller. The structures are copied as well.
+ *
+ * Note that this function is the semantic equivalent of a gst_caps_ref()
+ * followed by a gst_caps_make_writable(). If you only want to hold on to a
+ * reference to the data, you should use gst_caps_ref().
+ *
+ * When you are finished with the caps, call gst_caps_unref() on it.
+ *
+ * Returns: the new #GstCaps
+ */
+GstCaps *(gst_caps_copy) (const GstCaps * caps)
+{
+ return GST_CAPS (gst_mini_object_copy (GST_MINI_OBJECT_CAST (caps)));
+}