summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorEdward Hervey <edward@centricular.com>2018-03-19 10:55:06 +0100
committerEdward Hervey <bilboed@bilboed.com>2018-05-28 15:04:24 +0200
commit9ee58b5aeb806ecf6efdc39e4869821420557245 (patch)
tree176927eb3e37b67a3f73e2ac62aee8325819d8e3 /ext
parentaf9e9d613ad8e9ac8c2218412cb5446af5da0de2 (diff)
downloadgstreamer-plugins-bad-9ee58b5aeb806ecf6efdc39e4869821420557245.tar.gz
closedcaption: zvbi: Add gst-debug category to zvbi code
And adapt their logging system to go through it
Diffstat (limited to 'ext')
-rw-r--r--ext/closedcaption/decoder.c7
-rw-r--r--ext/closedcaption/decoder.h2
-rw-r--r--ext/closedcaption/misc.h16
3 files changed, 18 insertions, 7 deletions
diff --git a/ext/closedcaption/decoder.c b/ext/closedcaption/decoder.c
index 083a88544..b74e72956 100644
--- a/ext/closedcaption/decoder.c
+++ b/ext/closedcaption/decoder.c
@@ -827,6 +827,13 @@ vbi_raw_decoder_init (vbi_raw_decoder * rd)
rd->pattern = (int8_t *) rd3;
}
+GST_DEBUG_CATEGORY (libzvbi_debug);
+void
+vbi_initialize_gst_debug (void)
+{
+ GST_DEBUG_CATEGORY_INIT (libzvbi_debug, "libzvbi", 0, "libzvbi");
+}
+
/*
Local variables:
c-set-style: K&R
diff --git a/ext/closedcaption/decoder.h b/ext/closedcaption/decoder.h
index 04dfd20c9..f91e705a0 100644
--- a/ext/closedcaption/decoder.h
+++ b/ext/closedcaption/decoder.h
@@ -406,6 +406,8 @@ extern void vbi_raw_decoder_resize( vbi_raw_decoder *rd,
extern unsigned int vbi_raw_decoder_parameters(vbi_raw_decoder *rd, unsigned int services,
int scanning, int *max_rate);
extern int vbi_raw_decode(vbi_raw_decoder *rd, uint8_t *raw, vbi_sliced *out);
+
+void vbi_initialize_gst_debug (void);
/** @} */
/* Private */
diff --git a/ext/closedcaption/misc.h b/ext/closedcaption/misc.h
index 08298c42a..bdc04ecfb 100644
--- a/ext/closedcaption/misc.h
+++ b/ext/closedcaption/misc.h
@@ -295,6 +295,8 @@ _vbi_grow_vector_capacity (void ** vector,
size_t element_size)
_vbi_nonnull ((1, 2));
+GST_DEBUG_CATEGORY_EXTERN (libzvbi_debug);
+
/* Logging stuff. */
#ifdef G_HAVE_ISO_VARARGS
#define VBI_CAT_LEVEL_LOG(cat,level,object,...) G_STMT_START{ \
@@ -336,19 +338,19 @@ VBI_CAT_LEVEL_LOG (GstDebugCategory * cat, GstDebugLevel level,
#endif /* G_HAVE_ISO_VARARGS */
#define error(hook, templ, args...) \
- VBI_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_ERROR, NULL, templ , ##args)
+ VBI_CAT_LEVEL_LOG (libzvbi_debug, GST_LEVEL_ERROR, NULL, templ , ##args)
#define warning(hook, templ, args...) \
- VBI_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, templ , ##args)
+ VBI_CAT_LEVEL_LOG (libzvbi_debug, GST_LEVEL_WARNING, NULL, templ , ##args)
#define notice(hook, templ, args...) \
- VBI_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, NULL, templ , ##args)
+ VBI_CAT_LEVEL_LOG (libzvbi_debug, GST_LEVEL_INFO, NULL, templ , ##args)
#define info(hook, templ, args...) \
- VBI_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_INFO, NULL, templ , ##args)
+ VBI_CAT_LEVEL_LOG (libzvbi_debug, GST_LEVEL_INFO, NULL, templ , ##args)
#define debug1(hook, templ, args...) \
- VBI_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_DEBUG, NULL, templ , ##args)
+ VBI_CAT_LEVEL_LOG (libzvbi_debug, GST_LEVEL_DEBUG, NULL, templ , ##args)
#define debug2(hook, templ, args...) \
- VBI_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_LOG, NULL, templ , ##args)
+ VBI_CAT_LEVEL_LOG (libzvbi_debug, GST_LEVEL_LOG, NULL, templ , ##args)
#define debug3(hook, templ, args...) \
- VBI_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_TRACE, NULL, templ , ##args)
+ VBI_CAT_LEVEL_LOG (libzvbi_debug, GST_LEVEL_TRACE, NULL, templ , ##args)
#if 0 /* Replaced logging with GStreamer logging system */
extern _vbi_log_hook _vbi_global_log;