Ruby Forum Ruby-Gnome 2 > gstreamer

Posted by Leon Bogaert (leonb)
on 11.03.2008 10:39
Hi all,

I installed the "libgstreamer0.10-ruby1.8_0.2.0-3_amd64.deb" on ubuntu
and then I tried to follow this tutorial:
http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gst-types.

So I opended irb:
require 'gst'
LoadError: no such file to load -- gst

require 'gst0.10'
Gst::Type
NameError: uninitialized constant Gst::Type

Is that tutorial outdated?
Posted by Sjoerd Simons (Guest)
on 11.03.2008 11:45
(Received via mailing list)
On Tue, Mar 11, 2008 at 10:39:10AM +0100, Leon Bogaert wrote:
> require 'gst0.10'
> Gst::Type
> NameError: uninitialized constant Gst::Type
> 
> Is that tutorial outdated?

The tutorial is indeed outdated. It was written for Gstreamer 0.8. 
Gst::Type
doesn't exist anymore in Gstreamer 0.10. The basic ideas are still the 
same
though. There isn't ruby gstreamer 0.10 specific documentation, the best 
way to
learn is the general gstreamer documentation and the ruby samples on
  https://trac.luon.net/ruby-gstreamer0.10

Also feel free to ask questions on the mailinglist[0]

  Sjoerd
0: https://lists.luon.net/listinfo/ruby-gstreamer0.10
--
Any circuit design must contain at least one part which is obsolete, two 
parts
which are unobtainable, and three parts which are still under 
development.
Posted by Leon Bogaert (leonb)
on 18.03.2008 23:06
Thanks Sjoerd,

Do you know if Ruby-gnome2 and gstreamer is still under active 
development? And are they already making it suitable for ruby1.9? I get 
some errors when trying to build Ruby-gnome2 with ruby1.9.

Thanks!
Posted by Sjoerd Simons (Guest)
on 19.03.2008 10:51
(Received via mailing list)
On Tue, Mar 18, 2008 at 11:06:11PM +0100, Leon Bogaert wrote:
> Thanks Sjoerd,
> 
> Do you know if Ruby-gnome2 and gstreamer is still under active 
> development? And are they already making it suitable for ruby1.9? I get 
> some errors when trying to build Ruby-gnome2 with ruby1.9.

I personally haven't had a lot of time for ruby-gstreamer0.10 in the 
past year
or so unfortunately. I'm planning to do some basic maintaince work on it 
this
weekend. But fwiw i've been using it in some bigger applications and it 
works
nicely.

I can't really speak for ruby-gnome2. But i guess with a new release 
maintainer
there might be some new things rsn :)

  Sjoerd
--
For your penance, say five Hail Marys and one loud BLAH!
Posted by Leon Bogaert (leonb)
on 19.03.2008 11:06
Thanks Sjoerd,

Nice idea for the Google Summer of Code!

I just compiled glib and gstreamer from scratch (with the latest ruby 
1.9) and I get this error:

irb(main):006:0> require 'glib2'
=> true
irb(main):007:0> require 'gst0.10'
LoadError: 
/home/leon/software/lib/ruby/site_ruby/1.9.0/x86_64-linux/gst010.so: 
undefined symbol: rb_argv - 
/home/leon/software/lib/ruby/site_ruby/1.9.0/x86_64-linux/gst010.so
        from 
/home/leon/software/lib/ruby/site_ruby/1.9.0/gst0.10.rb:2:in `require'
        from 
/home/leon/software/lib/ruby/site_ruby/1.9.0/gst0.10.rb:2:in `<top 
(required)>'
        from (irb):7:in `require'
        from (irb):7
        from /home/leon/software/bin/irb:12:in `<main>'
irb(main):008:0>

Do you know what I could be? Is it something I could fix?

Leon
Posted by Sjoerd Simons (Guest)
on 19.03.2008 11:21
(Received via mailing list)
On Wed, Mar 19, 2008 at 11:06:04AM +0100, Leon Bogaert wrote:
> LoadError: 
>         from /home/leon/software/bin/irb:12:in `<main>'
> irb(main):008:0>
> 
> Do you know what I could be? Is it something I could fix?

Maybe ruby1.9 doesn't have rb_argv anymore. Not sure. It's one of the 
things i
want to look at this weekend. But feel free to beat me to it :)

  Sjoerd
--
In 1750 Issac Newton became discouraged when he fell up a flight of 
stairs.
Posted by Leon Bogaert (leonb)
on 19.03.2008 11:58
Sjoerd Simons wrote:
> On Wed, Mar 19, 2008 at 11:06:04AM +0100, Leon Bogaert wrote:
>> LoadError: 
>>         from /home/leon/software/bin/irb:12:in `<main>'
>> irb(main):008:0>
>> 
>> Do you know what I could be? Is it something I could fix?
> 
> Maybe ruby1.9 doesn't have rb_argv anymore. Not sure. It's one of the 
> things i
> want to look at this weekend. But feel free to beat me to it :)
> 
>   Sjoerd
> --
> In 1750 Issac Newton became discouraged when he fell up a flight of 
> stairs.

Edited src/rbgst.c and changed

gargc = RARRAY (rb_argv)->len;
argary = rb_argv;

in

gargc = RARRAY (argv)->len;
argary = argv;

Don't now what I did, but it seems to work now :)
I'll have another look when you fixed it. Maybe then I get what rb_args 
's all about.
Posted by Leon Bogaert (leonb)
on 19.03.2008 22:52

When I tried to compile the edited .c file with ruby1.8.6 it succeeded.
But Gst.init() gave a segmentation fault.
Posted by Leon Bogaert (leonb)
on 25.03.2008 14:02
Hi Sjoerd,

I saw you've been busy with ruby-gstreamer. Did you fix the rb_argv bug? 
What was the problem?
Posted by Kouhei Sutou (Guest)
on 25.03.2008 14:28
(Received via mailing list)
Hi,

2008/3/25, Leon Bogaert <ruby-forum-incoming@andreas-s.net>:

>  I saw you've been busy with ruby-gstreamer. Did you fix the rb_argv bug?
>  What was the problem?

It had been fixed in Ruby/GStreamer in the Ruby-GNOME2 repository.
And it works with ruby 1.9.0.


Thanks,
--
kou