Commit 6577f5e9 authored by Mikhail Fludkov's avatar Mikhail Fludkov Committed by Tim-Philipp Müller

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.
parent eb9ac743
......@@ -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
......
......@@ -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 */
......@@ -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)
......
SUBDIRS = elements tracers
SUBDIRS = elements
DIST_SUBDIRS = elements tracers
if !GST_DISABLE_GST_TRACER_HOOKS
SUBDIRS += tracers
endif
DIST_SUBDIRS = elements tracers
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment