diff --git a/gst/gstdebugutils.c b/gst/gstdebugutils.c
index c115a10..ac91956 100644
--- a/gst/gstdebugutils.c
+++ b/gst/gstdebugutils.c
@@ -45,6 +45,7 @@
 #include "gstghostpad.h"
 #include "gstpad.h"
 #include "gstutils.h"
+#include "gstvalue.h"
 
 /*** PIPELINE GRAPHS **********************************************************/
 
@@ -204,6 +205,19 @@ debug_dump_element_pad (GstPad * pad, GstElement * element,
   g_free (spc);
 }
 
+static gboolean
+string_append_field (GQuark field, const GValue * value, gpointer ptr)
+{
+  GString *str = (GString *)ptr;
+  gchar *value_str = gst_value_serialize (value);
+
+  g_string_append_printf (str, "  %15s: %s\\l", g_quark_to_string (field), value_str);
+
+  g_free (value_str);
+  return TRUE;
+}
+
+
 static void
 debug_dump_element_pad_link (GstPad * pad, GstElement * element,
     GstDebugGraphDetails details, FILE * out, const gint indent)
@@ -240,12 +254,33 @@ debug_dump_element_pad_link (GstPad * pad, GstElement * element,
       }
       if (caps) {
         if (details & GST_DEBUG_GRAPH_SHOW_CAPS_DETAILS) {
-          gchar *tmp = g_strdelimit (gst_caps_to_string (caps), ",",
-              '\n');
+          if (gst_caps_is_any (caps) || gst_caps_is_empty (caps)) {
+            media = gst_caps_to_string (caps);
+            free_media = TRUE;
+          }
+          else {
+            GString *str = NULL;
+            guint i;
+            guint slen = 0;
+
+            for (i = 0; i < gst_caps_get_size (caps); i++) {
+              slen +=
+                  STRUCTURE_ESTIMATED_STRING_LEN (gst_caps_get_structure (caps, i));
+            }
 
-          media = g_strescape (tmp, NULL);
-          free_media = TRUE;
-          g_free (tmp);
+            str = g_string_sized_new (slen);
+            for (i = 0; i < gst_caps_get_size (caps); i++) {
+              GstStructure *structure = gst_caps_get_structure (caps, i);
+
+              g_string_append (str, gst_structure_get_name (structure));
+              g_string_append (str, "\\l");
+
+              gst_structure_foreach (structure, string_append_field, (gpointer) str);
+            }
+
+            media = g_string_free (str, FALSE);
+            free_media = TRUE;
+          }
         } else {
           if (GST_CAPS_IS_SIMPLE (caps)) {
             structure = gst_caps_get_structure (caps, 0);
@@ -334,7 +369,7 @@ debug_dump_element_pad_link (GstPad * pad, GstElement * element,
 
     /* pad link */
     if (media) {
-      fprintf (out, "%s%s_%s -> %s_%s [label=\"%s\"]\n", spc,
+      fprintf (out, "%s%s_%s -> %s_%s [fontname=\"monospace\" label=\"%s\"]\n", spc,
           element_name, pad_name, peer_element_name, peer_pad_name, media);
       if (free_media) {
         g_free (media);
