diff options
author | Mathieu Duponchelle <mathieu.duponchelle@opencreed.com> | 2014-10-21 23:31:37 +0200 |
---|---|---|
committer | Mathieu Duponchelle <mathieu.duponchelle@opencreed.com> | 2014-10-21 23:41:04 +0200 |
commit | 30aef5ba84926412181a276024a374f32e73d14b (patch) | |
tree | 814490b1d5f6333682f16cd7c04cef600e469fd4 | |
parent | 6d0930bb36ae1a7fdf3230827e294286f43d8944 (diff) |
validate: rename GstValidateReportingLevel.
Removes the confusion with GstValidateReportLevel.
Modeled on GstDebugGraphDetails.
-rw-r--r-- | validate/gst/validate/gst-validate-enums.h | 44 | ||||
-rw-r--r-- | validate/gst/validate/gst-validate-monitor.c | 12 | ||||
-rw-r--r-- | validate/gst/validate/gst-validate-monitor.h | 2 | ||||
-rw-r--r-- | validate/gst/validate/gst-validate-pad-monitor.c | 6 | ||||
-rw-r--r-- | validate/gst/validate/gst-validate-report.c | 6 | ||||
-rw-r--r-- | validate/gst/validate/gst-validate-report.h | 4 | ||||
-rw-r--r-- | validate/gst/validate/gst-validate-reporter.c | 16 | ||||
-rw-r--r-- | validate/gst/validate/gst-validate-reporter.h | 4 | ||||
-rw-r--r-- | validate/gst/validate/gst-validate-runner.c | 48 | ||||
-rw-r--r-- | validate/gst/validate/gst-validate-runner.h | 4 | ||||
-rw-r--r-- | validate/tests/check/validate/overrides.c | 2 | ||||
-rw-r--r-- | validate/tests/check/validate/padmonitor.c | 14 | ||||
-rw-r--r-- | validate/tests/check/validate/reporting.c | 44 |
13 files changed, 103 insertions, 103 deletions
diff --git a/validate/gst/validate/gst-validate-enums.h b/validate/gst/validate/gst-validate-enums.h index 0f9408b..1ffdcd4 100644 --- a/validate/gst/validate/gst-validate-enums.h +++ b/validate/gst/validate/gst-validate-enums.h @@ -23,59 +23,59 @@ #define __GST_VALIDATE_ENUMS_H__ /** - * GstValidateReportingLevel: - * @GST_VALIDATE_REPORTING_LEVEL_NONE: No debugging level specified or desired. Used to deactivate + * GstValidateReportingDetails: + * @GST_VALIDATE_SHOW_NONE: No debugging level specified or desired. Used to deactivate * debugging output. - * @GST_VALIDATE_REPORTING_LEVEL_SYNTHETIC: Summary of the issues found, with no + * @GST_VALIDATE_SHOW_SYNTHETIC: Summary of the issues found, with no * details. - * @GST_VALIDATE_REPORTING_LEVEL_SUBCHAIN: If set as the default level, similar + * @GST_VALIDATE_SHOW_SUBCHAIN: If set as the default level, similar * issues can be reported multiple times for different subchains. * If set as the level for a particular object (my_object:subchain), validate * will report the issues where the object is the first to report an issue for * a subchain. - * @GST_VALIDATE_REPORTING_LEVEL_MONITOR: If set as the default level, all the + * @GST_VALIDATE_SHOW_MONITOR: If set as the default level, all the * distinct issues for all the monitors will be reported. * If set as the level for a particular object, all the distinct issues for this object * will be reported. * Note that if the same issue happens twice on the same object, up until this * level that issue is only reported once. - * @GST_VALIDATE_REPORTING_LEVEL_ALL: All the issues will be reported, even those + * @GST_VALIDATE_SHOW_ALL: All the issues will be reported, even those * that repeat themselves inside the same object. This can be *very* verbose if * set globally. - * @GST_VALIDATE_REPORTING_LEVEL_UNKNOWN: No reporting level known, + * @GST_VALIDATE_SHOW_UNKNOWN: No reporting level known, * reporting will default to the global reporting level. * * Setting the reporting level allows to control the way issues are reported * when calling #gst_validate_runner_printf. * - * The reporting level can be set through the "GST_VALIDATE_REPORTING_LEVEL" + * The reporting level can be set through the "GST_VALIDATE_REPORTING_DETAILS" * environment variable, as a comma-separated list of (optional) object categories / names * and levels. No object category / name sets the global level. * - * Examples: GST_VALIDATE_REPORTING_LEVEL=synthetic,h264parse:all - * GST_VALIDATE_REPORTING_LEVEL=none,h264parse::sink_0:synthetic + * Examples: GST_VALIDATE_REPORTING_DETAILS=synthetic,h264parse:all + * GST_VALIDATE_REPORTING_DETAILS=none,h264parse::sink_0:synthetic */ typedef enum { - GST_VALIDATE_REPORTING_LEVEL_UNKNOWN = 0, - GST_VALIDATE_REPORTING_LEVEL_NONE = 1, - GST_VALIDATE_REPORTING_LEVEL_SYNTHETIC = 2, - GST_VALIDATE_REPORTING_LEVEL_SUBCHAIN = 3, - GST_VALIDATE_REPORTING_LEVEL_MONITOR = 4, - GST_VALIDATE_REPORTING_LEVEL_ALL = 5, - GST_VALIDATE_REPORTING_LEVEL_COUNT -} GstValidateReportingLevel; + GST_VALIDATE_SHOW_UNKNOWN = 0, + GST_VALIDATE_SHOW_NONE = 1, + GST_VALIDATE_SHOW_SYNTHETIC = 2, + GST_VALIDATE_SHOW_SUBCHAIN = 3, + GST_VALIDATE_SHOW_MONITOR = 4, + GST_VALIDATE_SHOW_ALL = 5, + GST_VALIDATE_SHOW_COUNT +} GstValidateReportingDetails; /** - * GST_VALIDATE_REPORTING_LEVEL_DEFAULT: + * GST_VALIDATE_SHOW_DEFAULT: * * Defines the default reporting level to be used with gst-validate. It is normally - * set to #GST_VALIDATE_REPORTING_LEVEL_SYNTHETIC so only a synthetic report + * set to #GST_VALIDATE_SHOW_SYNTHETIC so only a synthetic report * gets printed. * As it can be configured at compile time, developer builds may chose to * override that though. */ -#ifndef GST_VALIDATE_REPORTING_LEVEL_DEFAULT -#define GST_VALIDATE_REPORTING_LEVEL_DEFAULT GST_VALIDATE_REPORTING_LEVEL_SYNTHETIC +#ifndef GST_VALIDATE_SHOW_DEFAULT +#define GST_VALIDATE_SHOW_DEFAULT GST_VALIDATE_SHOW_SYNTHETIC #endif #endif /* __GST_VALIDATE_RUNNER_H__ */ diff --git a/validate/gst/validate/gst-validate-monitor.c b/validate/gst/validate/gst-validate-monitor.c index 2be465d..7580aa8 100644 --- a/validate/gst/validate/gst-validate-monitor.c +++ b/validate/gst/validate/gst-validate-monitor.c @@ -63,7 +63,7 @@ gst_validate_monitor_intercept_report (GstValidateReporter * reporter, #define _do_init \ G_IMPLEMENT_INTERFACE (GST_TYPE_VALIDATE_REPORTER, _reporter_iface_init) -static GstValidateReportingLevel +static GstValidateReportingDetails _get_reporting_level (GstValidateReporter *monitor) { return GST_VALIDATE_MONITOR (monitor)->level; @@ -204,12 +204,12 @@ gst_validate_monitor_do_setup (GstValidateMonitor * monitor) return TRUE; } -static GstValidateReportingLevel +static GstValidateReportingDetails _get_report_level_for_pad (GstValidateRunner *runner, GstObject *pad) { GstObject *parent; gchar *name; - GstValidateReportingLevel level = GST_VALIDATE_REPORTING_LEVEL_UNKNOWN; + GstValidateReportingDetails level = GST_VALIDATE_SHOW_UNKNOWN; parent = gst_object_get_parent (pad); @@ -227,7 +227,7 @@ _determine_reporting_level (GstValidateMonitor *monitor) GstValidateRunner *runner; GstObject *object, *parent; gchar *object_name; - GstValidateReportingLevel level = GST_VALIDATE_REPORTING_LEVEL_UNKNOWN; + GstValidateReportingDetails level = GST_VALIDATE_SHOW_UNKNOWN; object = gst_object_ref(monitor->target); runner = gst_validate_reporter_get_runner (GST_VALIDATE_REPORTER (monitor)); @@ -236,7 +236,7 @@ _determine_reporting_level (GstValidateMonitor *monitor) /* Let's allow for singling out pads */ if (GST_IS_PAD (object)) { level = _get_report_level_for_pad (runner, object); - if (level != GST_VALIDATE_REPORTING_LEVEL_UNKNOWN) + if (level != GST_VALIDATE_SHOW_UNKNOWN) break; } @@ -246,7 +246,7 @@ _determine_reporting_level (GstValidateMonitor *monitor) gst_object_unref (object); object = parent; g_free (object_name); - } while (object && level == GST_VALIDATE_REPORTING_LEVEL_UNKNOWN); + } while (object && level == GST_VALIDATE_SHOW_UNKNOWN); if (object) gst_object_unref (object); diff --git a/validate/gst/validate/gst-validate-monitor.h b/validate/gst/validate/gst-validate-monitor.h index fd46d8d..0a6f4cd 100644 --- a/validate/gst/validate/gst-validate-monitor.h +++ b/validate/gst/validate/gst-validate-monitor.h @@ -93,7 +93,7 @@ struct _GstValidateMonitor { GQueue overrides; GstMediaDescriptor *media_descriptor; - GstValidateReportingLevel level; + GstValidateReportingDetails level; /*< private >*/ GHashTable *reports; diff --git a/validate/gst/validate/gst-validate-pad-monitor.c b/validate/gst/validate/gst-validate-pad-monitor.c index 9f8c532..39d98b0 100644 --- a/validate/gst/validate/gst-validate-pad-monitor.c +++ b/validate/gst/validate/gst-validate-pad-monitor.c @@ -260,7 +260,7 @@ gst_validate_pad_monitor_intercept_report (GstValidateReporter * { GstValidateReporterInterface *iface_class, *old_iface_class; GstValidatePadMonitor *pad_monitor = GST_VALIDATE_PAD_MONITOR (reporter); - GstValidateReportingLevel monitor_reporting_level; + GstValidateReportingDetails monitor_reporting_level; GstValidateInterceptionReturn ret; monitor_reporting_level = @@ -274,10 +274,10 @@ gst_validate_pad_monitor_intercept_report (GstValidateReporter * old_iface_class->intercept_report (reporter, report); switch (monitor_reporting_level) { - case GST_VALIDATE_REPORTING_LEVEL_NONE: + case GST_VALIDATE_SHOW_NONE: ret = GST_VALIDATE_REPORTER_DROP; break; - case GST_VALIDATE_REPORTING_LEVEL_UNKNOWN: + case GST_VALIDATE_SHOW_UNKNOWN: ret = _concatenate_issues (pad_monitor, report); break; default: diff --git a/validate/gst/validate/gst-validate-report.c b/validate/gst/validate/gst-validate-report.c index 3145e9d..58bf1c3 100644 --- a/validate/gst/validate/gst-validate-report.c +++ b/validate/gst/validate/gst-validate-report.c @@ -446,7 +446,7 @@ gst_validate_report_new (GstValidateIssue * issue, report->timestamp = gst_util_get_timestamp () - _gst_validate_report_start_time; report->level = issue->default_level; - report->reporting_level = GST_VALIDATE_REPORTING_LEVEL_UNKNOWN; + report->reporting_level = GST_VALIDATE_SHOW_UNKNOWN; return report; } @@ -639,7 +639,7 @@ gst_validate_report_set_master_report (GstValidateReport * report, GList *tmp; gboolean add_shadow_report = TRUE; - if (master_report->reporting_level >= GST_VALIDATE_REPORTING_LEVEL_MONITOR) + if (master_report->reporting_level >= GST_VALIDATE_SHOW_MONITOR) return FALSE; report->master_report = master_report; @@ -718,7 +718,7 @@ gst_validate_report_printf (GstValidateReport * report) void gst_validate_report_set_reporting_level (GstValidateReport * report, - GstValidateReportingLevel level) + GstValidateReportingDetails level) { report->reporting_level = level; } diff --git a/validate/gst/validate/gst-validate-report.h b/validate/gst/validate/gst-validate-report.h index 335e10f..6d7b8ff 100644 --- a/validate/gst/validate/gst-validate-report.h +++ b/validate/gst/validate/gst-validate-report.h @@ -160,7 +160,7 @@ struct _GstValidateReport { /* Lists the reports that were repeated inside the same reporter */ GList *repeated_reports; - GstValidateReportingLevel reporting_level; + GstValidateReportingDetails reporting_level; }; void gst_validate_report_add_message (GstValidateReport *report, @@ -213,7 +213,7 @@ void gst_validate_printf_valist (gpointer source, va_list args) G_GNUC_NO_INSTRUMENT; gboolean gst_validate_report_should_print (GstValidateReport * report); gboolean gst_validate_report_set_master_report(GstValidateReport *report, GstValidateReport *master_report); -void gst_validate_report_set_reporting_level (GstValidateReport *report, GstValidateReportingLevel level); +void gst_validate_report_set_reporting_level (GstValidateReport *report, GstValidateReportingDetails level); void gst_validate_report_add_repeated_report (GstValidateReport *report, GstValidateReport *repeated_report); GstValidateReportLevel gst_validate_report_level_from_name (const gchar *issue_name); diff --git a/validate/gst/validate/gst-validate-reporter.c b/validate/gst/validate/gst-validate-reporter.c index 4032432..4937d83 100644 --- a/validate/gst/validate/gst-validate-reporter.c +++ b/validate/gst/validate/gst-validate-reporter.c @@ -113,10 +113,10 @@ gst_validate_reporter_intercept_report (GstValidateReporter * reporter, return ret; } -GstValidateReportingLevel +GstValidateReportingDetails gst_validate_reporter_get_reporting_level (GstValidateReporter * reporter) { - GstValidateInterceptionReturn ret = GST_VALIDATE_REPORTING_LEVEL_UNKNOWN; + GstValidateInterceptionReturn ret = GST_VALIDATE_SHOW_UNKNOWN; GstValidateReporterInterface *iface = GST_VALIDATE_REPORTER_GET_INTERFACE (reporter); @@ -171,18 +171,18 @@ gst_validate_report_valist (GstValidateReporter * reporter, prev_report = g_hash_table_lookup (priv->reports, (gconstpointer) issue_id); if (prev_report) { - GstValidateReportingLevel reporter_level = + GstValidateReportingDetails reporter_level = gst_validate_reporter_get_reporting_level (reporter); - GstValidateReportingLevel runner_level = - GST_VALIDATE_REPORTING_LEVEL_UNKNOWN; + GstValidateReportingDetails runner_level = + GST_VALIDATE_SHOW_UNKNOWN; if (priv->runner) runner_level = gst_validate_runner_get_default_reporting_level (priv->runner); - if (reporter_level == GST_VALIDATE_REPORTING_LEVEL_ALL || - (runner_level == GST_VALIDATE_REPORTING_LEVEL_ALL && - reporter_level == GST_VALIDATE_REPORTING_LEVEL_UNKNOWN)) + if (reporter_level == GST_VALIDATE_SHOW_ALL || + (runner_level == GST_VALIDATE_SHOW_ALL && + reporter_level == GST_VALIDATE_SHOW_UNKNOWN)) gst_validate_report_add_repeated_report (prev_report, report); gst_validate_report_unref (report); diff --git a/validate/gst/validate/gst-validate-reporter.h b/validate/gst/validate/gst-validate-reporter.h index e5944dd..2c6982e 100644 --- a/validate/gst/validate/gst-validate-reporter.h +++ b/validate/gst/validate/gst-validate-reporter.h @@ -81,7 +81,7 @@ struct _GstValidateReporterInterface GstValidateInterceptionReturn (*intercept_report) (GstValidateReporter * reporter, GstValidateReport * report); - GstValidateReportingLevel (*get_reporting_level) (GstValidateReporter * + GstValidateReportingDetails (*get_reporting_level) (GstValidateReporter * reporter); }; @@ -101,7 +101,7 @@ GstValidateReport * gst_validate_reporter_get_report (GstValidateReporter *repor GstValidateIssueId issue_id); GList * gst_validate_reporter_get_reports (GstValidateReporter * reporter); gint gst_validate_reporter_get_reports_count (GstValidateReporter *reporter); -GstValidateReportingLevel gst_validate_reporter_get_reporting_level (GstValidateReporter *reporter); +GstValidateReportingDetails gst_validate_reporter_get_reporting_level (GstValidateReporter *reporter); G_END_DECLS #endif /* _GST_VALIDATE_REPORTER_ */ diff --git a/validate/gst/validate/gst-validate-runner.c b/validate/gst/validate/gst-validate-runner.c index 73e0227..3229474 100644 --- a/validate/gst/validate/gst-validate-runner.c +++ b/validate/gst/validate/gst-validate-runner.c @@ -63,7 +63,7 @@ struct _GstValidateRunnerPrivate { GMutex mutex; GList *reports; - GstValidateReportingLevel default_level; + GstValidateReportingDetails default_level; GHashTable *reports_by_type; /* A list of PatternLevel */ @@ -74,7 +74,7 @@ struct _GstValidateRunnerPrivate typedef struct _PatternLevel { GPatternSpec *pattern; - GstValidateReportingLevel level; + GstValidateReportingDetails level; } PatternLevel; #define GST_VALIDATE_RUNNER_LOCK(r) \ @@ -105,7 +105,7 @@ enum static guint _signals[LAST_SIGNAL] = { 0 }; static gboolean -_parse_reporting_level (gchar * str, GstValidateReportingLevel * level) +_parse_reporting_level (gchar * str, GstValidateReportingDetails * level) { if (!str) return FALSE; @@ -118,20 +118,20 @@ _parse_reporting_level (gchar * str, GstValidateReportingLevel * level) char *endptr; l = strtoul (str, &endptr, 10); if (endptr > str && endptr[0] == 0) { - *level = (GstValidateReportingLevel) l; + *level = (GstValidateReportingDetails) l; } else { return FALSE; } } else if (g_ascii_strcasecmp (str, "none") == 0) { - *level = GST_VALIDATE_REPORTING_LEVEL_NONE; + *level = GST_VALIDATE_SHOW_NONE; } else if (g_ascii_strcasecmp (str, "synthetic") == 0) { - *level = GST_VALIDATE_REPORTING_LEVEL_SYNTHETIC; + *level = GST_VALIDATE_SHOW_SYNTHETIC; } else if (g_ascii_strcasecmp (str, "subchain") == 0) { - *level = GST_VALIDATE_REPORTING_LEVEL_SUBCHAIN; + *level = GST_VALIDATE_SHOW_SUBCHAIN; } else if (g_ascii_strcasecmp (str, "monitor") == 0) { - *level = GST_VALIDATE_REPORTING_LEVEL_MONITOR; + *level = GST_VALIDATE_SHOW_MONITOR; } else if (g_ascii_strcasecmp (str, "all") == 0) { - *level = GST_VALIDATE_REPORTING_LEVEL_ALL; + *level = GST_VALIDATE_SHOW_ALL; } else return FALSE; @@ -147,7 +147,7 @@ _free_report_pattern_level (PatternLevel * pattern_level) static void _set_reporting_level_for_name (GstValidateRunner * runner, - const gchar * pattern, GstValidateReportingLevel level) + const gchar * pattern, GstValidateReportingDetails level) { PatternLevel *pattern_level = g_malloc (sizeof (PatternLevel)); GPatternSpec *pattern_spec = g_pattern_spec_new (pattern); @@ -195,7 +195,7 @@ _set_report_levels_from_string (GstValidateRunner * self, const gchar * list) gchar **values = g_strsplit (*walk, ":", 2); if (values[0] && values[1]) { - GstValidateReportingLevel level; + GstValidateReportingDetails level; if (_parse_reporting_level (values[1], &level)) _set_reporting_level_for_name (self, values[0], level); @@ -203,7 +203,7 @@ _set_report_levels_from_string (GstValidateRunner * self, const gchar * list) g_strfreev (values); } else { - GstValidateReportingLevel level; + GstValidateReportingDetails level; if (_parse_reporting_level (*walk, &level)) self->priv->default_level = level; @@ -218,7 +218,7 @@ _init_report_levels (GstValidateRunner * self) { const gchar *env; - env = g_getenv ("GST_VALIDATE_REPORT_LEVEL"); + env = g_getenv ("GST_VALIDATE_REPORTING_DETAILS"); if (env) _set_report_levels_from_string (self, env); } @@ -274,7 +274,7 @@ gst_validate_runner_init (GstValidateRunner * runner) runner->priv->reports_by_type = g_hash_table_new (g_direct_hash, g_direct_equal); - runner->priv->default_level = GST_VALIDATE_REPORTING_LEVEL_DEFAULT; + runner->priv->default_level = GST_VALIDATE_SHOW_DEFAULT; _init_report_levels (runner); } @@ -294,9 +294,9 @@ gst_validate_runner_new (void) /* * gst_validate_runner_get_default_reporting_level: * - * Returns: the default #GstValidateReportingLevel used to output a report. + * Returns: the default #GstValidateReportingDetails used to output a report. */ -GstValidateReportingLevel +GstValidateReportingDetails gst_validate_runner_get_default_reporting_level (GstValidateRunner * runner) { return runner->priv->default_level; @@ -305,12 +305,12 @@ gst_validate_runner_get_default_reporting_level (GstValidateRunner * runner) /* * gst_validate_runner_get_reporting_level_for_name: * - * Returns: the #GstValidateReportingLevel that will be applied for a given name. + * Returns: the #GstValidateReportingDetails that will be applied for a given name. * If no pattern was set for such a name, this function will return - * #GST_VALIDATE_REPORTING_LEVEL_UNKNOWN, and reporting for that name will + * #GST_VALIDATE_SHOW_UNKNOWN, and reporting for that name will * default to the global reporting level. */ -GstValidateReportingLevel +GstValidateReportingDetails gst_validate_runner_get_reporting_level_for_name (GstValidateRunner * runner, const gchar * name) { @@ -322,7 +322,7 @@ gst_validate_runner_get_reporting_level_for_name (GstValidateRunner * runner, return pattern_level->level; } - return GST_VALIDATE_REPORTING_LEVEL_UNKNOWN; + return GST_VALIDATE_SHOW_UNKNOWN; } static void @@ -347,17 +347,17 @@ void gst_validate_runner_add_report (GstValidateRunner * runner, GstValidateReport * report) { - GstValidateReportingLevel reporter_level = + GstValidateReportingDetails reporter_level = gst_validate_reporter_get_reporting_level (report->reporter); /* Let's use our own reporting strategy */ - if (reporter_level == GST_VALIDATE_REPORTING_LEVEL_UNKNOWN) { + if (reporter_level == GST_VALIDATE_SHOW_UNKNOWN) { gst_validate_report_set_reporting_level (report, runner->priv->default_level); switch (runner->priv->default_level) { - case GST_VALIDATE_REPORTING_LEVEL_NONE: + case GST_VALIDATE_SHOW_NONE: return; - case GST_VALIDATE_REPORTING_LEVEL_SYNTHETIC: + case GST_VALIDATE_SHOW_SYNTHETIC: synthesize_reports (runner, report); return; default: diff --git a/validate/gst/validate/gst-validate-runner.h b/validate/gst/validate/gst-validate-runner.h index 0d2b74c..7b90c0c 100644 --- a/validate/gst/validate/gst-validate-runner.h +++ b/validate/gst/validate/gst-validate-runner.h @@ -79,8 +79,8 @@ GList * gst_validate_runner_get_reports (GstValidateRunner * runner); int gst_validate_runner_printf (GstValidateRunner * runner); -GstValidateReportingLevel gst_validate_runner_get_default_reporting_level (GstValidateRunner *runner); -GstValidateReportingLevel gst_validate_runner_get_reporting_level_for_name (GstValidateRunner *runner, +GstValidateReportingDetails gst_validate_runner_get_default_reporting_level (GstValidateRunner *runner); +GstValidateReportingDetails gst_validate_runner_get_reporting_level_for_name (GstValidateRunner *runner, const gchar *name); G_END_DECLS diff --git a/validate/tests/check/validate/overrides.c b/validate/tests/check/validate/overrides.c index 104a152..2600a8e 100644 --- a/validate/tests/check/validate/overrides.c +++ b/validate/tests/check/validate/overrides.c @@ -36,7 +36,7 @@ _check_message_level (const gchar * factoryname, GstValidateReportLevel level, GstValidateMonitor *monitor; element = gst_element_factory_make (factoryname, NULL); - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "all", TRUE)); + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "all", TRUE)); runner = gst_validate_runner_new (); monitor = gst_validate_monitor_factory_create (GST_OBJECT (element), runner, NULL); diff --git a/validate/tests/check/validate/padmonitor.c b/validate/tests/check/validate/padmonitor.c index 4828420..b141fcb 100644 --- a/validate/tests/check/validate/padmonitor.c +++ b/validate/tests/check/validate/padmonitor.c @@ -54,7 +54,7 @@ GST_START_TEST (buffer_before_segment) fail_unless (gst_element_link (src, sink)); - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "all", TRUE)); + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "all", TRUE)); runner = gst_validate_runner_new (); monitor = gst_validate_monitor_factory_create (GST_OBJECT (src), runner, NULL); @@ -132,7 +132,7 @@ GST_START_TEST (buffer_outside_segment) gst_element_class_add_metadata (GST_ELEMENT_GET_CLASS (src), "klass", "Decoder"); - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "all", TRUE)); + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "all", TRUE)); runner = gst_validate_runner_new (); monitor = gst_validate_monitor_factory_create (GST_OBJECT (src), runner, NULL); @@ -209,7 +209,7 @@ _first_buffer_running_time (gboolean failing) src = gst_element_factory_make ("fakesrc", "fakesrc"); sink = gst_element_factory_make ("fakesink", "fakesink"); - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "all", TRUE)); + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "all", TRUE)); runner = gst_validate_runner_new (); monitor = gst_validate_monitor_factory_create (GST_OBJECT (src), runner, NULL); @@ -322,7 +322,7 @@ _test_flow_aggregation (GstFlowReturn flow, GstFlowReturn flow1, GstValidateRunner *runner; GstValidateMonitor *monitor; - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "all", TRUE)); + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "all", TRUE)); runner = gst_validate_runner_new (); monitor = gst_validate_monitor_factory_create (GST_OBJECT (pipeline), runner, NULL); @@ -415,7 +415,7 @@ GST_START_TEST (issue_concatenation) gint n_reports; gulong probe_id1, probe_id2; - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "subchain", TRUE)); + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "subchain", TRUE)); runner = gst_validate_runner_new (); src1 = create_and_monitor_element ("fakesrc", "fakesrc1", runner); @@ -611,7 +611,7 @@ _check_media_info (GstSegment * segment, BufferDesc * bufs) GError *err = NULL; gint i, num_issues = 0; - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "all", TRUE)); + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "all", TRUE)); runner = gst_validate_runner_new (); mdesc = (GstMediaDescriptor *) @@ -810,7 +810,7 @@ GST_START_TEST (eos_without_segment) GstValidateRunner *runner; GstValidateMonitor *monitor; - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "all", TRUE)); + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "all", TRUE)); runner = gst_validate_runner_new (); monitor = gst_validate_monitor_factory_create (GST_OBJECT (pipeline), diff --git a/validate/tests/check/validate/reporting.c b/validate/tests/check/validate/reporting.c index 4aa09dd..bf28918 100644 --- a/validate/tests/check/validate/reporting.c +++ b/validate/tests/check/validate/reporting.c @@ -37,36 +37,36 @@ GST_START_TEST (test_report_levels) /* Try to set the default reporting level to ALL, the code is supposed to * be case insensitive */ - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "AlL", TRUE)); + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "AlL", TRUE)); runner = gst_validate_runner_new (); fail_unless (gst_validate_runner_get_default_reporting_level (runner) == - GST_VALIDATE_REPORTING_LEVEL_ALL); + GST_VALIDATE_SHOW_ALL); g_object_unref (runner); /* Try to set the default reporting level to subchain, the code is supposed to * parse numbers as well */ - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "2", TRUE)); + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "2", TRUE)); runner = gst_validate_runner_new (); fail_unless (gst_validate_runner_get_default_reporting_level (runner) == - GST_VALIDATE_REPORTING_LEVEL_SYNTHETIC); + GST_VALIDATE_SHOW_SYNTHETIC); g_object_unref (runner); /* Try to set the reporting level for an object */ - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "synthetic,test_object:monitor,other_*:all", TRUE)); runner = gst_validate_runner_new (); fail_unless (gst_validate_runner_get_reporting_level_for_name (runner, - "test_object") == GST_VALIDATE_REPORTING_LEVEL_MONITOR); + "test_object") == GST_VALIDATE_SHOW_MONITOR); fail_unless (gst_validate_runner_get_reporting_level_for_name (runner, - "other_test_object") == GST_VALIDATE_REPORTING_LEVEL_ALL); + "other_test_object") == GST_VALIDATE_SHOW_ALL); fail_unless (gst_validate_runner_get_reporting_level_for_name (runner, - "dummy_test_object") == GST_VALIDATE_REPORTING_LEVEL_UNKNOWN); + "dummy_test_object") == GST_VALIDATE_SHOW_UNKNOWN); g_object_unref (runner); /* Now let's try to see if the created monitors actually understand the * situation they've put themselves into */ - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "none,pipeline*:monitor,sofake1:all,sofake*::sink:subchain", TRUE)); runner = gst_validate_runner_new (); @@ -81,7 +81,7 @@ GST_START_TEST (test_report_levels) (GstValidateMonitor *) g_object_get_data (G_OBJECT (element), "validate-monitor"); fail_unless (gst_validate_reporter_get_reporting_level (GST_VALIDATE_REPORTER - (monitor)) == GST_VALIDATE_REPORTING_LEVEL_ALL); + (monitor)) == GST_VALIDATE_SHOW_ALL); pad = gst_element_get_static_pad (element, "src"); monitor = @@ -89,7 +89,7 @@ GST_START_TEST (test_report_levels) "validate-monitor"); /* The pad should have inherited the reporting level */ fail_unless (gst_validate_reporter_get_reporting_level (GST_VALIDATE_REPORTER - (monitor)) == GST_VALIDATE_REPORTING_LEVEL_ALL); + (monitor)) == GST_VALIDATE_SHOW_ALL); gst_object_unref (pad); gst_object_unref (element); @@ -100,7 +100,7 @@ GST_START_TEST (test_report_levels) "validate-monitor"); /* The element should have inherited its reporting level from the pipeline */ fail_unless (gst_validate_reporter_get_reporting_level (GST_VALIDATE_REPORTER - (monitor)) == GST_VALIDATE_REPORTING_LEVEL_MONITOR); + (monitor)) == GST_VALIDATE_SHOW_MONITOR); pad = gst_element_get_static_pad (element, "sink"); monitor = @@ -108,7 +108,7 @@ GST_START_TEST (test_report_levels) "validate-monitor"); /* But its pad should not as it falls in the sofake*::sink pattern */ fail_unless (gst_validate_reporter_get_reporting_level (GST_VALIDATE_REPORTER - (monitor)) == GST_VALIDATE_REPORTING_LEVEL_SUBCHAIN); + (monitor)) == GST_VALIDATE_SHOW_SUBCHAIN); gst_object_unref (pad); gst_object_unref (element); @@ -212,28 +212,28 @@ GST_START_TEST (test_global_levels) { GstValidateRunner *runner; - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "none", TRUE)); + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "none", TRUE)); runner = gst_validate_runner_new (); _create_issues (runner); /* None shall pass */ fail_unless_equals_int (gst_validate_runner_get_reports_count (runner), 0); g_object_unref (runner); - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "synthetic", TRUE)); + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "synthetic", TRUE)); runner = gst_validate_runner_new (); _create_issues (runner); /* Two reports of the same type */ fail_unless_equals_int (gst_validate_runner_get_reports_count (runner), 1); g_object_unref (runner); - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "monitor", TRUE)); + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "monitor", TRUE)); runner = gst_validate_runner_new (); _create_issues (runner); /* One report for each pad monitor */ fail_unless_equals_int (gst_validate_runner_get_reports_count (runner), 6); g_object_unref (runner); - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "all", TRUE)); + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "all", TRUE)); runner = gst_validate_runner_new (); _create_issues (runner); /* One report for each pad monitor, plus one for funnel src and fakesink sink */ @@ -247,7 +247,7 @@ GST_START_TEST (test_specific_levels) { GstValidateRunner *runner; - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "none,fakesrc1:synthetic", + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "none,fakesrc1:synthetic", TRUE)); runner = gst_validate_runner_new (); _create_issues (runner); @@ -255,7 +255,7 @@ GST_START_TEST (test_specific_levels) fail_unless_equals_int (gst_validate_runner_get_reports_count (runner), 1); g_object_unref (runner); - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "monitor,sink:none", + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "monitor,sink:none", TRUE)); runner = gst_validate_runner_new (); _create_issues (runner); @@ -264,7 +264,7 @@ GST_START_TEST (test_specific_levels) fail_unless_equals_int (gst_validate_runner_get_reports_count (runner), 5); g_object_unref (runner); - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "subchain,sink:monitor", + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "subchain,sink:monitor", TRUE)); runner = gst_validate_runner_new (); _create_issues (runner); @@ -273,7 +273,7 @@ GST_START_TEST (test_specific_levels) fail_unless_equals_int (gst_validate_runner_get_reports_count (runner), 3); g_object_unref (runner); - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "synthetic,fakesrc1:subchain,fakesrc2:subchain,funnel*::src*:monitor", TRUE)); runner = gst_validate_runner_new (); @@ -284,7 +284,7 @@ GST_START_TEST (test_specific_levels) fail_unless_equals_int (gst_validate_runner_get_reports_count (runner), 4); g_object_unref (runner); - fail_unless (g_setenv ("GST_VALIDATE_REPORT_LEVEL", "none,fakesink*:all", + fail_unless (g_setenv ("GST_VALIDATE_REPORTING_DETAILS", "none,fakesink*:all", TRUE)); runner = gst_validate_runner_new (); _create_issues (runner); |