summaryrefslogtreecommitdiff
path: root/gst/gstdebugutils.c
diff options
context:
space:
mode:
authorOlivier CrĂȘte <olivier.crete@collabora.com>2013-07-31 09:26:26 +0200
committerOlivier CrĂȘte <olivier.crete@collabora.com>2014-02-26 03:15:44 -0500
commite3d57dc11de3562448eba86a9b17b926682a9ec2 (patch)
treee8fc68555c99237018b7d2ff5b32b6c437685973 /gst/gstdebugutils.c
parentf0bd2540c0f75d999223f06e8fdb64d7a43f4f4a (diff)
debugutils: Print if there is a task started from a pad
https://bugzilla.gnome.org/show_bug.cgi?id=705189
Diffstat (limited to 'gst/gstdebugutils.c')
-rw-r--r--gst/gstdebugutils.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/gst/gstdebugutils.c b/gst/gstdebugutils.c
index 23c8f9b49..7b5f7641f 100644
--- a/gst/gstdebugutils.c
+++ b/gst/gstdebugutils.c
@@ -163,6 +163,25 @@ debug_dump_pad (GstPad * pad, const gchar * color_name,
if (details & GST_DEBUG_GRAPH_SHOW_STATES) {
gchar pad_flags[4];
const gchar *activation_mode = "-><";
+ const gchar *task_mode = "";
+ GstTask *task;
+
+ GST_OBJECT_LOCK (pad);
+ task = GST_PAD_TASK (pad);
+ if (task) {
+ switch (gst_task_get_state (task)) {
+ case GST_TASK_STARTED:
+ task_mode = "[T]";
+ break;
+ case GST_TASK_PAUSED:
+ task_mode = "[t]";
+ break;
+ default:
+ /* Invalid task state, ignoring */
+ break;
+ }
+ }
+ GST_OBJECT_UNLOCK (pad);
/* check if pad flags */
pad_flags[0] =
@@ -174,9 +193,9 @@ debug_dump_pad (GstPad * pad, const gchar * color_name,
pad_flags[3] = '\0';
fprintf (out,
- "%s %s_%s [color=black, fillcolor=\"%s\", label=\"%s\\n[%c][%s]\", height=\"0.2\", style=\"%s\"];\n",
+ "%s %s_%s [color=black, fillcolor=\"%s\", label=\"%s\\n[%c][%s]%s\", height=\"0.2\", style=\"%s\"];\n",
spc, element_name, pad_name, color_name, GST_OBJECT_NAME (pad),
- activation_mode[pad->mode], pad_flags, style_name);
+ activation_mode[pad->mode], pad_flags, task_mode, style_name);
} else {
fprintf (out,
"%s %s_%s [color=black, fillcolor=\"%s\", label=\"%s\", height=\"0.2\", style=\"%s\"];\n",