gst/gstdebugutils.c: Improve handling ghost/proxy pads.

Original commit message from CVS:
* gst/gstdebugutils.c:
Improve handling ghost/proxy pads.
This commit is contained in:
Stefan Kost 2008-03-31 07:49:26 +00:00
parent 847e64d8ee
commit 4da82e9b62
2 changed files with 52 additions and 41 deletions

View file

@ -1,3 +1,8 @@
2008-03-31 Stefan Kost <ensonic@users.sf.net>
* gst/gstdebugutils.c:
Improve handling ghost/proxy pads.
2008-03-27 Stefan Kost <ensonic@users.sf.net>
* docs/gst/gstreamer-sections.txt:

View file

@ -134,7 +134,7 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out,
GstIterator *element_iter, *pad_iter;
gboolean elements_done, pads_done;
GstElement *element, *peer_element, *target_element;
GstPad *pad, *peer_pad, *target_pad;
GstPad *pad, *peer_pad, *target_pad, *tmp_pad;
GstPadDirection dir;
GstCaps *caps;
GstStructure *structure;
@ -317,8 +317,9 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out,
}
if (GST_IS_GHOST_PAD (pad)) {
if ((target_pad =
if ((tmp_pad =
gst_ghost_pad_get_target (GST_GHOST_PAD (pad)))) {
if ((target_pad = gst_pad_get_peer (tmp_pad))) {
target_pad_name =
debug_dump_make_object_name (GST_OBJECT
(target_pad));
@ -331,9 +332,9 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out,
target_element_name = "";
}
/* src ghostpad relationship */
fprintf (out, "%s%s_%s -> %s_%s [style=dashed]\n", spc,
target_element_name, target_pad_name, element_name,
pad_name);
fprintf (out, "%s%s_%s -> %s_%s [style=dashed]\n",
spc, target_element_name, target_pad_name,
element_name, pad_name);
g_free (target_pad_name);
if (target_element) {
@ -342,11 +343,14 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out,
}
gst_object_unref (target_pad);
}
gst_object_unref (tmp_pad);
}
}
if (GST_IS_GHOST_PAD (peer_pad)) {
if ((target_pad =
if ((tmp_pad =
gst_ghost_pad_get_target (GST_GHOST_PAD
(peer_pad)))) {
if ((target_pad = gst_pad_get_peer (tmp_pad))) {
target_pad_name =
debug_dump_make_object_name (GST_OBJECT
(target_pad));
@ -359,8 +363,8 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out,
target_element_name = "";
}
/* sink ghostpad relationship */
fprintf (out, "%s%s_%s -> %s_%s [style=dashed]\n", spc,
peer_element_name, peer_pad_name,
fprintf (out, "%s%s_%s -> %s_%s [style=dashed]\n",
spc, peer_element_name, peer_pad_name,
target_element_name, target_pad_name);
g_free (target_pad_name);
@ -370,6 +374,8 @@ debug_dump_element (GstBin * bin, GstDebugGraphDetails details, FILE * out,
}
gst_object_unref (target_pad);
}
gst_object_unref (tmp_pad);
}
}
g_free (pad_name);