Re: Porting perl-GStreamer to gst 1.0

Thanks, I was able to get a basic pipeline going:

The script '' builds the bindings and runs code based on the GStreamer Hello, World! tutorial (  The '' script builds every Gst*-1.0.typelib that I have on my system and dumps out all the packages it creates.

The while() loop to get the messages from $bus->timed_pop() is quick, dirty, and wrong.  It does let the movie play, but it doesn't catch the messages in meaningful ways.  The original C tutorial uses timed_pop_filtered() like this:

msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE, GST_MESSAGE_ERROR | GST_MESSAGE_EOS);

From what I gathered from Glib::Flags, this should work like this:

my $msg = $bus->timed_pop_filtered( GStreamer::CLOCK_TIME_NONE, [ 'error', 'eos' ]);

But this causes the program to promptly exit without outputting anything.

In any case, this is enough for a running start.


On Wed, Nov 12, 2014 at 2:20 AM, "Torsten Schönfeld" <kaffeetisch gmx de> wrote:
"Timm Murray" <tmurray wumpus-cave net>:
> Thanks, that was easy.  There were a couple critical symbols it didn't pick up, like GST_STATE_PLAYING (which I expect would become GStreamer::STATE_PLAYING).  I used Devel::Symdump to recursively drop everything under the 'GStreamer::' namespace and I couldn't find anything.

GST_STATE_PLAYING is a member of the enum GstState, so it's wrapped like all enums in perl-Glib-based bindings: you simply use the short name string, i.e., "playing" in this case.

Stuff like this is documented in Glib::Flags [1] and Gtk2::api [2], the latter of which we should get into the docs of Glib::Object::Introspection.  Patches welcome.

[1] Automatically generated at build-time, and thus not visible on CPAN sites.

gtk-perl-list mailing list
gtk-perl-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]