validate: Only use one debugging category: validate
authorEdward Hervey <edward@collabora.com>
Tue, 20 Aug 2013 09:43:07 +0000 (11:43 +0200)
committerEdward Hervey <edward@collabora.com>
Wed, 21 Aug 2013 15:59:51 +0000 (17:59 +0200)
There's no point in having a different debug category per file, you
can filter it by source filename if you *really* want that.

13 files changed:
validate/gst/validate/Makefile.am
validate/gst/validate/gst-validate-bin-monitor.c
validate/gst/validate/gst-validate-element-monitor.c
validate/gst/validate/gst-validate-internal.h [new file with mode: 0644]
validate/gst/validate/gst-validate-monitor.c
validate/gst/validate/gst-validate-override-registry.c
validate/gst/validate/gst-validate-override.c
validate/gst/validate/gst-validate-pad-monitor.c
validate/gst/validate/gst-validate-report.c
validate/gst/validate/gst-validate-reporter.c
validate/gst/validate/gst-validate-runner.c
validate/gst/validate/gst-validate-scenario.c
validate/gst/validate/validate.c

index 2a616090af9a24e70faca01502d945eaf330ba2c..6b49577272285a4d5903e35e7b5d38f110f0f21c 100644 (file)
@@ -18,6 +18,7 @@ noinst_HEADERS = \
        gst-validate-bin-monitor.h \
        gst-validate-element-monitor.h \
        gst-validate-i18n-lib.h \
+       gst-validate-internal.h \
        gst-validate-monitor-factory.h \
        gst-validate-monitor.h \
        gst-validate-override.h \
index 3731c1af9c7c7563ce6cf38cb4cdb4fddae36e1f..e3752cb3c80227606be19208a58e0b42da5267bd 100644 (file)
@@ -23,6 +23,7 @@
 #  include "config.h"
 #endif
 
+#include "gst-validate-internal.h"
 #include "gst-validate-bin-monitor.h"
 #include "gst-validate-monitor-factory.h"
 
  * TODO
  */
 
-GST_DEBUG_CATEGORY_STATIC (gst_validate_bin_monitor_debug);
-#define GST_CAT_DEFAULT gst_validate_bin_monitor_debug
-
-#define _do_init \
-  GST_DEBUG_CATEGORY_INIT (gst_validate_bin_monitor_debug, "qa_bin_monitor", 0, "VALIDATE BinMonitor");
 #define gst_validate_bin_monitor_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GstValidateBinMonitor, gst_validate_bin_monitor,
-    GST_TYPE_VALIDATE_ELEMENT_MONITOR, _do_init);
+G_DEFINE_TYPE (GstValidateBinMonitor, gst_validate_bin_monitor,
+    GST_TYPE_VALIDATE_ELEMENT_MONITOR);
 
 static void
 gst_validate_bin_monitor_wrap_element (GstValidateBinMonitor * monitor,
index 9499b1176ca3fd1c98feb6ec93df16b73e575411..220f42da7875814cc489f903637b113413626ce0 100644 (file)
@@ -23,6 +23,7 @@
 #  include "config.h"
 #endif
 
+#include "gst-validate-internal.h"
 #include "gst-validate-element-monitor.h"
 #include "gst-validate-pad-monitor.h"
 #include "gst-validate-monitor-factory.h"
  * TODO
  */
 
-GST_DEBUG_CATEGORY_STATIC (gst_validate_element_monitor_debug);
-#define GST_CAT_DEFAULT gst_validate_element_monitor_debug
-
-#define _do_init \
-  GST_DEBUG_CATEGORY_INIT (gst_validate_element_monitor_debug, "qa_element_monitor", 0, "VALIDATE ElementMonitor");
 #define gst_validate_element_monitor_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GstValidateElementMonitor,
-    gst_validate_element_monitor, GST_TYPE_VALIDATE_MONITOR, _do_init);
+G_DEFINE_TYPE (GstValidateElementMonitor, gst_validate_element_monitor,
+    GST_TYPE_VALIDATE_MONITOR);
 
 static void
 gst_validate_element_monitor_wrap_pad (GstValidateElementMonitor * monitor,
diff --git a/validate/gst/validate/gst-validate-internal.h b/validate/gst/validate/gst-validate-internal.h
new file mode 100644 (file)
index 0000000..3d23047
--- /dev/null
@@ -0,0 +1,30 @@
+/* GStreamer
+ * Copyright (C) 2013 Thiago Santos <thiago.sousa.santos@collabora.com>
+ *
+ * validate.c - Validate generic functions
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GST_VALIDATE_INTERNAL_H__
+#define __GST_VALIDATE_INTERNAL_H__
+
+#include <gst/gst.h>
+
+GST_DEBUG_CATEGORY_EXTERN (gstvalidate_debug);
+#define GST_CAT_DEFAULT gstvalidate_debug
+
+#endif
index 22d83b0c399307e8b0bb57c7f9a2b3c288ff13de..2c2c99a3c348d55d528a3adab8591e49b1d7de6f 100644 (file)
@@ -23,6 +23,7 @@
 #  include "config.h"
 #endif
 
+#include "gst-validate-internal.h"
 #include "gst-validate-monitor.h"
 
 /**
@@ -41,9 +42,6 @@ enum
   PROP_LAST
 };
 
-GST_DEBUG_CATEGORY_STATIC (gst_validate_monitor_debug);
-#define GST_CAT_DEFAULT gst_validate_monitor_debug
-
 static gboolean gst_validate_monitor_do_setup (GstValidateMonitor * monitor);
 static void
 gst_validate_monitor_get_property (GObject * object, guint prop_id,
@@ -60,7 +58,6 @@ static void gst_validate_monitor_intercept_report (GstValidateReporter *
     reporter, GstValidateReport * report);
 
 #define _do_init \
-  GST_DEBUG_CATEGORY_INIT (gst_validate_monitor_debug, "qa_monitor", 0, "VALIDATE Monitor");\
   G_IMPLEMENT_INTERFACE (GST_TYPE_VALIDATE_REPORTER, _reporter_iface_init)
 
 static void
index 4f1ffee3668e7647180a1edfad2f684bbb7389e3..20943fef469d924712afc9ebfad8db4a664b3687 100644 (file)
@@ -28,6 +28,7 @@
 #define __USE_GNU
 #include <dlfcn.h>
 
+#include "gst-validate-internal.h"
 #include "gst-validate-override-registry.h"
 
 typedef struct
index 7e1fcc45e90c2ee1e2318bcd46e0749f5c8de569..02c5105e443cda41dd88b150a46d310289469bb0 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <string.h>
 
+#include "gst-validate-internal.h"
 #include "gst-validate-override.h"
 
 GstValidateOverride *
index 1a0136abd622cca99cfa15e1c39ef217f6e58803..b804fc389d97d90d082ad11f3b1037f1ed6a3985 100644 (file)
 #  include "config.h"
 #endif
 
+#include "gst-validate-internal.h"
 #include "gst-validate-pad-monitor.h"
 #include "gst-validate-element-monitor.h"
 #include "gst-validate-reporter.h"
-#include <gst/gst.h>
 #include <string.h>
 #include <stdarg.h>
 
  * TODO
  */
 
-GST_DEBUG_CATEGORY_STATIC (gst_validate_pad_monitor_debug);
-#define GST_CAT_DEFAULT gst_validate_pad_monitor_debug
-
-#define _do_init \
-  GST_DEBUG_CATEGORY_INIT (gst_validate_pad_monitor_debug, "qa_pad_monitor", 0, "VALIDATE PadMonitor");
 #define gst_validate_pad_monitor_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GstValidatePadMonitor, gst_validate_pad_monitor,
-    GST_TYPE_VALIDATE_MONITOR, _do_init);
+G_DEFINE_TYPE (GstValidatePadMonitor, gst_validate_pad_monitor,
+    GST_TYPE_VALIDATE_MONITOR);
 
 #define PENDING_FIELDS "pending-fields"
 
index 522097e044eaf76cdcf70080d3fd781627d243c3..adbe4e4132d230958ae47a02aaa60ce4c0ff05aa 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <string.h>
 #include "gst-validate-i18n-lib.h"
+#include "gst-validate-internal.h"
 
 #include "gst-validate-report.h"
 #include "gst-validate-reporter.h"
index ddd6c6d07466e1841829a22da75d1beb5d56e78c..e53157e567315d2c33f7f17c3d92435dfaf5b913 100644 (file)
 #  include "config.h"
 #endif
 
+#include "gst-validate-internal.h"
 #include "gst-validate-reporter.h"
 #include "gst-validate-report.h"
 
 #define REPORTER_PRIVATE "gst-validate-reporter-private"
 
-GST_DEBUG_CATEGORY_STATIC (gst_validate_reporter);
-#define GST_CAT_DEFAULT gst_validate_reporter
-
 typedef struct _GstValidateReporterPrivate
 {
   GstValidateRunner *runner;
@@ -42,9 +40,6 @@ G_DEFINE_INTERFACE (GstValidateReporter, gst_validate_reporter, G_TYPE_OBJECT);
 static void
 gst_validate_reporter_default_init (GstValidateReporterInterface * iface)
 {
-  GST_DEBUG_CATEGORY_INIT (gst_validate_reporter, "gstvalidatereporter",
-      GST_DEBUG_FG_MAGENTA, "gst qa reporter");
-
   g_object_interface_install_property (iface,
       g_param_spec_object ("qa-runner", "VALIDATE Runner",
           "The Validate runner to " "report errors to",
index a7d2e1d15c14654a28d611babfcd8717dd9f9cbc..f61f03cac7b92ebb3219c34e351318c08e6c2f35 100644 (file)
@@ -23,6 +23,7 @@
 #  include "config.h"
 #endif
 
+#include "gst-validate-internal.h"
 #include "gst-validate-report.h"
 #include "gst-validate-monitor-factory.h"
 #include "gst-validate-override-registry.h"
  * TODO
  */
 
-GST_DEBUG_CATEGORY_STATIC (gst_validate_runner_debug);
-#define GST_CAT_DEFAULT gst_validate_runner_debug
-
-#define _do_init \
-  GST_DEBUG_CATEGORY_INIT (gst_validate_runner_debug, "qa_runner", 0, "VALIDATE Runner");
 #define gst_validate_runner_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GstValidateRunner, gst_validate_runner, G_TYPE_OBJECT,
-    _do_init);
+G_DEFINE_TYPE (GstValidateRunner, gst_validate_runner, G_TYPE_OBJECT);
 
 /* signals */
 enum
index a9c1c383a6545b467c49e223def24faeb9cdf320..1f65a34c64323220ea5d5a0776588fb4f3cae309 100644 (file)
 #define GST_VALIDATE_SCENARIO_SUFFIX ".xml"
 #define GST_VALIDATE_SCENARIO_DIRECTORY "qa-scenario"
 
-GST_DEBUG_CATEGORY_STATIC (gst_validate_scenario);
-#define GST_CAT_DEFAULT gst_validate_scenario
-
-
 #define DEFAULT_SEEK_TOLERANCE (0.1 * GST_SECOND)       /* tolerance seek interval
                                                            TODO make it overridable  */
 enum
@@ -652,9 +648,6 @@ gst_validate_scenario_class_init (GstValidateScenarioClass * klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-  GST_DEBUG_CATEGORY_INIT (gst_validate_scenario, "gstvalidatescenario",
-      GST_DEBUG_FG_MAGENTA, "gst qa scenario");
-
   g_type_class_add_private (klass, sizeof (GstValidateScenarioPrivate));
 
   object_class->dispose = gst_validate_scenario_dispose;
index 9094016dc0cdb7416a8dd89cccb334b4022b6ede..10ce4747222086756a01d2fb5aa5a11564e9cd0c 100644 (file)
 #endif
 
 #include "validate.h"
+#include "gst-validate-internal.h"
+
+GST_DEBUG_CATEGORY (gstvalidate_debug);
 
 void
 gst_validate_init (void)
 {
+  GST_DEBUG_CATEGORY_INIT (gstvalidate_debug, "validate", 0,
+      "Validation library");
+
   /* init the report system (can be called multiple times) */
   gst_validate_report_init ();