mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-11 16:55:23 +00:00
validate: No execute ON_ADDITION if a previous action has a playback-time
As this is what user will expect in this case. For example with this scenario: set-state, state=null; playback-time=5 set-property, target-element-name=dvbsrc0, property-name=delsys, property-value=11 play;
This commit is contained in:
parent
99f9f3f408
commit
9f272556d5
1 changed files with 20 additions and 2 deletions
|
@ -1284,9 +1284,27 @@ _fill_action (GstValidateScenario * scenario, GstValidateAction * action,
|
||||||
|
|
||||||
if (str_playback_time == NULL) {
|
if (str_playback_time == NULL) {
|
||||||
GstValidateActionType *type = _find_action_type (action->type);
|
GstValidateActionType *type = _find_action_type (action->type);
|
||||||
|
gboolean can_execute_on_addition =
|
||||||
|
type->flags & GST_VALIDATE_ACTION_TYPE_CAN_EXECUTE_ON_ADDITION
|
||||||
|
&& !GST_CLOCK_TIME_IS_VALID (action->playback_time);
|
||||||
|
|
||||||
if (type->flags & GST_VALIDATE_ACTION_TYPE_CAN_EXECUTE_ON_ADDITION
|
if (priv->needs_parsing)
|
||||||
&& !GST_CLOCK_TIME_IS_VALID (action->playback_time)) {
|
can_execute_on_addition = FALSE;
|
||||||
|
|
||||||
|
if (can_execute_on_addition) {
|
||||||
|
GList *tmp;
|
||||||
|
|
||||||
|
for (tmp = priv->actions; tmp; tmp = tmp->next) {
|
||||||
|
if (GST_CLOCK_TIME_IS_VALID (((GstValidateAction *) tmp->
|
||||||
|
data)->playback_time)) {
|
||||||
|
can_execute_on_addition = FALSE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if (can_execute_on_addition) {
|
||||||
SCENARIO_LOCK (scenario);
|
SCENARIO_LOCK (scenario);
|
||||||
priv->on_addition_actions = g_list_append (priv->on_addition_actions,
|
priv->on_addition_actions = g_list_append (priv->on_addition_actions,
|
||||||
action);
|
action);
|
||||||
|
|
Loading…
Reference in a new issue