Python Forum
How to use python to receive Gobject.pointer
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to use python to receive Gobject.pointer
#1
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
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to receive two passed cmdline parameters and access them inside a Python script? pstein 2 350 Feb-17-2024, 12:29 PM
Last Post: deanhystad
  Receive Input on Same Line? johnywhy 8 725 Jan-16-2024, 03:45 AM
Last Post: johnywhy
  How to continuously receive messages until specified to stop using Bleak jacobbreen25 3 2,141 Dec-28-2022, 04:25 PM
Last Post: jacobbreen25
  How can I add an end line character after every value that I receive? GiggsB 11 5,195 Mar-06-2022, 08:51 PM
Last Post: GiggsB
  How to receive webcam capture on spout? buzzdarkyear 2 2,660 Jan-12-2022, 02:26 PM
Last Post: buzzdarkyear
  General pointer to start data4speed 3 1,965 Jul-01-2020, 06:18 AM
Last Post: DPaul
  Pointer in the right direction? Viking 5 2,736 Apr-22-2020, 06:14 PM
Last Post: Viking
  Receive data from Redis RQ worker process freak14 0 1,897 Jul-15-2019, 12:39 PM
Last Post: freak14
  VM address (C pointer) of Python object Skaperen 1 2,053 Apr-21-2019, 10:57 PM
Last Post: hshivaraj
  How can I only receive data from selected serial numbers MasterCATZ 7 3,540 Apr-20-2019, 08:35 AM
Last Post: MasterCATZ

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020