Re: "Not a CODE reference" error with Gtk::Bus::add_watch
- From: Torsten Schönfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: "Not a CODE reference" error with Gtk::Bus::add_watch
- Date: Sun, 20 Nov 2016 19:56:06 +0100
On 20.11.2016 14:30, Wouter Verhelst wrote:
my $pipeline = Gst::parse_launch("...");
my $bus = $pipeline->get_bus();
$bus->add_watch(\&buswatch, $mainloop);
$mainloop->run();
Since gst_bus_add_watch is not introspectable directly, the GStreamer
authors marked gst_bus_add_watch_full as its replacement. ("perli11ndoc
Gst::Bus::add_watch" says "[NOT INTROSPECTABLE, shadowed by
add_watch_full]".) Unfortunately, its calling syntax is slightly
different. See "perli11ndoc Gst::Bus::add_watch_full". So, try this:
use Glib qw/G_PRIORITY_DEFAULT/;
$bus->add_watch(G_PRIORITY_DEFAULT, \&buswatch, $mainloop);
I also needed to add this before entering the main loop:
$pipeline->set_state('playing');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]