mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-07 16:05:47 +00:00
validate:scenario: Rename 'interlaced' action to 'non-blocking'
It is a better and more understandable naming. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/228>
This commit is contained in:
parent
062a4c27a4
commit
3da3e8825b
2 changed files with 55 additions and 25 deletions
|
@ -189,7 +189,7 @@ struct _GstValidateScenarioPrivate
|
||||||
GMutex lock;
|
GMutex lock;
|
||||||
|
|
||||||
GList *actions;
|
GList *actions;
|
||||||
GList *interlaced_actions; /* MT safe. Protected with SCENARIO_LOCK */
|
GList *non_blocking_running_actions; /* MT safe. Protected with SCENARIO_LOCK */
|
||||||
GList *on_addition_actions; /* MT safe. Protected with SCENARIO_LOCK */
|
GList *on_addition_actions; /* MT safe. Protected with SCENARIO_LOCK */
|
||||||
|
|
||||||
gboolean needs_playback_parsing;
|
gboolean needs_playback_parsing;
|
||||||
|
@ -445,8 +445,8 @@ gst_validate_action_return_get_name (GstValidateActionReturn r)
|
||||||
return "OK";
|
return "OK";
|
||||||
case GST_VALIDATE_EXECUTE_ACTION_ASYNC:
|
case GST_VALIDATE_EXECUTE_ACTION_ASYNC:
|
||||||
return "ASYNC";
|
return "ASYNC";
|
||||||
case GST_VALIDATE_EXECUTE_ACTION_INTERLACED:
|
case GST_VALIDATE_EXECUTE_ACTION_NON_BLOCKING:
|
||||||
return "INTERLACED";
|
return "NON-BLOCKING";
|
||||||
case GST_VALIDATE_EXECUTE_ACTION_ERROR_REPORTED:
|
case GST_VALIDATE_EXECUTE_ACTION_ERROR_REPORTED:
|
||||||
return "ERROR(reported)";
|
return "ERROR(reported)";
|
||||||
case GST_VALIDATE_EXECUTE_ACTION_IN_PROGRESS:
|
case GST_VALIDATE_EXECUTE_ACTION_IN_PROGRESS:
|
||||||
|
@ -780,7 +780,7 @@ _check_scenario_is_done (GstValidateScenario * scenario)
|
||||||
{
|
{
|
||||||
SCENARIO_LOCK (scenario);
|
SCENARIO_LOCK (scenario);
|
||||||
if (actions_list_is_done (scenario->priv->actions) &&
|
if (actions_list_is_done (scenario->priv->actions) &&
|
||||||
actions_list_is_done (scenario->priv->interlaced_actions) &&
|
actions_list_is_done (scenario->priv->non_blocking_running_actions) &&
|
||||||
actions_list_is_done (scenario->priv->on_addition_actions)) {
|
actions_list_is_done (scenario->priv->on_addition_actions)) {
|
||||||
SCENARIO_UNLOCK (scenario);
|
SCENARIO_UNLOCK (scenario);
|
||||||
|
|
||||||
|
@ -2032,7 +2032,7 @@ execute_switch_track_pb3 (GstValidateScenario * scenario,
|
||||||
res = GST_VALIDATE_EXECUTE_ACTION_ASYNC;
|
res = GST_VALIDATE_EXECUTE_ACTION_ASYNC;
|
||||||
} else {
|
} else {
|
||||||
gst_mini_object_ref ((GstMiniObject *) action);
|
gst_mini_object_ref ((GstMiniObject *) action);
|
||||||
res = GST_VALIDATE_EXECUTE_ACTION_INTERLACED;
|
res = GST_VALIDATE_EXECUTE_ACTION_NON_BLOCKING;
|
||||||
}
|
}
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
@ -2616,7 +2616,7 @@ execute_next_action_full (GstValidateScenario * scenario, GstMessage * message)
|
||||||
|
|
||||||
switch (act->priv->state) {
|
switch (act->priv->state) {
|
||||||
case GST_VALIDATE_EXECUTE_ACTION_NONE:
|
case GST_VALIDATE_EXECUTE_ACTION_NONE:
|
||||||
case GST_VALIDATE_EXECUTE_ACTION_INTERLACED:
|
case GST_VALIDATE_EXECUTE_ACTION_NON_BLOCKING:
|
||||||
break;
|
break;
|
||||||
case GST_VALIDATE_EXECUTE_ACTION_IN_PROGRESS:
|
case GST_VALIDATE_EXECUTE_ACTION_IN_PROGRESS:
|
||||||
return G_SOURCE_CONTINUE;
|
return G_SOURCE_CONTINUE;
|
||||||
|
@ -2684,9 +2684,10 @@ execute_next_action_full (GstValidateScenario * scenario, GstMessage * message)
|
||||||
return G_SOURCE_CONTINUE;
|
return G_SOURCE_CONTINUE;
|
||||||
case GST_VALIDATE_EXECUTE_ACTION_IN_PROGRESS:
|
case GST_VALIDATE_EXECUTE_ACTION_IN_PROGRESS:
|
||||||
return G_SOURCE_CONTINUE;
|
return G_SOURCE_CONTINUE;
|
||||||
case GST_VALIDATE_EXECUTE_ACTION_INTERLACED:
|
case GST_VALIDATE_EXECUTE_ACTION_NON_BLOCKING:
|
||||||
SCENARIO_LOCK (scenario);
|
SCENARIO_LOCK (scenario);
|
||||||
priv->interlaced_actions = g_list_append (priv->interlaced_actions, act);
|
priv->non_blocking_running_actions =
|
||||||
|
g_list_append (priv->non_blocking_running_actions, act);
|
||||||
priv->actions = g_list_remove (priv->actions, act);
|
priv->actions = g_list_remove (priv->actions, act);
|
||||||
SCENARIO_UNLOCK (scenario);
|
SCENARIO_UNLOCK (scenario);
|
||||||
return gst_validate_scenario_execute_next_or_restart_looping (scenario);
|
return gst_validate_scenario_execute_next_or_restart_looping (scenario);
|
||||||
|
@ -3425,7 +3426,7 @@ _execute_appsrc_push (GstValidateScenario * scenario,
|
||||||
} else {
|
} else {
|
||||||
gst_validate_printf (NULL,
|
gst_validate_printf (NULL,
|
||||||
"Pipeline is not ready to push buffers, interlacing appsrc-push action...\n");
|
"Pipeline is not ready to push buffers, interlacing appsrc-push action...\n");
|
||||||
res = GST_VALIDATE_EXECUTE_ACTION_INTERLACED;
|
res = GST_VALIDATE_EXECUTE_ACTION_NON_BLOCKING;
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
gst_clear_object (&target);
|
gst_clear_object (&target);
|
||||||
|
@ -4570,7 +4571,7 @@ gst_validate_scenario_finalize (GObject * object)
|
||||||
g_list_free_full (priv->sinks,
|
g_list_free_full (priv->sinks,
|
||||||
(GDestroyNotify) gst_validate_sink_information_free);
|
(GDestroyNotify) gst_validate_sink_information_free);
|
||||||
g_list_free_full (priv->actions, (GDestroyNotify) gst_mini_object_unref);
|
g_list_free_full (priv->actions, (GDestroyNotify) gst_mini_object_unref);
|
||||||
g_list_free_full (priv->interlaced_actions,
|
g_list_free_full (priv->non_blocking_running_actions,
|
||||||
(GDestroyNotify) gst_mini_object_unref);
|
(GDestroyNotify) gst_mini_object_unref);
|
||||||
g_list_free_full (priv->on_addition_actions,
|
g_list_free_full (priv->on_addition_actions,
|
||||||
(GDestroyNotify) gst_mini_object_unref);
|
(GDestroyNotify) gst_mini_object_unref);
|
||||||
|
@ -5635,13 +5636,13 @@ _execute_stop (GstValidateScenario * scenario, GstValidateAction * action)
|
||||||
g_source_remove (priv->execute_actions_source_id);
|
g_source_remove (priv->execute_actions_source_id);
|
||||||
priv->execute_actions_source_id = 0;
|
priv->execute_actions_source_id = 0;
|
||||||
}
|
}
|
||||||
if (scenario->priv->actions || scenario->priv->interlaced_actions ||
|
if (scenario->priv->actions || scenario->priv->non_blocking_running_actions ||
|
||||||
scenario->priv->on_addition_actions) {
|
scenario->priv->on_addition_actions) {
|
||||||
guint nb_actions = 0;
|
guint nb_actions = 0;
|
||||||
gchar *actions = g_strdup (""), *tmpconcat;
|
gchar *actions = g_strdup (""), *tmpconcat;
|
||||||
GList *tmp;
|
GList *tmp;
|
||||||
GList *all_actions = g_list_concat (g_list_concat (scenario->priv->actions,
|
GList *all_actions = g_list_concat (g_list_concat (scenario->priv->actions,
|
||||||
scenario->priv->interlaced_actions),
|
scenario->priv->non_blocking_running_actions),
|
||||||
scenario->priv->on_addition_actions);
|
scenario->priv->on_addition_actions);
|
||||||
|
|
||||||
for (tmp = all_actions; tmp; tmp = tmp->next) {
|
for (tmp = all_actions; tmp; tmp = tmp->next) {
|
||||||
|
@ -5674,7 +5675,7 @@ _execute_stop (GstValidateScenario * scenario, GstValidateAction * action)
|
||||||
}
|
}
|
||||||
g_list_free (all_actions);
|
g_list_free (all_actions);
|
||||||
scenario->priv->actions = NULL;
|
scenario->priv->actions = NULL;
|
||||||
scenario->priv->interlaced_actions = NULL;
|
scenario->priv->non_blocking_running_actions = NULL;
|
||||||
scenario->priv->on_addition_actions = NULL;
|
scenario->priv->on_addition_actions = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
@ -5754,7 +5755,7 @@ _action_set_done (GstValidateAction * action)
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GST_VALIDATE_EXECUTE_ACTION_INTERLACED:
|
case GST_VALIDATE_EXECUTE_ACTION_NON_BLOCKING:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5772,7 +5773,7 @@ _action_set_done (GstValidateAction * action)
|
||||||
GST_TIME_ARGS (action->priv->execution_duration));
|
GST_TIME_ARGS (action->priv->execution_duration));
|
||||||
g_free (repeat_message);
|
g_free (repeat_message);
|
||||||
|
|
||||||
if (action->priv->state != GST_VALIDATE_EXECUTE_ACTION_INTERLACED)
|
if (action->priv->state != GST_VALIDATE_EXECUTE_ACTION_NON_BLOCKING)
|
||||||
/* We took the 'scenario' reference... unreffing it now */
|
/* We took the 'scenario' reference... unreffing it now */
|
||||||
gst_validate_action_unref (action);
|
gst_validate_action_unref (action);
|
||||||
|
|
||||||
|
@ -5792,15 +5793,16 @@ void
|
||||||
gst_validate_action_set_done (GstValidateAction * action)
|
gst_validate_action_set_done (GstValidateAction * action)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (action->priv->state == GST_VALIDATE_EXECUTE_ACTION_INTERLACED) {
|
if (action->priv->state == GST_VALIDATE_EXECUTE_ACTION_NON_BLOCKING) {
|
||||||
GstValidateScenario *scenario = gst_validate_action_get_scenario (action);
|
GstValidateScenario *scenario = gst_validate_action_get_scenario (action);
|
||||||
GList *item = NULL;
|
GList *item = NULL;
|
||||||
|
|
||||||
if (scenario) {
|
if (scenario) {
|
||||||
SCENARIO_LOCK (scenario);
|
SCENARIO_LOCK (scenario);
|
||||||
item = g_list_find (scenario->priv->interlaced_actions, action);
|
item = g_list_find (scenario->priv->non_blocking_running_actions, action);
|
||||||
scenario->priv->interlaced_actions =
|
scenario->priv->non_blocking_running_actions =
|
||||||
g_list_delete_link (scenario->priv->interlaced_actions, item);
|
g_list_delete_link (scenario->priv->non_blocking_running_actions,
|
||||||
|
item);
|
||||||
SCENARIO_UNLOCK (scenario);
|
SCENARIO_UNLOCK (scenario);
|
||||||
g_object_unref (scenario);
|
g_object_unref (scenario);
|
||||||
}
|
}
|
||||||
|
@ -6837,7 +6839,7 @@ register_action_types (void)
|
||||||
" This allows checking the checksum of a buffer after a 'seek' or after a"
|
" This allows checking the checksum of a buffer after a 'seek' or after a"
|
||||||
" GESTimeline 'commit'"
|
" GESTimeline 'commit'"
|
||||||
" for example",
|
" for example",
|
||||||
GST_VALIDATE_ACTION_TYPE_INTERLACED);
|
GST_VALIDATE_ACTION_TYPE_NON_BLOCKING);
|
||||||
|
|
||||||
REGISTER_ACTION_TYPE ("crank-clock", _execute_crank_clock,
|
REGISTER_ACTION_TYPE ("crank-clock", _execute_crank_clock,
|
||||||
((GstValidateActionParameter []) {
|
((GstValidateActionParameter []) {
|
||||||
|
|
|
@ -47,7 +47,6 @@ typedef struct _GstValidateActionParameter GstValidateActionParameter;
|
||||||
* GST_VALIDATE_EXECUTE_ACTION_ERROR:
|
* GST_VALIDATE_EXECUTE_ACTION_ERROR:
|
||||||
* GST_VALIDATE_EXECUTE_ACTION_OK:
|
* GST_VALIDATE_EXECUTE_ACTION_OK:
|
||||||
* GST_VALIDATE_EXECUTE_ACTION_ASYNC:
|
* GST_VALIDATE_EXECUTE_ACTION_ASYNC:
|
||||||
* GST_VALIDATE_EXECUTE_ACTION_INTERLACED:
|
|
||||||
* GST_VALIDATE_EXECUTE_ACTION_ERROR_REPORTED:
|
* GST_VALIDATE_EXECUTE_ACTION_ERROR_REPORTED:
|
||||||
* GST_VALIDATE_EXECUTE_ACTION_IN_PROGRESS:
|
* GST_VALIDATE_EXECUTE_ACTION_IN_PROGRESS:
|
||||||
* GST_VALIDATE_EXECUTE_ACTION_NONE:
|
* GST_VALIDATE_EXECUTE_ACTION_NONE:
|
||||||
|
@ -58,7 +57,23 @@ typedef enum
|
||||||
GST_VALIDATE_EXECUTE_ACTION_ERROR,
|
GST_VALIDATE_EXECUTE_ACTION_ERROR,
|
||||||
GST_VALIDATE_EXECUTE_ACTION_OK,
|
GST_VALIDATE_EXECUTE_ACTION_OK,
|
||||||
GST_VALIDATE_EXECUTE_ACTION_ASYNC,
|
GST_VALIDATE_EXECUTE_ACTION_ASYNC,
|
||||||
GST_VALIDATE_EXECUTE_ACTION_INTERLACED,
|
|
||||||
|
/**
|
||||||
|
* GST_VALIDATE_EXECUTE_ACTION_NON_BLOCKING:
|
||||||
|
*
|
||||||
|
* The action will be executed asynchronously without blocking further
|
||||||
|
* actions to be executed
|
||||||
|
*
|
||||||
|
* Since: 1.20
|
||||||
|
*/
|
||||||
|
GST_VALIDATE_EXECUTE_ACTION_NON_BLOCKING,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GST_VALIDATE_EXECUTE_ACTION_INTERLACED:
|
||||||
|
*
|
||||||
|
* Deprecated: 1.20: Use #GST_VALIDATE_EXECUTE_ACTION_NON_BLOCKING instead.
|
||||||
|
*/
|
||||||
|
GST_VALIDATE_EXECUTE_ACTION_INTERLACED = GST_VALIDATE_EXECUTE_ACTION_NON_BLOCKING,
|
||||||
GST_VALIDATE_EXECUTE_ACTION_ERROR_REPORTED,
|
GST_VALIDATE_EXECUTE_ACTION_ERROR_REPORTED,
|
||||||
GST_VALIDATE_EXECUTE_ACTION_IN_PROGRESS,
|
GST_VALIDATE_EXECUTE_ACTION_IN_PROGRESS,
|
||||||
GST_VALIDATE_EXECUTE_ACTION_NONE,
|
GST_VALIDATE_EXECUTE_ACTION_NONE,
|
||||||
|
@ -175,9 +190,6 @@ GType gst_validate_action_get_type (void);
|
||||||
* @GST_VALIDATE_ACTION_TYPE_NONE: No special flag
|
* @GST_VALIDATE_ACTION_TYPE_NONE: No special flag
|
||||||
* @GST_VALIDATE_ACTION_TYPE_CONFIG: The action is a config
|
* @GST_VALIDATE_ACTION_TYPE_CONFIG: The action is a config
|
||||||
* @GST_VALIDATE_ACTION_TYPE_ASYNC: The action can be executed ASYNC
|
* @GST_VALIDATE_ACTION_TYPE_ASYNC: The action can be executed ASYNC
|
||||||
* @GST_VALIDATE_ACTION_TYPE_INTERLACED: The action will be executed async
|
|
||||||
* but without blocking further actions
|
|
||||||
* to be executed
|
|
||||||
* @GST_VALIDATE_ACTION_TYPE_CAN_EXECUTE_ON_ADDITION: The action will be executed on 'element-added'
|
* @GST_VALIDATE_ACTION_TYPE_CAN_EXECUTE_ON_ADDITION: The action will be executed on 'element-added'
|
||||||
* for a particular element type if no playback-time
|
* for a particular element type if no playback-time
|
||||||
* is specified
|
* is specified
|
||||||
|
@ -196,7 +208,23 @@ typedef enum
|
||||||
GST_VALIDATE_ACTION_TYPE_NONE = 0,
|
GST_VALIDATE_ACTION_TYPE_NONE = 0,
|
||||||
GST_VALIDATE_ACTION_TYPE_CONFIG = 1 << 1,
|
GST_VALIDATE_ACTION_TYPE_CONFIG = 1 << 1,
|
||||||
GST_VALIDATE_ACTION_TYPE_ASYNC = 1 << 2,
|
GST_VALIDATE_ACTION_TYPE_ASYNC = 1 << 2,
|
||||||
|
GST_VALIDATE_ACTION_TYPE_NON_BLOCKING = 1 << 3,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GST_VALIDATE_ACTION_TYPE_INTERLACED:
|
||||||
|
*
|
||||||
|
* Deprecated: 1.20: Use #GST_VALIDATE_ACTION_TYPE_NON_BLOCKING instead.
|
||||||
|
*/
|
||||||
GST_VALIDATE_ACTION_TYPE_INTERLACED = 1 << 3,
|
GST_VALIDATE_ACTION_TYPE_INTERLACED = 1 << 3,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GST_VALIDATE_ACTION_TYPE_NON_BLOCKING:
|
||||||
|
*
|
||||||
|
* The action can be executed asynchronously but without blocking further
|
||||||
|
* actions execution.
|
||||||
|
*
|
||||||
|
* Since: 1.20
|
||||||
|
*/
|
||||||
GST_VALIDATE_ACTION_TYPE_CAN_EXECUTE_ON_ADDITION = 1 << 4,
|
GST_VALIDATE_ACTION_TYPE_CAN_EXECUTE_ON_ADDITION = 1 << 4,
|
||||||
GST_VALIDATE_ACTION_TYPE_NEEDS_CLOCK = 1 << 5,
|
GST_VALIDATE_ACTION_TYPE_NEEDS_CLOCK = 1 << 5,
|
||||||
GST_VALIDATE_ACTION_TYPE_NO_EXECUTION_NOT_FATAL = 1 << 6,
|
GST_VALIDATE_ACTION_TYPE_NO_EXECUTION_NOT_FATAL = 1 << 6,
|
||||||
|
|
Loading…
Reference in a new issue