mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 15:18:21 +00:00
gst/gstinfo.c: Disable debugging unless explicitly activated.
Original commit message from CVS: * gst/gstinfo.c: (gst_debug_set_active), (gst_debug_category_set_threshold): Disable debugging unless explicitly activated. Fixes #335480.
This commit is contained in:
parent
0e984d3026
commit
2c2fdbf7da
2 changed files with 18 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2006-03-22 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* gst/gstinfo.c: (gst_debug_set_active),
|
||||||
|
(gst_debug_category_set_threshold):
|
||||||
|
Disable debugging unless explicitly activated.
|
||||||
|
Fixes #335480.
|
||||||
|
|
||||||
2006-03-22 Wim Taymans <wim@fluendo.com>
|
2006-03-22 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst/gstelement.c: (gst_element_set_locked_state),
|
* gst/gstelement.c: (gst_element_set_locked_state),
|
||||||
|
|
|
@ -189,8 +189,10 @@ static GSList *__log_functions = NULL;
|
||||||
static gint __default_level;
|
static gint __default_level;
|
||||||
static gint __use_color;
|
static gint __use_color;
|
||||||
|
|
||||||
/* enabled by default */
|
/* disabled by default, as soon as some threshold is set > NONE,
|
||||||
gboolean __gst_debug_enabled = TRUE;
|
* it becomes enabled. */
|
||||||
|
gboolean __gst_debug_enabled = FALSE;
|
||||||
|
static gboolean __gst_debug_min = GST_LEVEL_NONE;
|
||||||
|
|
||||||
|
|
||||||
GstDebugCategory *GST_CAT_DEFAULT = NULL;
|
GstDebugCategory *GST_CAT_DEFAULT = NULL;
|
||||||
|
@ -793,6 +795,10 @@ void
|
||||||
gst_debug_set_active (gboolean active)
|
gst_debug_set_active (gboolean active)
|
||||||
{
|
{
|
||||||
__gst_debug_enabled = active;
|
__gst_debug_enabled = active;
|
||||||
|
if (active)
|
||||||
|
__gst_debug_min = GST_LEVEL_NONE;
|
||||||
|
else
|
||||||
|
__gst_debug_min = GST_LEVEL_COUNT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1008,6 +1014,9 @@ gst_debug_category_set_threshold (GstDebugCategory * category,
|
||||||
{
|
{
|
||||||
g_return_if_fail (category != NULL);
|
g_return_if_fail (category != NULL);
|
||||||
|
|
||||||
|
if (level > __gst_debug_min)
|
||||||
|
__gst_debug_enabled = TRUE;
|
||||||
|
|
||||||
gst_atomic_int_set (&category->threshold, level);
|
gst_atomic_int_set (&category->threshold, level);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue