[MPlayer-users] Only one instance of mPlayer

Kevin DeKorte kdekorte at gmail.com
Fri Sep 21 02:17:51 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dotan Cohen wrote:
> On 17/09/2007, RC <cooleyr at gmail.com> wrote:
>> On Mon, 17 Sep 2007 21:55:54 +0200
>> "Dotan Cohen" <dotancohen at gmail.com> wrote:
>>
>>> How can I configure mPlayer to play the file in the previously open
>>> instance, replacing whatever is currently playing?
>> Write a program/script to do so, controlling MPlayer via slave-mode.
>>
>> Or you might take a look at any of the MPlayer front-ends listed on the
>> website, to see if any of them already has such a feature.

gnome-mplayer has such a feature

> 
> I'm having no luck getting this working, but I'm not much of a bash
> scripter. Is gregping  "ps -ux" for mplayer not the right way to get
> the PID?
> 
> Many programs, such as Firefox and Amarok, have a %U option that tells
> the program to open the document in an existing window if there is
> one. Has mPlayer not such an option?
> 
> Dotan Cohen

Dotan,

You can use gnome-mplayer and use a dbus method to replace the existing
content in gnome-mplayer (wrapper for mplayer)

To send command to ALL running gnome-mplayers (multihead applications)
dbus-send  --type=signal / com.gnome.mplayer.Open
string:'/path/to/movie.mov'

When controlid is specified (gnome-mplayer --controlid=[controlid])
dbus-send  --type=signal /control/[controlid] com.gnome.mplayer.Open
string:'/path/to/movie.mov'

http://dekorte.homeip.net/download

is where you can get it.

Kevin
- --
Get my public GnuPG key from
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x7D0BD5D1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Remi - http://enigmail.mozdev.org

iD8DBQFG8w2u6w2kMH0L1dERApUTAJsGsnJWDoyVhVWLx2TKkMbrllZ6UwCfRC+y
F4WumM+tw9sAf97sAABs9Kg=
=CAvX
-----END PGP SIGNATURE-----



More information about the MPlayer-users mailing list