Torsten, Thanks for your quick help. Sorry for not checking the tarball for examples. It hadn't occured to me. I'll look there first next time.
I tried the example, and it worked. This prompted me to refactor my code a bit, and in doing so, found an error which, when fixed, seemed to fix the problem. I was using a Glib::Timeout (in a Gtk main loop) to call the subroutine that was doing the querying, and forgot to return TRUE. I didn't catch it because the Timeout wasn't removed after the first iteration failed to return TRUE, which is supposed to be the behavior of Timeout. I'm still puzzled why the Timeout didn't get removed. Thanks for your help, and for your work on the bindings. Chris On Thu, Dec 17, 2009 at 2:12 PM, Torsten Schoenfeld <kaffeeti...@gmx.de>wrote: > On 17.12.2009 20:52, Chris Bartak wrote: > >> I'm trying to write a specialized audio player using Gtk2-perl and >> GStreamer, and have run into a problem querying the position of the >> stream. >> I've tried using a playbin, and when I couldn't query that, I tried >> setting >> up the elements and pipeline manually. While both methods play audio fine, >> neither one will allow me to query for position. Here's the playbin >> version >> of my code: >> >> if ($playbin->query($query_time)){ >> my ($time_format,$time) = $query_time->position; >> print "$time\n"; >> } >> > > In the GStreamer tarball, there's examples/manual/query.pl that does > exactly this, and it works for me. Does it work for you? > > > My Gtk version is 2.18.3 as provided by Gtk2->get_version_info (which >> Ubuntu >> calls 1:1.221-4), Perl is 5.10.0. >> > > Gtk2 is not really relevant for this, but anyway: Gtk2->get_version_info > returns the version number of the gtk+ C library that the Perl module Gtk2 > is linked against. That Ubuntu version 1:1.221-4 is the version of the Perl > module Gtk2. > _______________________________________________ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > http://mail.gnome.org/mailman/listinfo/gtk-perl-list >
_______________________________________________ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list