mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-26 18:20:44 +00:00
validate: Ignore EOS actions that can not be executed
This commit is contained in:
parent
68cbc15f35
commit
2f44d15e0b
1 changed files with 9 additions and 2 deletions
|
@ -721,19 +721,26 @@ message_cb (GstBus * bus, GstMessage * message, GstValidateScenario * scenario)
|
||||||
{
|
{
|
||||||
if (scenario->priv->actions) {
|
if (scenario->priv->actions) {
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
|
guint nb_actions = 0;
|
||||||
gchar *actions = g_strdup (""), *tmpconcat;
|
gchar *actions = g_strdup (""), *tmpconcat;
|
||||||
|
|
||||||
for (tmp = scenario->priv->actions; tmp; tmp = tmp->next) {
|
for (tmp = scenario->priv->actions; tmp; tmp = tmp->next) {
|
||||||
GstValidateAction *action = ((GstValidateAction *) tmp->data);
|
GstValidateAction *action = ((GstValidateAction *) tmp->data);
|
||||||
tmpconcat = actions;
|
tmpconcat = actions;
|
||||||
|
|
||||||
|
if (g_strcmp0 (action->name, "eos"))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
nb_actions++;
|
||||||
actions = g_strdup_printf ("%s\n%*s%s",
|
actions = g_strdup_printf ("%s\n%*s%s",
|
||||||
actions, 20, "", gst_structure_to_string (action->structure));
|
actions, 20, "", gst_structure_to_string (action->structure));
|
||||||
g_free (tmpconcat);
|
g_free (tmpconcat);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (nb_actions > 0)
|
||||||
GST_VALIDATE_REPORT (scenario, SCENARIO_NOT_ENDED,
|
GST_VALIDATE_REPORT (scenario, SCENARIO_NOT_ENDED,
|
||||||
"The following action were not executed: %s", actions);
|
"%i actions were not executed: %s", nb_actions, actions);
|
||||||
g_free (actions);
|
g_free (actions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue