mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-22 17:51:16 +00:00
validate: Add a way to force monitoring all pipelines in a .validatetest file
See documentation for more details Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7700>
This commit is contained in:
parent
302797a965
commit
56000b91b7
3 changed files with 28 additions and 1 deletions
|
@ -56,6 +56,7 @@ G_GNUC_INTERNAL gchar** gst_validate_scenario_get_include_paths(const gchar* rel
|
||||||
G_GNUC_INTERNAL void _priv_validate_override_registry_deinit(void);
|
G_GNUC_INTERNAL void _priv_validate_override_registry_deinit(void);
|
||||||
|
|
||||||
G_GNUC_INTERNAL GstValidateReportingDetails gst_validate_runner_get_default_reporting_details (GstValidateRunner *runner);
|
G_GNUC_INTERNAL GstValidateReportingDetails gst_validate_runner_get_default_reporting_details (GstValidateRunner *runner);
|
||||||
|
G_GNUC_INTERNAL void gst_validate_runner_set_monitor_all_pipelines (GstValidateRunner *runner, gboolean monitor_all_pipelines);
|
||||||
|
|
||||||
#define GST_VALIDATE_VALIDATE_TEST_SUFFIX ".validatetest"
|
#define GST_VALIDATE_VALIDATE_TEST_SUFFIX ".validatetest"
|
||||||
G_GNUC_INTERNAL GstValidateMonitor * gst_validate_get_monitor (GObject *object);
|
G_GNUC_INTERNAL GstValidateMonitor * gst_validate_get_monitor (GObject *object);
|
||||||
|
|
|
@ -96,6 +96,8 @@ struct _GstValidateRunnerPrivate
|
||||||
gchar **pipeline_names_strv;
|
gchar **pipeline_names_strv;
|
||||||
|
|
||||||
GList *expected_issues;
|
GList *expected_issues;
|
||||||
|
|
||||||
|
gboolean monitor_all_pipelines;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Describes the reporting level to apply to a name pattern */
|
/* Describes the reporting level to apply to a name pattern */
|
||||||
|
@ -154,6 +156,10 @@ gst_validate_runner_should_monitor (GstValidateRunner * self,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (self->priv->monitor_all_pipelines) {
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
if (self->priv->user_created)
|
if (self->priv->user_created)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
@ -975,6 +981,15 @@ gst_validate_runner_get_default_reporting_details (GstValidateRunner * runner)
|
||||||
return runner->priv->default_level;
|
return runner->priv->default_level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
gst_validate_runner_set_monitor_all_pipelines (GstValidateRunner * runner,
|
||||||
|
gboolean monitor_all_pipelines)
|
||||||
|
{
|
||||||
|
g_return_if_fail (GST_IS_VALIDATE_RUNNER (runner));
|
||||||
|
|
||||||
|
runner->priv->monitor_all_pipelines = monitor_all_pipelines;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __GST_VALIDATE_PLUGIN
|
#ifdef __GST_VALIDATE_PLUGIN
|
||||||
static gboolean
|
static gboolean
|
||||||
plugin_init (GstPlugin * plugin)
|
plugin_init (GstPlugin * plugin)
|
||||||
|
|
|
@ -194,7 +194,6 @@ typedef struct
|
||||||
struct _GstValidateScenarioPrivate
|
struct _GstValidateScenarioPrivate
|
||||||
{
|
{
|
||||||
GstBus *bus;
|
GstBus *bus;
|
||||||
GstValidateRunner *runner;
|
|
||||||
gboolean execute_on_idle;
|
gboolean execute_on_idle;
|
||||||
|
|
||||||
GMutex lock;
|
GMutex lock;
|
||||||
|
@ -5490,6 +5489,18 @@ gst_validate_scenario_load_structures (GstValidateScenario * scenario,
|
||||||
&priv->max_latency);
|
&priv->max_latency);
|
||||||
|
|
||||||
gst_structure_get_int (structure, "max-dropped", &priv->max_dropped);
|
gst_structure_get_int (structure, "max-dropped", &priv->max_dropped);
|
||||||
|
gboolean monitor_all_pipelines = FALSE;
|
||||||
|
if (gst_structure_get_boolean (structure, "monitor-all-pipelines",
|
||||||
|
&monitor_all_pipelines) && monitor_all_pipelines) {
|
||||||
|
GstValidateRunner *runner =
|
||||||
|
gst_validate_reporter_get_runner (GST_VALIDATE_REPORTER (scenario));
|
||||||
|
|
||||||
|
g_assert (runner);
|
||||||
|
gst_validate_runner_set_monitor_all_pipelines (runner, TRUE);
|
||||||
|
gst_object_unref (runner);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
scenario->description = gst_structure_copy (structure);
|
scenario->description = gst_structure_copy (structure);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue