mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
examples: sprinkle GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS in seek test utility
https://bugzilla.gnome.org/show_bug.cgi?id=630497
This commit is contained in:
parent
d7fc45f42e
commit
c6c6c2e75e
1 changed files with 26 additions and 0 deletions
|
@ -2131,6 +2131,19 @@ message_received (GstBus * bus, GstMessage * message, GstPipeline * pipeline)
|
|||
{
|
||||
const GstStructure *s;
|
||||
|
||||
switch (GST_MESSAGE_TYPE (message)) {
|
||||
case GST_MESSAGE_ERROR:
|
||||
GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline),
|
||||
GST_DEBUG_GRAPH_SHOW_ALL, "seek.error");
|
||||
break;
|
||||
case GST_MESSAGE_WARNING:
|
||||
GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline),
|
||||
GST_DEBUG_GRAPH_SHOW_ALL, "seek.warning");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
s = gst_message_get_structure (message);
|
||||
g_print ("message from \"%s\" (%s): ",
|
||||
GST_STR_NULL (GST_ELEMENT_NAME (GST_MESSAGE_SRC (message))),
|
||||
|
@ -2311,6 +2324,19 @@ msg_state_changed (GstBus * bus, GstMessage * message, GstPipeline * pipeline)
|
|||
} else {
|
||||
set_update_scale (FALSE);
|
||||
}
|
||||
|
||||
/* dump graph for (some) pipeline state changes */
|
||||
{
|
||||
gchar *dump_name;
|
||||
|
||||
dump_name = g_strdup_printf ("seek.%s_%s",
|
||||
gst_element_state_get_name (old), gst_element_state_get_name (new));
|
||||
|
||||
GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline),
|
||||
GST_DEBUG_GRAPH_SHOW_ALL, dump_name);
|
||||
|
||||
g_free (dump_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue