str = g_string_sized_new (slen);
for (i = 0; i < gst_caps_get_size (caps); i++) {
+ GstCapsFeatures *features = __gst_caps_get_features_unchecked (caps, i);
GstStructure *structure = gst_caps_get_structure (caps, i);
- const GstCapsFeatures *features = gst_caps_get_features (caps, i);
- gchar *features_name = gst_caps_features_to_string (features);
-
g_string_append (str, gst_structure_get_name (structure));
- g_string_append (str, "(");
- g_string_append (str, features_name);
- g_string_append (str, ")\\l");
- g_free (features_name);
+ if (features && (gst_caps_features_is_any (features)
+ || !gst_caps_features_is_equal (features,
+ GST_CAPS_FEATURES_MEMORY_SYSTEM_MEMORY))) {
+ g_string_append_c (str, '(');
+ priv_gst_caps_features_append_to_gstring (features, str);
+ g_string_append_c (str, ')');
+ }
+ g_string_append (str, "\\l");
gst_structure_foreach (structure, string_append_field, (gpointer) str);
}