Embedding an Audio player or a Video player in a ruby-gtk app

Hi,

Is there any way to include a minimal videoplayer or audioplayer in a
ruby-gtk program? Perhaps with GTK3?

Right now I mostly use mplayer, but I also have VLC installed. And
Gstreamer and gnome-mplayer.

What I am curious is the minimal code that would be required to actually
embed these into a small ruby-gtk application.

My goal is to create a pseudo “Desktop Environment” where all my useful
ruby-gtk programs can be started and controlled from within a set of
widgets. And it would be really great if I could watch videos inside.

In HTML5 this should not be a big problem anymore. And I saw that with
GTK3, we can embed applications into a browser, i.e. embed and run gimp
into firefox.

I find this all quite exciting, but I also feel too dumb to dig into
this, as this seems to all be in the language C, and I suck at C.

There is no Ruby GTK3 to play with yet, although I know they are working
on it.

With Gtk2, you can (theoretically) do this on Linux using mplayer.

With a Gtk2 window “win” open, ask for its xwindows window id:

win.window.xid

Now execute mplayer and pass it the -wid parameter, passing your xid.
Mplayer should embed itself for you on your window. I’m guessing since
xid is defined on Gdk::Drawable that you can do this with any control,
so
you can embed the video in a container.

-dh

From: Marc H. [email protected]
To: [email protected],
Date: 12/02/2011 08:31 AM
Subject: [ruby-gnome2-devel-en] Embedding an Audio player or a
Video player in a ruby-gtk app

Hi,

Is there any way to include a minimal videoplayer or audioplayer in a
ruby-gtk program? Perhaps with GTK3?

Right now I mostly use mplayer, but I also have VLC installed. And
Gstreamer and gnome-mplayer.

What I am curious is the minimal code that would be required to actually
embed these into a small ruby-gtk application.

My goal is to create a pseudo “Desktop Environment” where all my useful
ruby-gtk programs can be started and controlled from within a set of
widgets. And it would be really great if I could watch videos inside.

In HTML5 this should not be a big problem anymore. And I saw that with
GTK3, we can embed applications into a browser, i.e. embed and run gimp
into firefox.

I find this all quite exciting, but I also feel too dumb to dig into
this, as this seems to all be in the language C, and I suck at C.


Posted via http://www.ruby-forum.com/.

Marc H. wrote in post #1034742:

Hi,

Is there any way to include a minimal videoplayer or audioplayer in a
ruby-gtk program? Perhaps with GTK3?

see this code from green_shoes:

it use gstreamer.