Python Forum

Full Version: How to use python to receive Gobject.pointer
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I write a gstreamer plugin and g_signal_emit had send a struct.

when I try to use python to receive callback function. I don't know how to
receive a array?
example :

int a[2];
a[0]=1;
g_signal_emit(filter, gst_test_signals[SIGNAL_DETECTED], 0, &a);

def cb_test_monitor(object, test, data):

print(test) #<gpointer at 0x7f439aa508a0>
print(test[0]) #TypeError: 'gobject.GPointer' object is not subscriptable

Thanks,
Stephen