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 159067 - Parameter type conversion fails when emiting signal from Python
Parameter type conversion fails when emiting signal from Python
Status: VERIFIED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gst-python
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-11-22 14:38 UTC by Martin Soto
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8



Description Martin Soto 2004-11-22 14:38:25 UTC
I'm observing a weird problem while trying to emit a signal defined by a
GstElement from a Python script. The signal is defined as follows:

  dvdblocksrc_signals[QUEUE_EVENT_SIGNAL] =
    g_signal_new ("queue-event",
        G_TYPE_FROM_CLASS (klass),
        G_SIGNAL_ACTION,
        G_STRUCT_OFFSET (DVDBlockSrcClass, queue_event),
        NULL, NULL,
        gst_marshal_VOID__POINTER,
        G_TYPE_NONE,
        1, GST_TYPE_EVENT);

i.e. it receives a GstEvent and returns void. I try to emit it using a
line like

        element.emit('queue-event', someEvent);

The result is an exception with the following error message:

  TypeError: could not convert type gst.Event to GstEvent required for parameter 0

I tried modifying the signal definition to receive a GstData value, but it
failed with a similar error message.
Comment 1 Johan (not receiving bugmail) Dahlin 2004-11-22 15:25:44 UTC
Martin, Did you try register the GstEvent as a BOXED instead of a POINTER? 

It's very important for language bindings to specify the correct type, otherwise
they have no idea what's sent.
Comment 2 Martin Soto 2004-11-22 21:14:43 UTC
Just tried changing the marshaler to one taking BOXED instead of POINTER, i.e.
replace gst_marshal_VOID__POINTER in the original submission, with
gst_marshal_VOID__BOXED. I agree that this is the correct way to do it, but the
problem remains: I still get the same error message. I have no clue.
Comment 3 Johan (not receiving bugmail) Dahlin 2004-11-23 10:19:22 UTC
Okay, this should now be fixed in CVS.