[0.11] gstreamer: info: rename __gst_debug_* to _gst_debug_* and fix symbol export regexp
Tim Müller
tpm at kemper.freedesktop.org
Sat Oct 8 12:57:41 PDT 2011
Module: gstreamer
Branch: 0.11
Commit: 5df82c88c96398c04d94112ebd4aca4853017946
URL: http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=5df82c88c96398c04d94112ebd4aca4853017946
Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date: Sat Oct 8 13:37:09 2011 +0100
info: rename __gst_debug_* to _gst_debug_* and fix symbol export regexp
Only export GStreamer symbols with one leading underscore, not two
or more leading underscores.
Requires a rebuild of the entire stack, sorry.
---
configure.ac | 2 +-
gst/gstinfo.c | 18 +++++++++---------
gst/gstinfo.h | 14 +++++++-------
gst/gstobject.c | 2 +-
win32/common/libgstreamer.def | 4 ++--
5 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/configure.ac b/configure.ac
index 96ee22b..1be2af9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -680,7 +680,7 @@ AC_SUBST(GST_ALL_LDFLAGS)
dnl GST_LIB_LDFLAGS
dnl linker flags shared by all libraries
dnl LDFLAGS modifier defining exported symbols from built libraries
-GST_LIB_LDFLAGS="-export-symbols-regex \^[_]*\(gst_\|Gst\|GST_\).*"
+GST_LIB_LDFLAGS="-export-symbols-regex \^[_]?\(gst_\|Gst\|GST_\).*"
AC_SUBST(GST_LIB_LDFLAGS)
dnl GST_OBJ_*
diff --git a/gst/gstinfo.c b/gst/gstinfo.c
index 78ec63e..9acf482 100644
--- a/gst/gstinfo.c
+++ b/gst/gstinfo.c
@@ -133,8 +133,8 @@
/* disabled by default, as soon as some threshold is set > NONE,
* it becomes enabled. */
-gboolean __gst_debug_enabled = FALSE;
-GstDebugLevel __gst_debug_min = GST_LEVEL_NONE;
+gboolean _gst_debug_enabled = FALSE;
+GstDebugLevel _gst_debug_min = GST_LEVEL_NONE;
GstDebugCategory *GST_CAT_DEFAULT = NULL;
@@ -1231,11 +1231,11 @@ gst_debug_is_colored (void)
void
gst_debug_set_active (gboolean active)
{
- __gst_debug_enabled = active;
+ _gst_debug_enabled = active;
if (active)
- __gst_debug_min = GST_LEVEL_COUNT;
+ _gst_debug_min = GST_LEVEL_COUNT;
else
- __gst_debug_min = GST_LEVEL_NONE;
+ _gst_debug_min = GST_LEVEL_NONE;
}
/**
@@ -1248,7 +1248,7 @@ gst_debug_set_active (gboolean active)
gboolean
gst_debug_is_active (void)
{
- return __gst_debug_enabled;
+ return _gst_debug_enabled;
}
/**
@@ -1457,9 +1457,9 @@ gst_debug_category_set_threshold (GstDebugCategory * category,
{
g_return_if_fail (category != NULL);
- if (level > __gst_debug_min) {
- __gst_debug_enabled = TRUE;
- __gst_debug_min = level;
+ if (level > _gst_debug_min) {
+ _gst_debug_enabled = TRUE;
+ _gst_debug_min = level;
}
g_atomic_int_set (&category->threshold, level);
diff --git a/gst/gstinfo.h b/gst/gstinfo.h
index f841cd7..32bf32e 100644
--- a/gst/gstinfo.h
+++ b/gst/gstinfo.h
@@ -490,11 +490,11 @@ G_STMT_START{ \
*/
GST_EXPORT GstDebugCategory * GST_CAT_DEFAULT;
/* this symbol may not be used */
-extern gboolean __gst_debug_enabled;
+extern gboolean _gst_debug_enabled;
/* since 0.10.7, the min debug level, used for quickly discarding debug
* messages that fall under the threshold. */
-GST_EXPORT GstDebugLevel __gst_debug_min;
+GST_EXPORT GstDebugLevel _gst_debug_min;
/**
* GST_CAT_LEVEL_LOG:
@@ -509,7 +509,7 @@ GST_EXPORT 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_debug_min)) { \
+ if (G_UNLIKELY (level <= _gst_debug_min)) { \
gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
(GObject *) (object), __VA_ARGS__); \
} \
@@ -517,7 +517,7 @@ GST_EXPORT 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_debug_min)) { \
+ if (G_UNLIKELY (level <= _gst_debug_min)) { \
gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
(GObject *) (object), ##args ); \
} \
@@ -527,7 +527,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_debug_min)) {
+ if (G_UNLIKELY (level <= _gst_debug_min)) {
gst_debug_log_valist (cat, level, "", "", 0, (GObject *) object, format,
varargs);
}
@@ -550,7 +550,7 @@ GST_CAT_LEVEL_LOG (GstDebugCategory * cat, GstDebugLevel level,
* other macros and hence in a separate block right here. Docs chunks are
* with the other doc chunks below though. */
#define __GST_CAT_MEMDUMP_LOG(cat,object,msg,data,length) G_STMT_START{ \
- if (G_UNLIKELY (GST_LEVEL_MEMDUMP <= __gst_debug_min)) { \
+ if (G_UNLIKELY (GST_LEVEL_MEMDUMP <= _gst_debug_min)) { \
_gst_debug_dump_mem ((cat), __FILE__, GST_FUNCTION, __LINE__, \
(GObject *) (object), (msg), (data), (length)); \
} \
@@ -1260,7 +1260,7 @@ GST_TRACE (const char *format, ...)
# pragma GCC poison _gst_debug_category_new
#endif
-#define __gst_debug_min GST_LEVEL_NONE
+#define _gst_debug_min GST_LEVEL_NONE
#define _gst_debug_init() G_STMT_START{ }G_STMT_END
diff --git a/gst/gstobject.c b/gst/gstobject.c
index 50c4c25..c12747a 100644
--- a/gst/gstobject.c
+++ b/gst/gstobject.c
@@ -416,7 +416,7 @@ gst_object_dispatch_properties_changed (GObject * object,
gst_object = GST_OBJECT_CAST (object);
#ifndef GST_DISABLE_GST_DEBUG
- if (G_UNLIKELY (__gst_debug_min >= GST_LEVEL_LOG)) {
+ if (G_UNLIKELY (_gst_debug_min >= GST_LEVEL_LOG)) {
name = gst_object_get_name (gst_object);
debug_name = GST_STR_NULL (name);
} else
diff --git a/win32/common/libgstreamer.def b/win32/common/libgstreamer.def
index aceee7e..8b593b9 100644
--- a/win32/common/libgstreamer.def
+++ b/win32/common/libgstreamer.def
@@ -30,8 +30,6 @@ EXPORTS
GST_CAT_SIGNAL DATA
GST_CAT_STATES DATA
GST_CAT_TYPES DATA
- __gst_debug_enabled DATA
- __gst_debug_min DATA
_gst_alloc_trace_register
_gst_buffer_list_type DATA
_gst_buffer_type DATA
@@ -40,7 +38,9 @@ EXPORTS
_gst_debug_bin_to_dot_file_with_ts
_gst_debug_category_new
_gst_debug_dump_mem
+ _gst_debug_enabled DATA
_gst_debug_get_category
+ _gst_debug_min DATA
_gst_debug_nameof_funcptr
_gst_debug_register_funcptr
_gst_disable_registry_cache DATA
More information about the gstreamer-commits
mailing list