[Bug 677917] New: Gst.debug_log_default fails reporting incorrectly TypeError

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Jun 11 21:54:14 PDT 2012


https://bugzilla.gnome.org/show_bug.cgi?id=677917
  GStreamer | gst-plugins-base | 0.11.x

           Summary: Gst.debug_log_default fails reporting incorrectly
                    TypeError
    Classification: Platform
           Product: GStreamer
           Version: 0.11.x
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-base
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: shakaran at gmail.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


Using the object Gst.debug_log_default() function causes a TypeError exception
on python. I am using Ubuntu 12.10 with Gstreamer 0.11.91-2.

This is the exaple code:

#!/usr/bin/env python
# -*- coding: utf-8; tab-width: 4; mode: python -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-
# vi: set ft=python sts=4 ts=4 sw=4 noet 

import sys

import gi
try:
    gi.require_version('Gst', '1.0')
    from gi.repository import Gst
except ValueError:
    print 'Could not find required Gstreamer 1.0 library.'
    sys.exit(1)

# Setup GStreamer 
Gst.init(None)
Gst.init_check(None)
print Gst.version_string(), Gst.version()

Gst.debug_set_active(True) # If activated, debugging messages are sent to the
debugging handlers.

Gst.debug_log_default(
                          category = Gst.DebugCategory(), 
                          level = Gst.DebugLevel.ERROR,
                          file = 'gst-error.log',
                          function = 'myfunction',
                          line = '100',
                          object = 'myobject',
                          message = 'this is a error', 
                          unused = 0,
                      )

The unused param according to Gst-1.0.gif file is a gpointer:

        <parameter name="unused" transfer-ownership="none">
          <doc xml:whitespace="preserve">an unused variable, reserved for some
user_data.</doc>
          <type name="gpointer" c:type="gpointer"/>
        </parameter>

Running the example shows this traceback

GStreamer 1.0.0 (1L, 0L, 0L, 0L)
Traceback (most recent call last):
  File "/home/shakaran/gst_debug.py", line 31, in <module>
    unused = 0,
  File "/usr/lib/python2.7/dist-packages/gi/types.py", line 47, in function
    return info.invoke(*args, **kwargs)
TypeError: Must be number, not str

-- 
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