Gtk2::Ex::MPlayerEmbed 0.02 review

by on

Gtk2::Ex::MPlayerEmbed is a widget to embed the MPlayer media player into GTK+ applications. SYNOPSIS use Gtk2::Ex::MPlay

License: Perl Artistic License
File size: 6K
Developer: Gavin Brown
0 stars award from

Gtk2::Ex::MPlayerEmbed is a widget to embed the MPlayer media player into GTK+ applications.

use Gtk2::Ex::MPlayerEmbed;

my $window = Gtk2::Window->new;

my $embed = Gtk2::MPlayerEmbed->new;





Gtk2::Ex::MPlayerEmbed allows you to embed a video player into your applications. It uses the XEMBED system to allow the mplayer program to insert its window into your application.


The following properties are accessible through the standard Glib get() and set() methods:


This is the path to the mplayer program. This is /usr/bin/mplayer by default.

This is a string containing the command line arguments passed to mplayer (no default).


This is a boolean value that indicates whether the mplayer program is currently running.


This is an enumeration (described by Gtk2::Ex::MPlayerEmbed::PlayingState) that indicates the state of the player. state may be one of: stopped, playing, paused. It is stopped at startup.



This method has two behaviours: if the the loaded property is true (a video stream has been loaded), and the state property is paused, then it will resume playing the stream. If loaded is true but the stream is not paused, then the method will carp() and return undef.

If load is false, and the $content argument is defined, then the player will attempt to load and play the stream identified by $content, which may be a path to a file, the URL of a network resource, or a "meta-URI" such as dvd:// or dvb://.


This method will pause the current video stream. If the stream is not playing, this method will carp() and return undef.


This is just a convenience wrapper around pause(). The pause() method is really a toggle, and two subsequent calls to pause() will pause and then resume the stream, so this method exists to disambiguate.


This method tells mplayer to quit, and resets the widget's internal state. Before loading another video stream with play(), use this method first.


This method sends a command to the mplayer slave process. The available commands are documented in the mplayer-slave-spec.txt file in the source distribution.


Gtk2::Ex::MPlayerEmbed 0.02 search tags