mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 23:14:46 +00:00
validate:scenario: Do not execute last sub action twice when ASYNC
This commit is contained in:
parent
7888293f8f
commit
34394b0c7a
2 changed files with 12 additions and 0 deletions
|
@ -511,6 +511,9 @@ _append_value (GQuark field_id, const GValue * value, GString * string)
|
||||||
{
|
{
|
||||||
gchar *val_str = NULL;
|
gchar *val_str = NULL;
|
||||||
|
|
||||||
|
if (g_strcmp0 (g_quark_to_string (field_id), "sub-action") == 0)
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
if (G_VALUE_TYPE (value) == GST_TYPE_CLOCK_TIME)
|
if (G_VALUE_TYPE (value) == GST_TYPE_CLOCK_TIME)
|
||||||
val_str = g_strdup_printf ("%" GST_TIME_FORMAT,
|
val_str = g_strdup_printf ("%" GST_TIME_FORMAT,
|
||||||
GST_TIME_ARGS (g_value_get_uint64 (value)));
|
GST_TIME_ARGS (g_value_get_uint64 (value)));
|
||||||
|
|
|
@ -173,6 +173,7 @@ struct _GstValidateActionPrivate
|
||||||
GstStructure *main_structure;
|
GstStructure *main_structure;
|
||||||
GstValidateExecuteActionReturn state; /* Actually ActionState */
|
GstValidateExecuteActionReturn state; /* Actually ActionState */
|
||||||
gboolean printed;
|
gboolean printed;
|
||||||
|
gboolean executing_last_subaction;
|
||||||
};
|
};
|
||||||
|
|
||||||
GST_DEFINE_MINI_OBJECT_TYPE (GstValidateAction, gst_validate_action);
|
GST_DEFINE_MINI_OBJECT_TYPE (GstValidateAction, gst_validate_action);
|
||||||
|
@ -1005,6 +1006,9 @@ gst_validate_execute_action (GstValidateActionType * action_type,
|
||||||
|
|
||||||
action->priv->printed = FALSE;
|
action->priv->printed = FALSE;
|
||||||
action->structure = gst_structure_copy (action->priv->main_structure);
|
action->structure = gst_structure_copy (action->priv->main_structure);
|
||||||
|
|
||||||
|
if (res == GST_VALIDATE_EXECUTE_ACTION_ASYNC)
|
||||||
|
action->priv->executing_last_subaction = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
|
@ -2316,6 +2320,11 @@ _execute_sub_action_action (GstValidateAction * action)
|
||||||
const gchar *subaction_str;
|
const gchar *subaction_str;
|
||||||
GstStructure *subaction_struct = NULL;
|
GstStructure *subaction_struct = NULL;
|
||||||
|
|
||||||
|
if (action->priv->executing_last_subaction) {
|
||||||
|
action->priv->executing_last_subaction = FALSE;
|
||||||
|
|
||||||
|
return GST_VALIDATE_EXECUTE_ACTION_OK;
|
||||||
|
}
|
||||||
subaction_str = gst_structure_get_string (action->structure, "sub-action");
|
subaction_str = gst_structure_get_string (action->structure, "sub-action");
|
||||||
if (subaction_str) {
|
if (subaction_str) {
|
||||||
subaction_struct = gst_structure_from_string (subaction_str, NULL);
|
subaction_struct = gst_structure_from_string (subaction_str, NULL);
|
||||||
|
|
Loading…
Reference in a new issue