GNOME Bugzilla – Bug 159067
Parameter type conversion fails when emiting signal from Python
Last modified: 2009-08-15 18:40:50 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.
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.
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.
Okay, this should now be fixed in CVS.