mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 00:58:12 +00:00
validate: Dump pipeline for each state change
Ala gst-launch
This commit is contained in:
parent
beb537d10b
commit
5953b71907
1 changed files with 10 additions and 0 deletions
|
@ -86,6 +86,9 @@ print_position (void)
|
||||||
" speed: %f />\r", GST_TIME_ARGS (position), GST_TIME_ARGS (duration),
|
" speed: %f />\r", GST_TIME_ARGS (position), GST_TIME_ARGS (duration),
|
||||||
rate);
|
rate);
|
||||||
|
|
||||||
|
GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline),
|
||||||
|
GST_DEBUG_GRAPH_SHOW_ALL, "position");
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,6 +100,7 @@ bus_callback (GstBus * bus, GstMessage * message, gpointer data)
|
||||||
case GST_MESSAGE_STATE_CHANGED:
|
case GST_MESSAGE_STATE_CHANGED:
|
||||||
{
|
{
|
||||||
if (GST_MESSAGE_SRC (message) == GST_OBJECT_CAST (pipeline)) {
|
if (GST_MESSAGE_SRC (message) == GST_OBJECT_CAST (pipeline)) {
|
||||||
|
gchar *dotname;
|
||||||
GstState old, new, pending;
|
GstState old, new, pending;
|
||||||
|
|
||||||
gst_message_parse_state_changed (message, &old, &new, &pending);
|
gst_message_parse_state_changed (message, &old, &new, &pending);
|
||||||
|
@ -106,6 +110,12 @@ bus_callback (GstBus * bus, GstMessage * message, gpointer data)
|
||||||
GST_DEBUG_GRAPH_SHOW_ALL, "gst-validate-transcode.playing");
|
GST_DEBUG_GRAPH_SHOW_ALL, "gst-validate-transcode.playing");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dotname = g_strdup_printf ("gst-validate-transcoding.%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, dotname);
|
||||||
|
g_free (dotname);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue