I knew nothing about GStreamer a couple hours ago, but, since I have had a
lot of dealings with perl/introspection of late, I went ahead and did some
digging. Compiled with gstreamer-1.2.4.

So, first off, instead of: my $play = GStreamer::ElementFactory ->
make("playbin", "play");
It should be: my $play = GStreamer::ElementFactory::make("playbin", "play");

Due to the class-static stuff.

I was, however, running into the same issue. I first verified that this
works:

my $fake_factory = Glib::Object::Introspection->invoke ('Gst',
'ElementFactory', 'find', 'fakesrc');
my $fake_element =
GStreamer::ElementFactory::create($fake_factory,"source");

After attempting a find on playbin, it would seem that the plugin simply
isn't installed as the fakesrc is working. Looking at: plugins/elements/, I
only see a handful of source files; playbin not being one of them.

That's when I remembered seeing a number of plugin subdirectories in
http://gstreamer.freedesktop.org/src/.

It looks like gst-plugins-base provides playbin. After installing, now the
aforementioned playbin call returns correctly.



*Terence J. Ferraro*


On Sat, Apr 26, 2014 at 6:13 PM, Steve Cookson <i...@sca-uk.com> wrote:

> Hi Guys,
>
>
> On 26/04/14 09:30, Steve Cookson wrote:
> >
> > > I'd suggest basing them on Glib::Object::Introspection.
>
> Well actually, it's amazing.  I've just been trying it.
>
> It's not so easy to install you have to install libgirepository1.0-dev
> first (apt-get install libgirepository1.0-dev).
>
> This code:
>
> #!/usr/bin/perl -w
>     use strict;
>
>     use Glib::Object::Introspection;
>     Glib::Object::Introspection->setup (basename => 'Gst', version =>
> '1.0', package => 'GStreamer');
>     my @version=();
>     @version = GStreamer::version();
>     print "This program is linked against GStreamer @version\n";
>     my $i = GStreamer::init ([$0, @ARGV]);
>
> Gave me "This program is linked against GStreamer 1 2 3 0".
>
> However, when I tried:
>
>     my $play = GStreamer::ElementFactory -> make("playbin", "play");
>
> I get:
>
> *** GStreamer::ElementFactory::make: passed too many parameters (expected
> 2, got 3); ignoring excess at ~/test_code/GStreamer_test_4.pl line 129.
>
> When I drop the final parameter, I get an empty string passed in $play.
>
> Any ideas?
>
> Regards
>
> Steve.
>
>
> _______________________________________________
> gtk-perl-list mailing list
> gtk-perl-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/gtk-perl-list
>
_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to