You are not logged in.

#1 2008-05-31 00:58:29

Petrhos
Member
From: Barreiro
Registered: 2008-03-29
Posts: 11
Website

How aply patch on mplayer

Can anyone tell-me please all the steeps to apply this patch (http://bugs.archlinux.org/task/5371) on mplayer?

Thanks!

Offline

#2 2008-05-31 01:01:16

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,329
Website

Re: How aply patch on mplayer

It does not work...  I use this python script:

#!/usr/bin/python 

#import dbus 
import os
import os.path
import sys

#bus = dbus.Bus(dbus.Bus.TYPE_SESSION) 
#devobj = bus.get_object('org.gnome.ScreenSaver', '/org/gnome/ScreenSaver') 
#dev = dbus.Interface(devobj, "org.gnome.ScreenSaver") 
#cookie = dev.Inhibit('MPlayer', 'Watching video') 

os.system("killall gnome-screensaver")

command = '/usr/bin/mplayer %s "%s"' % (' '.join(sys.argv[1:-1]), os.path.normpath(sys.argv[-1]))
os.system(command)

os.system("gnome-screensaver")

#dev.UnInhibit(cookie)

Put it in ~/bin and add that to the start of your path.  The commented out bits are a fancy dbus method that I never got to work...

Offline

#3 2008-05-31 01:08:52

Petrhos
Member
From: Barreiro
Registered: 2008-03-29
Posts: 11
Website

Re: How aply patch on mplayer

Please tell-me all the steeps I should do (complete version)
Thanks

Offline

#4 2008-05-31 01:26:55

Allan
Developer
From: Brisbane, AU
Registered: 2007-06-09
Posts: 10,329
Website

Re: How aply patch on mplayer

1) Create a bin directory in you home directory
2) In your .bashrc, add PATH=~/bin:$PATH  (you will need to logout/login to refresh your path)
3) put the script in a file called mplayer in your home directory and run "chmod +x mplayer" on it

Now when you call mplayer, it will pick up that script first.

Offline

Board footer

Powered by FluxBB