GstInfo: Gst._debug_remove_log_function not working for user generated log functions Python
Describe your issue
When trying to remove a user log function using the Python bindings, I always get 0 as a result of Gst.debug_remove_log_function() Test code
import gi
gi.require_version("GLib", "2.0")
gi.require_version("GObject", "2.0")
gi.require_version("Gst", "1.0")
from gi.repository import Gst, GLib
Gst.init(None)
def custom_log_function(category, level, file, function, line, obj, message, user_data: LogFile):
Some Code
Gst.debug_remove_log_function(None)
#Outputs 1 as expected (removing default log function)
Gst.debug_add_log_function(custom_log_function, None)
Gst.debug_remove_log_function(custom_log_function)
#Outputs 0, (custom_log_function doesn't get removed)
Expected Behavior
Gst.debug_remove_log_function(custom_log_function) should return 1
Observed Behavior
Gst.debug_remove_log_function(custom_log_function) returns 0
Setup
- Operating System: Ubuntu 22.04
- Device: Computer
- GStreamer Version: 1.0
- Command line:
Steps to reproduce the bug
- register a custom log function with Gst.debug_add_log_function(custom_log_function, None)
- remove it with Gst.debug_remove_log_function(custom_log_function)
How reproducible is the bug?
Always
Additional Information
I also tried removing it with user_data and it had the same effect