matroska: Register new debug category
authorJan Schmidt <thaytan@noraisin.net>
Wed, 3 Aug 2011 12:50:05 +0000 (22:50 +1000)
committerJan Schmidt <thaytan@noraisin.net>
Wed, 3 Aug 2011 12:52:07 +0000 (22:52 +1000)
Register the matroskareadcommon debug category when the
plugin is loaded to avoid assertion output when debug is turned on.

gst/matroska/matroska-read-common.c
gst/matroska/matroska-read-common.h
gst/matroska/matroska.c

index 4431a51..32b513e 100644 (file)
@@ -45,7 +45,7 @@
 #include "ebml-read.h"
 #include "matroska-read-common.h"
 
-GST_DEBUG_CATEGORY_STATIC (matroskareadcommon_debug);
+GST_DEBUG_CATEGORY (matroskareadcommon_debug);
 #define GST_CAT_DEFAULT matroskareadcommon_debug
 
 #define DEBUG_ELEMENT_START(common, ebml, element) \
index 68b0f6c..cf617e6 100644 (file)
@@ -31,6 +31,8 @@
 
 G_BEGIN_DECLS
 
+GST_DEBUG_CATEGORY_EXTERN(matroskareadcommon_debug);
+
 typedef enum {
   GST_MATROSKA_READ_STATE_START,
   GST_MATROSKA_READ_STATE_SEGMENT,
index 57db7a3..5391400 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "matroska-demux.h"
 #include "matroska-parse.h"
+#include "matroska-read-common.h"
 #include "matroska-mux.h"
 #include "matroska-ids.h"
 #include "webm-mux.h"
@@ -40,6 +41,9 @@ plugin_init (GstPlugin * plugin)
 
   gst_matroska_register_tags ();
 
+  GST_DEBUG_CATEGORY_INIT (matroskareadcommon_debug, "matroskareadcommon", 0,
+      "Matroska demuxer/parser shared debug");
+
   ret = gst_matroska_demux_plugin_init (plugin);
   ret &= gst_matroska_parse_plugin_init (plugin);
   ret &= gst_element_register (plugin, "matroskamux", GST_RANK_PRIMARY,