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 677916 - g-i: MemoryError raised using Gst.DebugMessage()
g-i: MemoryError raised using Gst.DebugMessage()
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.11.x
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-06-12 04:46 UTC by Ángel Guzmán Maeso (shakaran)
Modified: 2012-06-12 09:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ángel Guzmán Maeso (shakaran) 2012-06-12 04:46:28 UTC
Using the object Gst.DebugMessage() causes a MemoryError 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.DebugMessage()

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 23 in <module>
    Gst.DebugMessage() MemoryError

Comment 1 Tim-Philipp Müller 2012-06-12 08:26:26 UTC
> Using the object Gst.DebugMessage() causes a MemoryError on python.

There is no such object, certainly not one you can instantiate like this. What makes you think this should work? What would the corresponding C code look like?
Comment 2 Ángel Guzmán Maeso (shakaran) 2012-06-12 08:33:01 UTC
It is not a object, it seems a record. On gir file:

<record name="DebugMessage" c:type="GstDebugMessage" disguised="1">
      <method name="get" c:identifier="gst_debug_message_get">
        <doc xml:whitespace="preserve">Gets the string representation of a #GstDebugMessage. This function is used
in debug handlers to extract the message.</doc>
        <return-value transfer-ownership="none">
          <doc xml:whitespace="preserve">the string representation of a #GstDebugMessage.</doc>
          <type name="utf8" c:type="gchar*"/>
        </return-value>
      </method>
    </record>

Required as parameter on:

<function name="debug_log_default" c:identifier="gst_debug_log_default">

The parameter:
        <parameter name="message" transfer-ownership="none">
          <doc xml:whitespace="preserve">the message</doc>
          <type name="DebugMessage" c:type="GstDebugMessage*"/>
        </parameter>

And it appears as callback too on:

<callback name="LogFunction" c:type="GstLogFunction">
Comment 3 Tim-Philipp Müller 2012-06-12 09:35:38 UTC
Still, this simply doesn't make sense, sorry.

The logging system is not properly annotated, I don't know if it can be used yet with bindings. I'll re-name the other bug accordingly.