mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-06 14:32:31 +00:00
info: Warn if logging with a non-GObject object if GST_ENABLE_EXTRA_CHECKS is enabled
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/712>
This commit is contained in:
parent
7c0dcb91fc
commit
b72f379948
1 changed files with 12 additions and 0 deletions
|
@ -530,6 +530,10 @@ gst_debug_log_valist (GstDebugCategory * category, GstDebugLevel level,
|
|||
|
||||
g_return_if_fail (category != NULL);
|
||||
|
||||
#ifdef GST_ENABLE_EXTRA_CHECKS
|
||||
g_warn_if_fail (object == NULL || G_IS_OBJECT (object));
|
||||
#endif
|
||||
|
||||
if (level > gst_debug_category_get_threshold (category))
|
||||
return;
|
||||
|
||||
|
@ -1164,6 +1168,10 @@ gst_debug_log_get_line (GstDebugCategory * category, GstDebugLevel level,
|
|||
gchar *ret, *obj_str = NULL;
|
||||
const gchar *message_str;
|
||||
|
||||
#ifdef GST_ENABLE_EXTRA_CHECKS
|
||||
g_warn_if_fail (object == NULL || G_IS_OBJECT (object));
|
||||
#endif
|
||||
|
||||
_gst_debug_log_preamble (message, object, &file, &message_str, &obj_str,
|
||||
&elapsed);
|
||||
|
||||
|
@ -1258,6 +1266,10 @@ gst_debug_log_default (GstDebugCategory * category, GstDebugLevel level,
|
|||
} G_STMT_END
|
||||
#endif
|
||||
|
||||
#ifdef GST_ENABLE_EXTRA_CHECKS
|
||||
g_warn_if_fail (object == NULL || G_IS_OBJECT (object));
|
||||
#endif
|
||||
|
||||
_gst_debug_log_preamble (message, object, &file, &message_str, &obj,
|
||||
&elapsed);
|
||||
|
||||
|
|
Loading…
Reference in a new issue