[Bug 677917] g-i: annotate/expose logging system for bindings

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Oct 28 17:06:09 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=677917
  GStreamer | gstreamer (core) | git

Tim-Philipp Müller <t.i.m> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
            Version|0.11.x                      |git

--- Comment #1 from Tim-Philipp Müller <t.i.m at zen.co.uk> 2012-10-29 00:06:06 UTC ---
FWIW, there are some overrides in the gst-python module now:

 commit 93ab67c78b4b13918e2431617c88ea42c36b2920
 Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
 Date:   Thu Sep 27 14:41:29 2012 +0200

    overrides: provide for gst-python style debug logging

    Also provide a default debug category for the binding glue code.


(In reply to comment #0)
>
> Using the object Gst.debug_log_default() function causes a TypeError
> exception on python. 
> 
> Gst.debug_log_default(
>                           category = Gst.DebugCategory(), 
>                           level = Gst.DebugLevel.ERROR,
>                           file = 'gst-error.log',
>                           function = 'myfunction',
>                           line = '100',

You are passing a string here, it should be an integer (though maybe python
converts it automagically, I don't know.

>                           object = 'myobject',

You are passing a string here, it should be an object (perhaps try None
instead?)

>                           message = 'this is a error', 

This would be a GstDebugMessage structure, which I don't know if you can just
create it from python. Definitely not just a string. (The point of this
structure is to avoid constructing the string if it's not going to be used
because of some filter criterion.)

>                           unused = 0,
>                       )

It's a pointer, so None might work better ?

If the overrides aren't enough, we'd probably have to add a new function that
works better with bindings.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list