* Gets the string representation of a #GstDebugMessage. This function is used
* in debug handlers to extract the message.
*
- * Returns: the string representation of a #GstDebugMessage.
+ * Returns: (nullable): the string representation of a #GstDebugMessage.
*/
const gchar *
gst_debug_message_get (GstDebugMessage * message)
return (GstDebugLevel) g_atomic_int_get (&__default_level);
}
+static gboolean
+gst_debug_apply_entry (GstDebugCategory * cat, LevelNameEntry * entry)
+{
+ if (!g_pattern_match_string (entry->pat, cat->name))
+ return FALSE;
+
+ if (gst_is_initialized ())
+ GST_LOG ("category %s matches pattern %p - gets set to level %d",
+ cat->name, entry->pat, entry->level);
+
+ gst_debug_category_set_threshold (cat, entry->level);
+ return TRUE;
+}
+
static void
gst_debug_reset_threshold (gpointer category, gpointer unused)
{
LevelNameEntry *entry = walk->data;
walk = g_slist_next (walk);
- if (g_pattern_match_string (entry->pat, cat->name)) {
- if (gst_is_initialized ())
- GST_LOG ("category %s matches pattern %p - gets set to level %d",
- cat->name, entry->pat, entry->level);
- gst_debug_category_set_threshold (cat, entry->level);
+ if (gst_debug_apply_entry (cat, entry))
goto exit;
- }
}
gst_debug_category_set_threshold (cat, gst_debug_get_default_threshold ());
GstDebugCategory *cat = (GstDebugCategory *) data;
LevelNameEntry *entry = (LevelNameEntry *) user_data;
- if (g_pattern_match_string (entry->pat, cat->name)) {
- if (gst_is_initialized ())
- GST_TRACE ("category %s matches pattern %p - gets set to level %d",
- cat->name, entry->pat, entry->level);
- gst_debug_category_set_threshold (cat, entry->level);
- }
+ gst_debug_apply_entry (cat, entry);
}
/**
g_assert (list);
if (reset)
- gst_debug_set_default_threshold (0);
+ gst_debug_set_default_threshold (GST_LEVEL_DEFAULT);
split = g_strsplit (list, ",", 0);
*
* Free with g_free().
*
- * Returns: a newly allocated null terminated string or %NULL on any error
+ * Returns: (nullable): a newly allocated null terminated string or %NULL on any error
*
* Since: 1.8
*/
*
* Free with g_free().
*
- * Returns: a newly allocated null terminated string or %NULL on any error
+ * Returns: (nullable): a newly allocated null terminated string or %NULL on any error
*
* Since: 1.8
*/
* @flags: A set of #GstStackTraceFlags to determine how the stack
* trace should look like. Pass 0 to retrieve a minimal backtrace.
*
- * If libunwind or glibc backtrace are present, a stack trace
- * is returned.
+ * Returns: (nullable): a stack trace, if libunwind or glibc backtrace are
+ * present, else %NULL.
*
* Since: 1.12
*/