Merge 51699f78fe40ec97be3f77eecf85aefd4a440efd into b8c8343f9a84d259b7a7fd46bf5f44afa9153ccc

This commit is contained in:
Ricardo Constantino 2015-06-11 21:04:21 +00:00
commit a20f01641f
2 changed files with 13 additions and 2 deletions

View File

@ -133,9 +133,10 @@ STYLE_NOTCONTROLLER_COLOR = 'grey'
USERLIST_GUI_USERNAME_OFFSET = 21 # Pixels
MPLAYER_SLAVE_ARGS = ['-slave', '--hr-seek=always', '-nomsgcolor', '-msglevel', 'all=1:global=4:cplayer=4', '-af', 'scaletempo']
# --quiet works with both mpv 0.2 and 0.3
MPV_SLAVE_ARGS = ['--force-window', '--idle', '--hr-seek=always', '--quiet', '--keep-open', '--af=scaletempo', '--input-terminal=no', '--input-file=/dev/stdin']
MPV_SLAVE_ARGS = ['--hr-seek=always', '--quiet', '--af=scaletempo', '--input-terminal=no', '--input-file=/dev/stdin']
MPV_SLAVE_ARGS_NEW = ['--term-playing-msg=<SyncplayUpdateFile>\nANS_filename=${filename}\nANS_length=${=length}\nANS_path=${path}\n</SyncplayUpdateFile>', '--terminal=yes']
MPV_SLAVE_GUI = ['--force-window', '--idle', '--keep-open']
MPV_SLAVE_GUI_NEW = ['--profile=pseudo-gui', '--keep-open=always']
MPV_NEW_VERSION = False
VLC_SLAVE_ARGS = ['--extraintf=luaintf', '--lua-intf=syncplay', '--no-quiet', '--no-input-fast-seek',
'--play-and-pause', '--start-time=0']

View File

@ -24,6 +24,16 @@ class MpvPlayer(MplayerPlayer):
@staticmethod
def getStartupArgs(path):
args = constants.MPV_SLAVE_ARGS
try:
pseudogui = subprocess.check_output([path, '--profile=help'])
except:
pseudogui = ''
if 'pseudo-gui' in pseudogui:
args.extend(constants.MPV_SLAVE_GUI_NEW)
else:
args.extend(constants.MPV_SLAVE_GUI)
if constants.MPV_NEW_VERSION:
args.extend(constants.MPV_SLAVE_ARGS_NEW)
return args