Daemon::Mplayer - run mplayer daemonized
use Daemon::Mplayer; mplayer_play( { pidfile => $pidfile, logfile => $logfile, path => '/usr/bin/mplayer', args => [ @files ], } ); ... mplayer_stop($pid);
Daemon::Mplayer - Mplayer, daemonized
None by default.
Parameters: $pidfile, $log, $path, @mplayer_arguments
mplayer_play( pidfile => $pidfile, # /tmp/mplayer_daemon.pid logfile => $logfile, # /dev/null path => $mplayer_path, # /usr/bin/mplayer args => $mplayer_opts # None );
The pidfile is used as a locking mechanism and will contain the PID of the spawned mplayer process.
The logfile is where the output from mplayer will be stored. The default is /dev/null.
The path is the full path to an mplayer executable. Defaults to /usr/bin/mplayer.
args takes an array reference that might contain optional parameters to mplayer, as well as the file/URI to be played.
Parameters: $pid | $pidfile
Returns: Boolean
Takes a PID or pidfile and tries to stop the corresponding process.
If a valid PID is encountered in the pidfile, tries to stop the process. If this succeeds, the pidfile is removed.
Magnus Woldrich CPAN ID: WOLDRICH magnus@trapd00r.se http://japh.se
None required yet.
Copyright 2011 The Daemon::Mplayers "AUTHOR" and "CONTRIBUTORS" as listed above.
To install Daemon::Mplayer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Daemon::Mplayer
CPAN shell
perl -MCPAN -e shell install Daemon::Mplayer
For more information on module installation, please visit the detailed CPAN module installation guide.