<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE id=ridTitle>Blank</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<STYLE>BODY {
        MARGIN-TOP: 25px; FONT-SIZE: 10pt; MARGIN-LEFT: 25px; COLOR: #808080; FONT-FAMILY: Verdana
}
P.msoNormal {
        MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; FONT-FAMILY: Helvetica, "Times New Roman"
}
LI.msoNormal {
        MARGIN-TOP: 0px; FONT-SIZE: 10pt; MARGIN-LEFT: 0px; COLOR: #ffffcc; FONT-FAMILY: Helvetica, "Times New Roman"
}
</STYLE>
<META content="MSHTML 6.00.6000.17097" name=GENERATOR></HEAD>
<BODY id=ridBody style="FONT-SIZE: 10pt; COLOR: #808080; FONT-FAMILY: Verdana"
background=cid:453415011@29042011-0A2E><FONT face=Verdana>
<P><FONT color=#3a3a3a>Hi Guys, </FONT></P>
<P><FONT color=#3a3a3a>I'm trying to get the GStreamer Perl api working
on <SPAN class=453415011-29042011>Kubuntu</SPAN>. Does anybody have it
working? The core GStreamer module is currently working on my installation,
which I can test through wxMediaCtrl, but wx has some bugs which I'm hoping to
avoid by going straight to GStreamer. I have installed the api from cpan and I'm
running the 'synopsis' from the top of the doc. </FONT></P>
<P><FONT color=#3a3a3a></FONT></P>
<P><FONT color=#3a3a3a>I get the following error message: </FONT></P>
<P><TT class=inlinecode><FONT color=#3a3a3a>Stream contains no data. at
/home/image/Documents/Endoscopia/GStreamer_Demo.pl line 28.</FONT></P></TT>
<P><FONT color=#3a3a3a>Here is the code itself. The print statements give 1
(playable) and 010280 (version), respectively. </FONT></P>
<P><FONT color=#3a3a3a>regards </FONT></P>
<P><FONT color=#3a3a3a>Steve </FONT></P><PRE><FONT color=#3a3a3a>#!/usr/bin/perl
        use strict;
        use warnings;
        use Glib qw(TRUE FALSE);
        use GStreamer -init;
        my $loop = Glib::MainLoop -> new();
        print GStreamer->init_check, "\n";
        print GStreamer->version, "\n";
# set up
        my $play = GStreamer::ElementFactory -> make("playbin", "play");
        $play -> set(uri => Glib::filename_to_uri "/home/image/Documents/Endoscopia/media/a_100_23_1.avi", "localhost");
        $play -> get_bus() -> add_watch(\&my_bus_callback, $loop);
        $play -> set_state("playing");
# run
        $loop -> run();
# clean up
        $play -> set_state("null");
sub my_bus_callback {
        my ($bus, $message, $loop) = @_;
        if ($message -> type & "error") {
                warn $message -> error;
                $loop -> quit();
        }
        elsif ($message -> type & "eos") {
                $loop -> quit();
        }
# remove message from the queue
        return TRUE;
}
</FONT></PRE><SFDOCREADY id=sfDocReady></SFDOCREADY></FONT></BODY></HTML>