mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
validate: Make extracheck and flow part of core instead plugins
It makes things more complex and doesn't bring anything! Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/204>
This commit is contained in:
parent
2dd165b4ec
commit
88fcc580be
11 changed files with 26 additions and 39 deletions
|
@ -28,9 +28,10 @@
|
|||
#endif
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include "../../gst/validate/validate.h"
|
||||
#include "../../gst/validate/gst-validate-utils.h"
|
||||
#include "../../gst/validate/gst-validate-report.h"
|
||||
#include "../validate.h"
|
||||
#include "../gst-validate-utils.h"
|
||||
#include "../gst-validate-report.h"
|
||||
#include "../gst-validate-internal.h"
|
||||
#include "formatting.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
@ -644,12 +645,12 @@ _execute_checkpoint (GstValidateScenario * scenario, GstValidateAction * action)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_validate_flow_init (GstPlugin * plugin)
|
||||
gboolean
|
||||
gst_validate_flow_init ()
|
||||
{
|
||||
GList *tmp;
|
||||
gint default_generate = -1;
|
||||
GList *config_list = gst_validate_plugin_get_config (plugin);
|
||||
GList *config_list = gst_validate_get_config ("validateflow");
|
||||
|
||||
if (!config_list)
|
||||
return TRUE;
|
||||
|
@ -672,13 +673,14 @@ gst_validate_flow_init (GstPlugin * plugin)
|
|||
flow = validate_flow_override_new (config);
|
||||
all_overrides = g_list_append (all_overrides, flow);
|
||||
}
|
||||
g_list_free (config_list);
|
||||
|
||||
for (tmp = all_overrides; tmp; tmp = tmp->next)
|
||||
validate_flow_setup_files (tmp->data, default_generate);
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
gst_validate_register_action_type_dynamic (plugin, "checkpoint",
|
||||
GST_RANK_PRIMARY, _execute_checkpoint, ((GstValidateActionParameter [])
|
||||
gst_validate_register_action_type ("checkpoint", "validateflow",
|
||||
_execute_checkpoint, ((GstValidateActionParameter [])
|
||||
{
|
||||
{
|
||||
.name = "text",
|
||||
|
@ -694,10 +696,3 @@ gst_validate_flow_init (GstPlugin * plugin)
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
validateflow,
|
||||
"GstValidate plugin that records buffers and events on specified pads and matches the log with expectation files.",
|
||||
gst_validate_flow_init, VERSION, "LGPL", GST_PACKAGE_NAME,
|
||||
GST_PACKAGE_ORIGIN)
|
|
@ -1,6 +1,7 @@
|
|||
#include <gst/gst.h>
|
||||
#include "../../gst/validate/validate.h"
|
||||
#include "../../gst/validate/gst-validate-utils.h"
|
||||
#include "validate.h"
|
||||
#include "gst-validate-utils.h"
|
||||
#include "gst-validate-internal.h"
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
|
@ -135,11 +136,11 @@ gst_validate_add_num_instances_check (GstStructure * structure)
|
|||
gst_object_unref (o);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_validate_extra_checks_init (GstPlugin * plugin)
|
||||
gboolean
|
||||
gst_validate_extra_checks_init ()
|
||||
{
|
||||
GList *config, *tmp;
|
||||
config = gst_validate_plugin_get_config (plugin);
|
||||
config = gst_validate_get_config ("extrachecks");
|
||||
|
||||
if (!config)
|
||||
return TRUE;
|
||||
|
@ -150,6 +151,7 @@ gst_validate_extra_checks_init (GstPlugin * plugin)
|
|||
if (gst_structure_has_field (check, "num-instances"))
|
||||
gst_validate_add_num_instances_check (check);
|
||||
}
|
||||
g_list_free (config);
|
||||
|
||||
gst_validate_issue_register (gst_validate_issue_new
|
||||
(EXTRA_CHECKS_WRONG_NUMBER_OF_INSTANCES,
|
||||
|
@ -162,10 +164,3 @@ gst_validate_extra_checks_init (GstPlugin * plugin)
|
|||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
|
||||
GST_VERSION_MINOR,
|
||||
extrachecks,
|
||||
"GstValidate plugin that implements extra, configurable tests.",
|
||||
gst_validate_extra_checks_init, VERSION, "LGPL", GST_PACKAGE_NAME,
|
||||
GST_PACKAGE_ORIGIN)
|
|
@ -65,6 +65,9 @@ G_GNUC_INTERNAL void gst_validate_set_test_file_globals (GstStructure* meta, con
|
|||
G_GNUC_INTERNAL gboolean gst_validate_get_test_file_scenario (GList** structs, const gchar** scenario_name, gchar** original_name);
|
||||
G_GNUC_INTERNAL GstValidateScenario* gst_validate_scenario_from_structs (GstValidateRunner* runner, GstElement* pipeline, GList* structures,
|
||||
gchar* origin_file);
|
||||
G_GNUC_INTERNAL GList* gst_validate_get_config(const gchar *structname);
|
||||
G_GNUC_INTERNAL GList* gst_validate_get_config (const gchar *structname);
|
||||
G_GNUC_INTERNAL GList * gst_validate_get_test_file_expected_issues (void);
|
||||
|
||||
G_GNUC_INTERNAL gboolean gst_validate_extra_checks_init (void);
|
||||
G_GNUC_INTERNAL gboolean gst_validate_flow_init (void);
|
||||
#endif
|
||||
|
|
|
@ -17,6 +17,9 @@ gstvalidate_sources = [
|
|||
'media-descriptor-writer.c',
|
||||
'media-descriptor-parser.c',
|
||||
'gst-validate-media-info.c',
|
||||
'gst-validate-extra-checks.c',
|
||||
'flow/gstvalidateflow.c',
|
||||
'flow/formatting.c',
|
||||
'validate.c',
|
||||
]
|
||||
|
||||
|
|
|
@ -449,6 +449,8 @@ gst_validate_init (void)
|
|||
|
||||
validate_initialized = TRUE;
|
||||
|
||||
gst_validate_extra_checks_init ();
|
||||
gst_validate_flow_init ();
|
||||
gst_validate_init_plugins ();
|
||||
gst_validate_init_runner ();
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
shared_library('gstextrachecks',
|
||||
'gstvalidateextrachecks.c',
|
||||
include_directories : inc_dirs,
|
||||
c_args: ['-DHAVE_CONFIG_H'],
|
||||
install: true,
|
||||
install_dir: validate_plugins_install_dir,
|
||||
dependencies : [gst_dep, gst_pbutils_dep],
|
||||
link_with : [gstvalidate]
|
||||
)
|
|
@ -1,8 +1,6 @@
|
|||
subdir('fault_injection')
|
||||
subdir('gapplication')
|
||||
subdir('ssim')
|
||||
subdir('extra_checks')
|
||||
subdir('flow')
|
||||
|
||||
if gtk_dep.found()
|
||||
subdir('gtk')
|
||||
|
|
Loading…
Reference in a new issue