#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 */
*
* 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,
* 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,
*
* Returns: (transfer none): a pointer to the #GstCapsFeatures corresponding
* to @index
+ *
+ * Since: 1.2
*/
GstCapsFeatures *
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)
* 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,
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, ')');