Oct-30-2017, 04:56 PM
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
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