gsttraceutils: actually disable tracing system hooks if configured

`./configure --disable-gst-tracer-hooks` didn't do anything, hooks were
always enabled regardless of the option. It works correctly in the
Meson build though.
This commit is contained in:
Mikhail Fludkov 2017-11-10 16:26:50 +01:00 committed by Tim-Philipp Müller
parent eb9ac74362
commit 6577f5e91e
4 changed files with 28 additions and 2 deletions

View file

@ -89,6 +89,10 @@ AG_GST_CHECK_SUBSYSTEM_DISABLE(GST_DEBUG,[debugging subsystem])
AM_CONDITIONAL(GST_DISABLE_GST_DEBUG, test "x$GST_DISABLE_GST_DEBUG" = "xyes")
AG_GST_CHECK_SUBSYSTEM_DISABLE(GST_TRACER_HOOKS,[tracing subsystem hooks])
AM_CONDITIONAL(GST_DISABLE_GST_TRACER_HOOKS, test "x$GST_DISABLE_GST_TRACER_HOOKS" = "xyes")
if test "x$GST_DISABLE_GST_TRACER_HOOKS" = xyes; then
AC_DEFINE(GST_DISABLE_GST_TRACER_HOOKS, 1,
[Define if tracing subsystem hooks is disabled])
fi
AG_GST_CHECK_SUBSYSTEM_DISABLE(PARSE,[command-line parser])
AM_CONDITIONAL(GST_DISABLE_PARSE, test "x$GST_DISABLE_PARSE" = "xyes")
if test "x$GST_DISABLE_PARSE" = xyes; then

View file

@ -196,4 +196,12 @@ gst_tracing_register_hook (GstTracer * tracer, const gchar * detail,
gst_tracing_register_hook_id (tracer, g_quark_try_string (detail), func);
}
#else /* !GST_DISABLE_GST_TRACER_HOOKS */
void
gst_tracing_register_hook (GstTracer * tracer, const gchar * detail,
GCallback func)
{
}
#endif /* GST_DISABLE_GST_TRACER_HOOKS */

View file

@ -697,6 +697,17 @@ typedef void (*GstTracerHookObjectDestroyed) (GObject *self, GstClockTime ts,
#else /* !GST_DISABLE_GST_TRACER_HOOKS */
static inline void
_priv_gst_tracing_init (void)
{
GST_DEBUG ("Tracing hooks are disabled");
}
static inline void
_priv_gst_tracing_deinit (void)
{
}
#define GST_TRACER_PAD_PUSH_PRE(pad, buffer)
#define GST_TRACER_PAD_PUSH_POST(pad, res)
#define GST_TRACER_PAD_PUSH_LIST_PRE(pad, list)

View file

@ -1,4 +1,7 @@
SUBDIRS = elements tracers
SUBDIRS = elements
if !GST_DISABLE_GST_TRACER_HOOKS
SUBDIRS += tracers
endif
DIST_SUBDIRS = elements tracers