x264enc: Add the func/line info to the log callback
authorJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
Tue, 21 Sep 2021 12:57:29 +0000 (14:57 +0200)
committerJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
Tue, 21 Sep 2021 13:38:04 +0000 (15:38 +0200)
It looks awkward when it's missing. At least point us at the callback
function.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/merge_requests/85>

ext/x264/gstx264enc.c

index 6ace18f..d0e2479 100644 (file)
@@ -1255,8 +1255,11 @@ gst_x264_enc_log_callback (gpointer private, gint level, const char *format,
       break;
   }
 
-  gst_debug_log_valist (x264_enc_debug, gst_level, "", "", 0, object, format,
-      args);
+  if (G_LIKELY (gst_level > _gst_debug_min))
+    return;
+
+  gst_debug_log_valist (GST_CAT_DEFAULT, gst_level, __FILE__, GST_FUNCTION,
+      __LINE__, object, format, args);
 #endif /* GST_DISABLE_GST_DEBUG */
 }