Re: Callbacks with GStreamer1
- From: Timm Murray <tmurray wumpus-cave net>
- To: Quentin Sculo <squentin free fr>
- Cc: "gtk-perl-list gnome org" <gtk-perl-list gnome org>
- Subject: Re: Callbacks with GStreamer1
- Date: Tue, 7 Jul 2015 18:42:51 -0500
Thanks for your help, Quentin. Doing add_signal_watch() does prevent the error from occurring, but it also seems that the callback is not actually set. Using GST_DEBUG reveals:
$ GST_DEBUG=3 perl example.pl
0:00:00.046825784 2484 0x2702b50 ERROR GST_BUS gstbus.c:851:gst_bus_add_watch_full_unlocked:<bus1> Tried to add new watch while one was already thereThis is not a fatal error, but it seems that add_signal_watch() sets a generic handler, and add_watch() is not allowed to set a new one after that.
I happened across a Python example that suggests that using connect() is the answer:
https://github.com/Elleo/gst-opencv/blob/master/examples/python/facedetect.pyBut when I added that instead of add_watch():
$bus->connect( 'message::element', \&bus_callback, $loop );
It resulted in:
Can't locate object method "connect" via package "GStreamer1::Bus"
Going by the inheritance from the C API docs, I would expect connect() to be there for Bus, but perhaps not for the Perl bindings.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]