gst: Add some more Since: 1.2
[platform/upstream/gstreamer.git] / gst / gstcaps.c
index ee1806b..7e10a2a 100644 (file)
@@ -102,7 +102,7 @@ typedef struct _GstCapsImpl
 #define CAPS_IS_EMPTY_SIMPLE(caps)                                     \
   ((GST_CAPS_ARRAY (caps) == NULL) || (GST_CAPS_LEN (caps) == 0))
 
-#define gst_caps_features_copy_conditional(f) ((f && !gst_caps_features_is_equal (f, GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY)) ? gst_caps_features_copy (f) : NULL)
+#define gst_caps_features_copy_conditional(f) ((f && (gst_caps_features_is_any (f) || !gst_caps_features_is_equal (f, GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY))) ? gst_caps_features_copy (f) : NULL)
 
 /* quick way to get a caps structure at an index without doing a type or array
  * length check */
@@ -624,6 +624,8 @@ gst_caps_append_structure (GstCaps * caps, GstStructure * structure)
  *
  * Appends @structure with @features to @caps.  The structure is not copied; @caps
  * becomes the owner of @structure.
+ *
+ * Since: 1.2
  */
 void
 gst_caps_append_structure_full (GstCaps * caps, GstStructure * structure,
@@ -714,6 +716,8 @@ gst_caps_merge_structure (GstCaps * caps, GstStructure * structure)
  * Appends @structure with @features to @caps if its not already expressed by @caps.
  *
  * Returns: (transfer full): the merged caps.
+ *
+ * Since: 1.2
  */
 GstCaps *
 gst_caps_merge_structure_full (GstCaps * caps, GstStructure * structure,
@@ -834,6 +838,8 @@ gst_caps_get_structure (const GstCaps * caps, guint index)
  *
  * Returns: (transfer none): a pointer to the #GstCapsFeatures corresponding
  *     to @index
+ *
+ * Since: 1.2
  */
 GstCapsFeatures *
 gst_caps_get_features (const GstCaps * caps, guint index)
@@ -857,6 +863,8 @@ gst_caps_get_features (const GstCaps * caps, guint index)
  * @features: (allow-none) (transfer full): the #GstFeatures to set
  *
  * Sets the #GstCapsFeatures @features for the structure at @index.
+ *
+ * Since: 1.2
  */
 void
 gst_caps_set_features (GstCaps * caps, guint index, GstCapsFeatures * features)
@@ -1250,6 +1258,8 @@ gst_caps_is_subset_structure (const GstCaps * caps,
  * for more information.
  *
  * Returns: %TRUE if @structure is a subset of @caps
+ *
+ * Since: 1.2
  */
 gboolean
 gst_caps_is_subset_structure_full (const GstCaps * caps,
@@ -2171,9 +2181,9 @@ gst_caps_to_string (const GstCaps * caps)
     features = gst_caps_get_features_unchecked (caps, i);
 
     g_string_append (s, gst_structure_get_name (structure));
-    if (features
-        && !gst_caps_features_is_equal (features,
-            GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY)) {
+    if (features && (gst_caps_features_is_any (features)
+            || !gst_caps_features_is_equal (features,
+                GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY))) {
       g_string_append_c (s, '(');
       priv_gst_caps_features_append_to_gstring (features, s);
       g_string_append_c (s, ')');