From 030ccaedb57dcc6524e8770f50c763141d9b90e7 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 11 Dec 2020 11:40:22 +0100 Subject: [PATCH] typefind: Fix debug category usage Only register it in one place and use it everywhere from the header. Also make sure it doesn't clash with the debug category from core. Part-of: --- gst/typefind/gsttypefindfunctions.c | 3 --- gst/typefind/gsttypefindfunctionsplugin.c | 5 ++--- gst/typefind/gsttypefindfunctionsplugin.h | 3 +++ gst/typefind/gsttypefindfunctionsstartwith.c | 3 --- 4 files changed, 5 insertions(+), 9 deletions(-) diff --git a/gst/typefind/gsttypefindfunctions.c b/gst/typefind/gsttypefindfunctions.c index da56455..7635e4d 100644 --- a/gst/typefind/gsttypefindfunctions.c +++ b/gst/typefind/gsttypefindfunctions.c @@ -45,9 +45,6 @@ #include "gsttypefindfunctionsplugin.h" -GST_DEBUG_CATEGORY_STATIC (type_find_debug); -#define GST_CAT_DEFAULT type_find_debug - /* DataScanCtx: helper for typefind functions that scan through data * step-by-step, to avoid doing a peek at each and every offset */ diff --git a/gst/typefind/gsttypefindfunctionsplugin.c b/gst/typefind/gsttypefindfunctionsplugin.c index 94030d1..c0e386a 100644 --- a/gst/typefind/gsttypefindfunctionsplugin.c +++ b/gst/typefind/gsttypefindfunctionsplugin.c @@ -30,14 +30,13 @@ #include -GST_DEBUG_CATEGORY_STATIC (type_find_debug); -#define GST_CAT_DEFAULT type_find_debug +GST_DEBUG_CATEGORY (type_find_functions_debug); static gboolean plugin_init (GstPlugin * plugin) { /* can't initialize this via a struct as caps can't be statically initialized */ - GST_DEBUG_CATEGORY_INIT (type_find_debug, "typefindfunctions", + GST_DEBUG_CATEGORY_INIT (type_find_functions_debug, "typefindfunctions", GST_DEBUG_FG_GREEN | GST_DEBUG_BG_RED, "generic type find functions"); /* note: asx/wax/wmx are XML files, asf doesn't handle them */ /* must use strings, macros don't accept initializers */ diff --git a/gst/typefind/gsttypefindfunctionsplugin.h b/gst/typefind/gsttypefindfunctionsplugin.h index 960c910..0dfbc70 100644 --- a/gst/typefind/gsttypefindfunctionsplugin.h +++ b/gst/typefind/gsttypefindfunctionsplugin.h @@ -29,6 +29,9 @@ #include +GST_DEBUG_CATEGORY_EXTERN (type_find_functions_debug); +#define GST_CAT_DEFAULT type_find_functions_debug + /*** plugin initialization ***/ /*RIFF type find declaration */ diff --git a/gst/typefind/gsttypefindfunctionsstartwith.c b/gst/typefind/gsttypefindfunctionsstartwith.c index decf9a8..14092e9 100644 --- a/gst/typefind/gsttypefindfunctionsstartwith.c +++ b/gst/typefind/gsttypefindfunctionsstartwith.c @@ -33,9 +33,6 @@ #include "gsttypefindfunctionsplugin.h" #include "gsttypefindfunctionsdata.h" -GST_DEBUG_CATEGORY_STATIC (type_find_debug); -#define GST_CAT_DEFAULT type_find_debug - static void start_with_type_find (GstTypeFind * tf, gpointer private) { -- 2.7.4