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.
on 2011-12-02 14:30
on 2011-12-02 15:44
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 Heiler <ruby-forum-incoming@andreas-s.net> To: ruby-gnome2-devel-en@lists.sourceforge.net, 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/.
on 2011-12-03 21:36
Marc Heiler 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: http://github.com/ashbb/green_shoes/blob/master/li... it use gstreamer.
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.