Commit e5ca4723 authored by Stefan Sauer's avatar Stefan Sauer
Browse files

configure: add a new option to disable the tracer hooks

This was previously done via {enable,disable}-gst-debug. Since both subsystems
are independent having separate options is better.
parent 01ba6d40
...@@ -87,6 +87,8 @@ dnl subsystems - can influence other decisions so needs to be high up ...@@ -87,6 +87,8 @@ dnl subsystems - can influence other decisions so needs to be high up
dnl we need to AM_CONDITIONAL them here for automake 1.6.x compatibility dnl we need to AM_CONDITIONAL them here for automake 1.6.x compatibility
AG_GST_CHECK_SUBSYSTEM_DISABLE(GST_DEBUG,[debugging subsystem]) AG_GST_CHECK_SUBSYSTEM_DISABLE(GST_DEBUG,[debugging subsystem])
AM_CONDITIONAL(GST_DISABLE_GST_DEBUG, test "x$GST_DISABLE_GST_DEBUG" = "xyes") 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")
AG_GST_CHECK_SUBSYSTEM_DISABLE(PARSE,[command-line parser]) AG_GST_CHECK_SUBSYSTEM_DISABLE(PARSE,[command-line parser])
AM_CONDITIONAL(GST_DISABLE_PARSE, test "x$GST_DISABLE_PARSE" = "xyes") AM_CONDITIONAL(GST_DISABLE_PARSE, test "x$GST_DISABLE_PARSE" = "xyes")
if test "x$GST_DISABLE_PARSE" = xyes; then if test "x$GST_DISABLE_PARSE" = xyes; then
...@@ -99,7 +101,7 @@ if test "x$GST_DISABLE_OPTION_PARSING" = xyes; then ...@@ -99,7 +101,7 @@ if test "x$GST_DISABLE_OPTION_PARSING" = xyes; then
AC_DEFINE(GST_DISABLE_OPTION_PARSING, 1, AC_DEFINE(GST_DISABLE_OPTION_PARSING, 1,
[Define if option parsing is disabled]) [Define if option parsing is disabled])
fi fi
AG_GST_CHECK_SUBSYSTEM_DISABLE(TRACE,[tracing subsystem]) AG_GST_CHECK_SUBSYSTEM_DISABLE(TRACE,[historic tracing subsystem])
AM_CONDITIONAL(GST_DISABLE_TRACE, test "x$GST_DISABLE_TRACE" = "xyes") AM_CONDITIONAL(GST_DISABLE_TRACE, test "x$GST_DISABLE_TRACE" = "xyes")
AG_GST_CHECK_SUBSYSTEM_DISABLE(ALLOC_TRACE,[allocation tracing]) AG_GST_CHECK_SUBSYSTEM_DISABLE(ALLOC_TRACE,[allocation tracing])
AM_CONDITIONAL(GST_DISABLE_ALLOC_TRACE, test "x$GST_DISABLE_ALLOC_TRACE" = "xyes") AM_CONDITIONAL(GST_DISABLE_ALLOC_TRACE, test "x$GST_DISABLE_ALLOC_TRACE" = "xyes")
...@@ -824,7 +826,7 @@ AC_ARG_WITH([memory-alignment], ...@@ -824,7 +826,7 @@ AC_ARG_WITH([memory-alignment],
esac esac
fi fi
], [ ], [
AC_DEFINE(MEMORY_ALIGNMENT_MALLOC, 1, [Memory alignment by malloc default]) AC_DEFINE(MEMORY_ALIGNMENT_MALLOC, 1, [Memory alignment by malloc default])
] ]
) )
...@@ -1084,6 +1086,7 @@ AC_OUTPUT ...@@ -1084,6 +1086,7 @@ AC_OUTPUT
dnl negate for output dnl negate for output
if test "x${GST_DISABLE_GST_DEBUG}" = "xno"; then enable_gst_debug="yes"; fi if test "x${GST_DISABLE_GST_DEBUG}" = "xno"; then enable_gst_debug="yes"; fi
if test "x${GST_DISABLE_GST_TRACER_HOOKS}" = "xno"; then enable_gst_tracer_hooks="yes"; fi
if test "x${GST_DISABLE_PARSE}" = "xno"; then enable_parse="yes"; fi if test "x${GST_DISABLE_PARSE}" = "xno"; then enable_parse="yes"; fi
if test "x${GST_DISABLE_OPTION_PARSING}" = "xno"; then enable_option_parsing="yes"; fi if test "x${GST_DISABLE_OPTION_PARSING}" = "xno"; then enable_option_parsing="yes"; fi
if test "x${GST_DISABLE_TRACE}" = "xno"; then enable_trace="yes"; fi if test "x${GST_DISABLE_TRACE}" = "xno"; then enable_trace="yes"; fi
...@@ -1104,10 +1107,11 @@ Configuration ...@@ -1104,10 +1107,11 @@ Configuration
Documentation (manuals) : ${enable_docbook} Documentation (manuals) : ${enable_docbook}
Documentation (API) : ${enable_gtk_doc} Documentation (API) : ${enable_gtk_doc}
Debug Logging : ${enable_gst_debug} Debug logging : ${enable_gst_debug}
Tracing subsystem hooks : ${enable_gst_tracer_hooks}
Command-line parser : ${enable_parse} Command-line parser : ${enable_parse}
Option parsing in gst_init : ${enable_option_parsing} Option parsing in gst_init : ${enable_option_parsing}
Tracing subsystem : ${enable_trace} Historic tracing subsystem : ${enable_trace}
Allocation tracing : ${enable_alloc_trace} Allocation tracing : ${enable_alloc_trace}
Plugin registry : ${enable_registry} Plugin registry : ${enable_registry}
Plugin support : ${enable_plugin} Plugin support : ${enable_plugin}
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
G_BEGIN_DECLS G_BEGIN_DECLS
#ifndef GST_DISABLE_GST_DEBUG #ifndef GST_DISABLE_GST_TRACER_HOOKS
/* tracing hooks */ /* tracing hooks */
...@@ -86,7 +86,7 @@ typedef struct { ...@@ -86,7 +86,7 @@ typedef struct {
extern gboolean _priv_tracer_enabled; extern gboolean _priv_tracer_enabled;
/* key are hook-id quarks, values are GstTracerHook */ /* key are hook-id quarks, values are GstTracerHook */
extern GHashTable *_priv_tracers; extern GHashTable *_priv_tracers;
#define GST_TRACER_IS_ENABLED (_priv_tracer_enabled) #define GST_TRACER_IS_ENABLED (_priv_tracer_enabled)
...@@ -114,35 +114,35 @@ extern GHashTable *_priv_tracers; ...@@ -114,35 +114,35 @@ extern GHashTable *_priv_tracers;
} \ } \
}G_STMT_END }G_STMT_END
typedef void (*GstTracerHookPadPushPre) (GObject *, GstClockTime, GstPad *, typedef void (*GstTracerHookPadPushPre) (GObject *, GstClockTime, GstPad *,
GstBuffer *); GstBuffer *);
#define GST_TRACER_PAD_PUSH_PRE(pad, buffer) G_STMT_START{ \ #define GST_TRACER_PAD_PUSH_PRE(pad, buffer) G_STMT_START{ \
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_PRE), \ GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_PRE), \
GstTracerHookPadPushPre, (GST_TRACER_ARGS, pad, buffer)); \ GstTracerHookPadPushPre, (GST_TRACER_ARGS, pad, buffer)); \
}G_STMT_END }G_STMT_END
typedef void (*GstTracerHookPadPushPost) (GObject *, GstClockTime, GstPad *, typedef void (*GstTracerHookPadPushPost) (GObject *, GstClockTime, GstPad *,
GstFlowReturn); GstFlowReturn);
#define GST_TRACER_PAD_PUSH_POST(pad, res) G_STMT_START{ \ #define GST_TRACER_PAD_PUSH_POST(pad, res) G_STMT_START{ \
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_POST), \ GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_POST), \
GstTracerHookPadPushPost, (GST_TRACER_ARGS, pad, res)); \ GstTracerHookPadPushPost, (GST_TRACER_ARGS, pad, res)); \
}G_STMT_END }G_STMT_END
typedef void (*GstTracerHookPadPushListPre) (GObject *, GstClockTime, GstPad *, typedef void (*GstTracerHookPadPushListPre) (GObject *, GstClockTime, GstPad *,
GstBufferList *); GstBufferList *);
#define GST_TRACER_PAD_PUSH_LIST_PRE(pad, list) G_STMT_START{ \ #define GST_TRACER_PAD_PUSH_LIST_PRE(pad, list) G_STMT_START{ \
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_LIST_PRE), \ GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_LIST_PRE), \
GstTracerHookPadPushListPre, (GST_TRACER_ARGS, pad, list)); \ GstTracerHookPadPushListPre, (GST_TRACER_ARGS, pad, list)); \
}G_STMT_END }G_STMT_END
typedef void (*GstTracerHookPadPushListPost) (GObject *, GstClockTime, GstPad *, typedef void (*GstTracerHookPadPushListPost) (GObject *, GstClockTime, GstPad *,
GstFlowReturn); GstFlowReturn);
#define GST_TRACER_PAD_PUSH_LIST_POST(pad, res) G_STMT_START{ \ #define GST_TRACER_PAD_PUSH_LIST_POST(pad, res) G_STMT_START{ \
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_LIST_POST), \ GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_LIST_POST), \
GstTracerHookPadPushListPost, (GST_TRACER_ARGS, pad, res)); \ GstTracerHookPadPushListPost, (GST_TRACER_ARGS, pad, res)); \
}G_STMT_END }G_STMT_END
typedef void (*GstTracerHookPadPullRangePre) (GObject *, GstClockTime, GstPad *, typedef void (*GstTracerHookPadPullRangePre) (GObject *, GstClockTime, GstPad *,
guint64, guint); guint64, guint);
#define GST_TRACER_PAD_PULL_RANGE_PRE(pad, offset, size) G_STMT_START{ \ #define GST_TRACER_PAD_PULL_RANGE_PRE(pad, offset, size) G_STMT_START{ \
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PULL_RANGE_PRE), \ GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PULL_RANGE_PRE), \
...@@ -156,14 +156,14 @@ typedef void (*GstTracerHookPadPullRangePost) (GObject *, GstClockTime, ...@@ -156,14 +156,14 @@ typedef void (*GstTracerHookPadPullRangePost) (GObject *, GstClockTime,
GstTracerHookPadPullRangePost, (GST_TRACER_ARGS, pad, buffer, res)); \ GstTracerHookPadPullRangePost, (GST_TRACER_ARGS, pad, buffer, res)); \
}G_STMT_END }G_STMT_END
typedef void (*GstTracerHookPadPushEventPre) (GObject *, GstClockTime, GstPad *, typedef void (*GstTracerHookPadPushEventPre) (GObject *, GstClockTime, GstPad *,
GstEvent *); GstEvent *);
#define GST_TRACER_PAD_PUSH_EVENT_PRE(pad, event) G_STMT_START{ \ #define GST_TRACER_PAD_PUSH_EVENT_PRE(pad, event) G_STMT_START{ \
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_EVENT_PRE), \ GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_EVENT_PRE), \
GstTracerHookPadPushEventPre, (GST_TRACER_ARGS, pad, event)); \ GstTracerHookPadPushEventPre, (GST_TRACER_ARGS, pad, event)); \
}G_STMT_END }G_STMT_END
typedef void (*GstTracerHookPadPushEventPost) (GObject *, GstClockTime, typedef void (*GstTracerHookPadPushEventPost) (GObject *, GstClockTime,
GstPad *, gboolean); GstPad *, gboolean);
#define GST_TRACER_PAD_PUSH_EVENT_POST(pad, res) G_STMT_START{ \ #define GST_TRACER_PAD_PUSH_EVENT_POST(pad, res) G_STMT_START{ \
GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_EVENT_POST), \ GST_TRACER_DISPATCH(GST_TRACER_QUARK(HOOK_PAD_PUSH_EVENT_POST), \
...@@ -303,7 +303,7 @@ typedef void (*GstTracerHookPadUnlinkPost) (GObject *, GstClockTime, ...@@ -303,7 +303,7 @@ typedef void (*GstTracerHookPadUnlinkPost) (GObject *, GstClockTime,
GstTracerHookPadUnlinkPost, (GST_TRACER_ARGS, srcpad, sinkpad, result)); \ GstTracerHookPadUnlinkPost, (GST_TRACER_ARGS, srcpad, sinkpad, result)); \
}G_STMT_END }G_STMT_END
#else /* !GST_DISABLE_GST_DEBUG */ #else /* !GST_DISABLE_GST_TRACER_HOOKS */
#define GST_TRACER_PAD_PUSH_PRE(pad, buffer) #define GST_TRACER_PAD_PUSH_PRE(pad, buffer)
#define GST_TRACER_PAD_PUSH_POST(pad, res) #define GST_TRACER_PAD_PUSH_POST(pad, res)
...@@ -333,7 +333,7 @@ typedef void (*GstTracerHookPadUnlinkPost) (GObject *, GstClockTime, ...@@ -333,7 +333,7 @@ typedef void (*GstTracerHookPadUnlinkPost) (GObject *, GstClockTime,
#define GST_TRACER_PAD_UNLINK_PRE(srcpad, sinkpad) #define GST_TRACER_PAD_UNLINK_PRE(srcpad, sinkpad)
#define GST_TRACER_PAD_UNLINK_POST(srcpad, sinkpad, res) #define GST_TRACER_PAD_UNLINK_POST(srcpad, sinkpad, res)
#endif /* GST_DISABLE_GST_DEBUG */ #endif /* GST_DISABLE_GST_TRACER_HOOKS */
G_END_DECLS G_END_DECLS
......
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