From: Edward Hervey Date: Mon, 19 Mar 2018 09:55:06 +0000 (+0100) Subject: closedcaption: zvbi: Add gst-debug category to zvbi code X-Git-Tag: 1.16.2~847 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9ee58b5aeb806ecf6efdc39e4869821420557245;p=platform%2Fupstream%2Fgst-plugins-bad.git closedcaption: zvbi: Add gst-debug category to zvbi code And adapt their logging system to go through it --- diff --git a/ext/closedcaption/decoder.c b/ext/closedcaption/decoder.c index 083a885..b74e729 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 04dfd20..f91e705 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 08298c4..bdc04ec 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;