After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783520 - Removing default debug/log function doesn't work in python
Removing default debug/log function doesn't work in python
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: dont know
1.4.4
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-07 17:02 UTC by Jan Spurny
Modified: 2017-12-01 00:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jan Spurny 2017-06-07 17:02:48 UTC
In python Gst documentation (https://lazka.github.io/pgi-docs/Gst-1.0/functions.html#Gst.debug_log_default) is a line which says:

 "You can add other handlers by using Gst.debug_add_log_function(). And you can remove this handler by calling Gst.debug_remove_log_function(Gst.debug_log_default);"

This however does nothing (returns 0).

What works, is using:

    Gst.debug_remove_log_function_by_data(0)

despite the documentation (https://lazka.github.io/pgi-docs/Gst-1.0/functions.html#Gst.debug_remove_log_function_by_data), which says:

 "Parameters:	func (Gst.LogFunction or None) – the log function to remove, or None to remove the default log function"

But "None" throws: "TypeError: Argument 0 does not allow None as a value"
Comment 1 Tim-Philipp Müller 2017-06-08 10:39:57 UTC
Those pgi-docs are not provided by us.

So you're saying that this

  Gst.debug_remove_log_function(None)

does not work for you, right?


It seems to work for me:

python
>>> import gi
>>> gi.require_version('Gst', '1.0')
>>> from gi.repository import GObject, Gst
>>> Gst.debug_remove_log_function(None)
1L
>>> Gst.version()
(major=1L, minor=10L, micro=4L, nano=0L)
Comment 2 Tim-Philipp Müller 2017-12-01 00:24:49 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!