element-maker: Add debug category
authorDavid Schleef <ds@schleef.org>
Mon, 3 Jan 2011 03:38:01 +0000 (19:38 -0800)
committerDavid Schleef <ds@schleef.org>
Mon, 3 Jan 2011 03:38:01 +0000 (19:38 -0800)
tools/gst-element-maker

index fa56baf..aa899b6 100755 (executable)
@@ -133,6 +133,9 @@ grep -A 10000 '^% includes' $templatedir/$class | tail -n +2|grep -m 1 -B 10000
 cat <<EOF
 #include "gstreplace.h"
 
+GST_DEBUG_CATEGORY_STATIC (gst_replace_debug);
+#define GST_CAT_DEFAULT gst_replace_debug
+
 /* prototypes */
 
 EOF
@@ -165,8 +168,12 @@ cat <<EOF
 
 /* class initialization */
 
-GST_BOILERPLATE (GstReplace, gst_replace, GstBaseReplace,
-    GST_TYPE_BASE_REPLACE);
+#define DEBUG_INIT(bla) \\
+  GST_DEBUG_CATEGORY_INIT (gst_replace_debug, "replace", 0, \\
+      "debug category for replace element");
+
+GST_BOILERPLATE_FULL (GstReplace, gst_replace, GstBaseReplace,
+    GST_TYPE_BASE_REPLACE, DEBUG_INIT);
 
 static void
 gst_replace_base_init (gpointer g_class)