mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-01 22:21:13 +00:00
validate-scenario: Avoid timeouts on EOS
If there is an EOS and the next action is waiting for a playback time, execute it since we are guaranteed the position won't change anymore. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3403>
This commit is contained in:
parent
b09b246fc8
commit
0c59e3ce2a
3 changed files with 18 additions and 0 deletions
|
@ -534,6 +534,8 @@ gst_validate_report_load_issues (void)
|
||||||
GST_VALIDATE_ISSUE_FLAGS_FULL_DETAILS);
|
GST_VALIDATE_ISSUE_FLAGS_FULL_DETAILS);
|
||||||
REGISTER_VALIDATE_ISSUE (ISSUE, SCENARIO_ACTION_EXECUTION_ISSUE,
|
REGISTER_VALIDATE_ISSUE (ISSUE, SCENARIO_ACTION_EXECUTION_ISSUE,
|
||||||
"An issue happened during the execution of a scenario", NULL);
|
"An issue happened during the execution of a scenario", NULL);
|
||||||
|
REGISTER_VALIDATE_ISSUE (WARNING, SCENARIO_ACTION_ENDED_EARLY,
|
||||||
|
"Got EOS before an action playback time", NULL);
|
||||||
REGISTER_VALIDATE_ISSUE (CRITICAL, CONFIG_LATENCY_TOO_HIGH,
|
REGISTER_VALIDATE_ISSUE (CRITICAL, CONFIG_LATENCY_TOO_HIGH,
|
||||||
"The pipeline latency is higher than the maximum allowed by the scenario",
|
"The pipeline latency is higher than the maximum allowed by the scenario",
|
||||||
NULL);
|
NULL);
|
||||||
|
|
|
@ -138,6 +138,12 @@ typedef enum {
|
||||||
#define SCENARIO_ACTION_CHECK_ERROR _QUARK("scenario::check-error")
|
#define SCENARIO_ACTION_CHECK_ERROR _QUARK("scenario::check-error")
|
||||||
#define SCENARIO_ACTION_TIMEOUT _QUARK("scenario::action-timeout")
|
#define SCENARIO_ACTION_TIMEOUT _QUARK("scenario::action-timeout")
|
||||||
#define SCENARIO_ACTION_EXECUTION_ISSUE _QUARK("scenario::execution-issue")
|
#define SCENARIO_ACTION_EXECUTION_ISSUE _QUARK("scenario::execution-issue")
|
||||||
|
/**
|
||||||
|
* SCENARIO_ACTION_ENDED_EARLY:
|
||||||
|
*
|
||||||
|
* Since: 1.22
|
||||||
|
*/
|
||||||
|
#define SCENARIO_ACTION_ENDED_EARLY _QUARK("scenario::action-ended-early")
|
||||||
|
|
||||||
#define CONFIG_LATENCY_TOO_HIGH _QUARK("config::latency-too-high")
|
#define CONFIG_LATENCY_TOO_HIGH _QUARK("config::latency-too-high")
|
||||||
#define CONFIG_TOO_MANY_BUFFERS_DROPPED _QUARK("config::too-many-buffers-dropped")
|
#define CONFIG_TOO_MANY_BUFFERS_DROPPED _QUARK("config::too-many-buffers-dropped")
|
||||||
|
|
|
@ -2688,6 +2688,15 @@ execute_next_action_full (GstValidateScenario * scenario, GstMessage * message)
|
||||||
return G_SOURCE_CONTINUE;
|
return G_SOURCE_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (message && GST_MESSAGE_TYPE (message) == GST_MESSAGE_EOS
|
||||||
|
&& act->playback_time != GST_CLOCK_TIME_NONE) {
|
||||||
|
GST_VALIDATE_REPORT_ACTION (scenario, act,
|
||||||
|
SCENARIO_ACTION_ENDED_EARLY,
|
||||||
|
"Got EOS before action playback time %" GST_TIME_FORMAT,
|
||||||
|
GST_TIME_ARGS (act->playback_time));
|
||||||
|
goto execute_action;
|
||||||
|
}
|
||||||
|
|
||||||
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_NON_BLOCKING:
|
case GST_VALIDATE_EXECUTE_ACTION_NON_BLOCKING:
|
||||||
|
@ -2734,6 +2743,7 @@ execute_next_action_full (GstValidateScenario * scenario, GstMessage * message)
|
||||||
return G_SOURCE_CONTINUE;
|
return G_SOURCE_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
execute_action:
|
||||||
type = _find_action_type (act->type);
|
type = _find_action_type (act->type);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (scenario, "Executing %" GST_PTR_FORMAT
|
GST_DEBUG_OBJECT (scenario, "Executing %" GST_PTR_FORMAT
|
||||||
|
|
Loading…
Reference in a new issue