add debug category
authorWim Taymans <wim.taymans@collabora.co.uk>
Fri, 14 Dec 2012 10:09:30 +0000 (11:09 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Fri, 14 Dec 2012 10:09:30 +0000 (11:09 +0100)
Adding a debug category is nicer than logging to the default category

gst/gstsample.c
gst/gststructure.c

index 4ceb436..f6f0ead 100644 (file)
@@ -33,6 +33,9 @@
 
 #include "gstsample.h"
 
+GST_DEBUG_CATEGORY_STATIC (gst_sample_debug);
+#define GST_CAT_DEFAULT gst_sample_debug
+
 struct _GstSample
 {
   GstMiniObject mini_object;
@@ -51,6 +54,8 @@ void
 _priv_gst_sample_initialize (void)
 {
   _gst_sample_type = gst_sample_get_type ();
+
+  GST_DEBUG_CATEGORY_INIT (gst_sample_debug, "sample", 0, "GstSample debug");
 }
 
 static GstSample *
index c4ec890..91919e6 100644 (file)
@@ -67,6 +67,9 @@
 #include <gst/gst.h>
 #include <gobject/gvaluecollector.h>
 
+GST_DEBUG_CATEGORY_STATIC (gst_structure_debug);
+#define GST_CAT_DEFAULT gst_structure_debug
+
 typedef struct _GstStructureField GstStructureField;
 
 struct _GstStructureField
@@ -125,6 +128,9 @@ _priv_gst_structure_initialize (void)
 
   g_value_register_transform_func (_gst_structure_type, G_TYPE_STRING,
       gst_structure_transform_to_string);
+
+  GST_DEBUG_CATEGORY_INIT (gst_structure_debug, "structure", 0,
+      "GstStructure debug");
 }
 
 static GstStructure *