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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/972>
This commit is contained in:
Edward Hervey 2020-12-11 11:40:22 +01:00
parent dff494977b
commit 030ccaedb5
4 changed files with 5 additions and 9 deletions

View file

@ -45,9 +45,6 @@
#include "gsttypefindfunctionsplugin.h" #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 /* DataScanCtx: helper for typefind functions that scan through data
* step-by-step, to avoid doing a peek at each and every offset */ * step-by-step, to avoid doing a peek at each and every offset */

View file

@ -30,14 +30,13 @@
#include <gst/gst.h> #include <gst/gst.h>
GST_DEBUG_CATEGORY_STATIC (type_find_debug); GST_DEBUG_CATEGORY (type_find_functions_debug);
#define GST_CAT_DEFAULT type_find_debug
static gboolean static gboolean
plugin_init (GstPlugin * plugin) plugin_init (GstPlugin * plugin)
{ {
/* can't initialize this via a struct as caps can't be statically initialized */ /* 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"); GST_DEBUG_FG_GREEN | GST_DEBUG_BG_RED, "generic type find functions");
/* note: asx/wax/wmx are XML files, asf doesn't handle them */ /* note: asx/wax/wmx are XML files, asf doesn't handle them */
/* must use strings, macros don't accept initializers */ /* must use strings, macros don't accept initializers */

View file

@ -29,6 +29,9 @@
#include <gst/gst.h> #include <gst/gst.h>
GST_DEBUG_CATEGORY_EXTERN (type_find_functions_debug);
#define GST_CAT_DEFAULT type_find_functions_debug
/*** plugin initialization ***/ /*** plugin initialization ***/
/*RIFF type find declaration */ /*RIFF type find declaration */

View file

@ -33,9 +33,6 @@
#include "gsttypefindfunctionsplugin.h" #include "gsttypefindfunctionsplugin.h"
#include "gsttypefindfunctionsdata.h" #include "gsttypefindfunctionsdata.h"
GST_DEBUG_CATEGORY_STATIC (type_find_debug);
#define GST_CAT_DEFAULT type_find_debug
static void static void
start_with_type_find (GstTypeFind * tf, gpointer private) start_with_type_find (GstTypeFind * tf, gpointer private)
{ {