Daemon::Mplayer - run mplayer daemonized
use Daemon::Mplayer qw(mplayer_play mplayer_stop); mplayer_play( { pidfile => q{mplayer.pid}, logfile => q{mplayer.log}, path => '/usr/bin/mplayer', args => [ qw(file1 file2) ], } ); mplayer_stop('mplayer.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 m@japh.se http://japh.se
None required yet.
Copyright 2011, 2019- The Daemon::Mplayers "AUTHOR" and "CONTRIBUTORS" as listed above.
This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
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.