tags: add debug category for tags utility functions
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 27 Sep 2010 17:14:50 +0000 (18:14 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 28 Sep 2010 09:34:06 +0000 (10:34 +0100)
gst-libs/gst/tag/tags.c

index 410b3e4..9d82297 100644 (file)
  * </refsect2>
  */
 
+#define GST_CAT_DEFAULT gst_tag_ensure_debug_category()
+
+static GstDebugCategory *
+gst_tag_ensure_debug_category (void)
+{
+  static gsize cat_gonce = 0;
+
+  if (g_once_init_enter (&cat_gonce)) {
+    gsize cat_done;
+
+    cat_done = (gsize) _gst_debug_category_new ("tag-tags", 0,
+        "GstTag helper functions");
+
+    g_once_init_leave (&cat_gonce, cat_done);
+  }
+
+  return (GstDebugCategory *) cat_gonce;
+}
 
 static gpointer
 gst_tag_register_tags_internal (gpointer unused)