From c491702400b653a86bf3fd0e25392361c9d88df8 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt Date: Tue, 18 Jul 2006 09:42:31 +0000 Subject: [PATCH] gst/: The attached patch adds two missing defines to gsttrace.h when tracing is disabled. It also corrects one exist... Original commit message from CVS: Patch by: Peter Kjellerstedt * gst/Makefile.am: * gst/gsttrace.h: The attached patch adds two missing defines to gsttrace.h when tracing is disabled. It also corrects one existing define. Fixes #347756. --- ChangeLog | 10 ++++++++ gst/Makefile.am | 7 ++---- gst/gsttrace.h | 66 +++++++++++++++++++++++++------------------------ 3 files changed, 46 insertions(+), 37 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7b37a20784..9ee6b6c55d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2006-07-18 Wim Taymans + + Patch by: Peter Kjellerstedt + + * gst/Makefile.am: + * gst/gsttrace.h: + The attached patch adds two missing defines to gsttrace.h when tracing + is disabled. It also corrects one existing define. + Fixes #347756. + 2006-07-17 Wim Taymans * docs/gst/gstreamer-sections.txt: diff --git a/gst/Makefile.am b/gst/Makefile.am index 8ab3ff0316..8e1c136212 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -26,10 +26,8 @@ endif if GST_DISABLE_TRACE GST_TRACE_SRC = -GST_TRACE_H = else GST_TRACE_SRC = gsttrace.c -GST_TRACE_H = gsttrace.h endif if GST_DISABLE_ENUMTYPES @@ -188,7 +186,7 @@ gst_headers = \ gsttaglist.h \ gsttagsetter.h \ gsttask.h \ - $(GST_TRACE_H) \ + gsttrace.h \ gsttypefind.h \ gsttypefindfactory.h \ gsturi.h \ @@ -203,8 +201,7 @@ nodist_libgstreamer_@GST_MAJORMINOR@include_HEADERS = \ $(built_header_configure) $(built_header_make) EXTRA_DIST = \ - gstparse.h \ - gsttrace.h + gstparse.h noinst_HEADERS = \ gettext.h \ diff --git a/gst/gsttrace.h b/gst/gsttrace.h index 91dab2f0d7..45b5b07000 100644 --- a/gst/gsttrace.h +++ b/gst/gsttrace.h @@ -28,6 +28,37 @@ G_BEGIN_DECLS +/** + * GstAllocTraceFlags: + * @GST_ALLOC_TRACE_LIVE: Trace number of non-freed memory + * @GST_ALLOC_TRACE_MEM_LIVE: trace pointers of unfreed memory + * + * Flags indicating which tracing feature to enable. + */ +typedef enum { + GST_ALLOC_TRACE_LIVE = (1 << 0), + GST_ALLOC_TRACE_MEM_LIVE = (1 << 1) +} GstAllocTraceFlags; + +typedef struct _GstAllocTrace GstAllocTrace; + +/** + * GstAllocTrace: + * @name: The name of the tracing object + * @flags: Flags for this object + * @live: counter for live memory + * @mem_live: list with pointers to unfreed memory + * + * The main tracing object + */ +struct _GstAllocTrace { + gchar *name; + gint flags; + + gint live; + GSList *mem_live; +}; + #ifndef GST_DISABLE_TRACE typedef struct _GstTrace GstTrace; @@ -93,37 +124,6 @@ void _gst_trace_add_entry (GstTrace *trace, guint32 seq, void gst_trace_read_tsc (gint64 *dst); -/** - * GstAllocTraceFlags: - * @GST_ALLOC_TRACE_LIVE: Trace number of non-freed memory - * @GST_ALLOC_TRACE_MEM_LIVE: trace pointers of unfreed memory - * - * Flags indicating which tracing feature to enable. - */ -typedef enum { - GST_ALLOC_TRACE_LIVE = (1 << 0), - GST_ALLOC_TRACE_MEM_LIVE = (1 << 1) -} GstAllocTraceFlags; - -typedef struct _GstAllocTrace GstAllocTrace; - -/** - * GstAllocTrace: - * @name: The name of the tracing object - * @flags: Flags for this object - * @live: counter for live memory - * @mem_live: list with pointers to unfreed memory - * - * The main tracing object - */ -struct _GstAllocTrace { - gchar *name; - gint flags; - - gint live; - GSList *mem_live; -}; - gboolean gst_alloc_trace_available (void); G_CONST_RETURN GList* gst_alloc_trace_list (void); GstAllocTrace* _gst_alloc_trace_register (const gchar *name); @@ -218,7 +218,7 @@ extern gint _gst_trace_on; #pragma GCC poison gst_trace_add_entry #endif -#define gst_alloc_trace_register(name) +#define gst_alloc_trace_register(name) (NULL) #define gst_alloc_trace_new(trace, mem) #define gst_alloc_trace_free(trace, mem) @@ -226,7 +226,9 @@ extern gint _gst_trace_on; #define gst_alloc_trace_list() (NULL) #define _gst_alloc_trace_register(name) (NULL) +#define gst_alloc_trace_live_all() (0) #define gst_alloc_trace_print_all() +#define gst_alloc_trace_print_live() #define gst_alloc_trace_set_flags_all(flags) #define gst_alloc_trace_get(name) (NULL)