From 04ee9bbe1a0c3770b80c5c82224f838447805f94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Fri, 10 Jan 2014 11:17:38 +0000 Subject: [PATCH] tools: gst-play: add dot file dumping for pipeline graph debugging --- tools/gst-play.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/gst-play.c b/tools/gst-play.c index 7f78e300c0..6051cbbd00 100644 --- a/tools/gst-play.c +++ b/tools/gst-play.c @@ -170,6 +170,11 @@ play_bus_msg (GstBus * bus, GstMessage * msg, gpointer user_data) switch (GST_MESSAGE_TYPE (msg)) { case GST_MESSAGE_ASYNC_DONE: + + /* dump graph on preroll */ + GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (play->playbin), + GST_DEBUG_GRAPH_SHOW_ALL, "gst-play.async-done"); + g_print ("Prerolled.\r"); if (play->missing != NULL && play_install_missing_plugins (play)) { g_print ("New plugins installed, trying again...\n"); @@ -238,6 +243,10 @@ play_bus_msg (GstBus * bus, GstMessage * msg, gpointer user_data) GError *err; gchar *dbg = NULL; + /* dump graph on warning */ + GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (play->playbin), + GST_DEBUG_GRAPH_SHOW_ALL, "gst-play.warning"); + gst_message_parse_warning (msg, &err, &dbg); g_printerr ("WARNING %s\n", err->message); if (dbg != NULL) @@ -250,6 +259,10 @@ play_bus_msg (GstBus * bus, GstMessage * msg, gpointer user_data) GError *err; gchar *dbg; + /* dump graph on error */ + GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (play->playbin), + GST_DEBUG_GRAPH_SHOW_ALL, "gst-play.error"); + gst_message_parse_error (msg, &err, &dbg); g_printerr ("ERROR %s for %s\n", err->message, play->uris[play->cur_idx]); if (dbg != NULL)