Revert "gstinfo: Check threshold for category from macro"

This reverts commit dcece2a878.

This increased the code size and number of branches for all debug statements.

Fixes #564

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/563>
This commit is contained in:
Edward Hervey 2020-07-13 08:00:15 +02:00 committed by Edward Hervey
parent bb22b7d79c
commit cecb291263

View file

@ -677,8 +677,7 @@ GST_API GstDebugLevel _gst_debug_min;
*/
#ifdef G_HAVE_ISO_VARARGS
#define GST_CAT_LEVEL_LOG(cat,level,object,...) G_STMT_START{ \
if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) <= _gst_debug_min \
&& (level) <= gst_debug_category_get_threshold (cat))) { \
if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) <= _gst_debug_min)) { \
gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
(GObject *) (object), __VA_ARGS__); \
} \
@ -686,8 +685,7 @@ GST_API GstDebugLevel _gst_debug_min;
#else /* G_HAVE_GNUC_VARARGS */
#ifdef G_HAVE_GNUC_VARARGS
#define GST_CAT_LEVEL_LOG(cat,level,object,args...) G_STMT_START{ \
if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) <= _gst_debug_min \
&& (level) <= gst_debug_category_get_threshold (cat))) { \
if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) <= _gst_debug_min)) { \
gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
(GObject *) (object), ##args ); \
} \
@ -697,8 +695,7 @@ static inline void
GST_CAT_LEVEL_LOG_valist (GstDebugCategory * cat,
GstDebugLevel level, gpointer object, const char *format, va_list varargs)
{
if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) <= _gst_debug_min
&& (level) <= gst_debug_category_get_threshold (cat))) {
if (G_UNLIKELY ((level) <= GST_LEVEL_MAX && (level) <= _gst_debug_min)) {
gst_debug_log_valist (cat, level, "", "", 0, (GObject *) object, format,
varargs);
}