From ef52345be99b0ba556d27f37677a94ef9fc4741c Mon Sep 17 00:00:00 2001 From: David Colburn Date: Tue, 29 Aug 2023 15:24:17 -0700 Subject: [PATCH] add comment, remove _ --- gst/cgo_exports.go | 4 ++-- gst/gst_debug.go | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/cgo_exports.go b/gst/cgo_exports.go index df75ccc..3b4b9fe 100644 --- a/gst/cgo_exports.go +++ b/gst/cgo_exports.go @@ -245,14 +245,14 @@ func goGlobalPluginInit(plugin *C.GstPlugin) C.gboolean { //export goLogFunction func goLogFunction( - _ *C.GstDebugCategory, + category *C.GstDebugCategory, level C.GstDebugLevel, file *C.gchar, function *C.gchar, line C.gint, object *C.GObject, message *C.GstDebugMessage, - _ C.gpointer, + userData C.gpointer, ) { logFnMu.RLock() f := customLogFunction diff --git a/gst/gst_debug.go b/gst/gst_debug.go index c8bf2fe..c9b99f8 100644 --- a/gst/gst_debug.go +++ b/gst/gst_debug.go @@ -203,6 +203,8 @@ var ( customLogFunction LogFunction ) +// SetLogFunction is used to replace gstreamer's default logging function. +// Setting to nil will revert to the default logging function. func SetLogFunction(f LogFunction) { logFnMu.Lock() defer logFnMu.Unlock()