mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-11 02:46:33 +00:00
validate:scenario: Alway execute a 'quit' action on EOS
Summary: Making scenario more usable with LD_PRELOAD Reviewers: Mathieu_Du Differential Revision: http://phabricator.freedesktop.org/D72
This commit is contained in:
parent
460bf61345
commit
1e6b188d78
1 changed files with 9 additions and 0 deletions
|
@ -1711,6 +1711,9 @@ message_cb (GstBus * bus, GstMessage * message, GstValidateScenario * scenario)
|
||||||
case GST_MESSAGE_ERROR:
|
case GST_MESSAGE_ERROR:
|
||||||
case GST_MESSAGE_EOS:
|
case GST_MESSAGE_EOS:
|
||||||
{
|
{
|
||||||
|
GstValidateAction *stop_action;
|
||||||
|
GstValidateActionType *stop_action_type;
|
||||||
|
|
||||||
SCENARIO_LOCK (scenario);
|
SCENARIO_LOCK (scenario);
|
||||||
if (scenario->priv->actions || scenario->priv->interlaced_actions ||
|
if (scenario->priv->actions || scenario->priv->interlaced_actions ||
|
||||||
scenario->priv->on_addition_actions) {
|
scenario->priv->on_addition_actions) {
|
||||||
|
@ -1755,6 +1758,12 @@ message_cb (GstBus * bus, GstMessage * message, GstValidateScenario * scenario)
|
||||||
}
|
}
|
||||||
SCENARIO_UNLOCK (scenario);
|
SCENARIO_UNLOCK (scenario);
|
||||||
|
|
||||||
|
stop_action_type = _find_action_type ("stop");
|
||||||
|
stop_action = gst_validate_action_new (scenario, stop_action_type);
|
||||||
|
_fill_action (scenario, stop_action,
|
||||||
|
gst_structure_from_string ("stop;", NULL), FALSE);
|
||||||
|
gst_validate_execute_action (stop_action_type, stop_action);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case GST_MESSAGE_BUFFERING:
|
case GST_MESSAGE_BUFFERING:
|
||||||
|
|
Loading…
Reference in a new issue