#!/bin/sh

mp_set_option vf "scale=1:1:1"

if [ "$1" != enable ]; then
  mp_set_option vf "expand=-1:-1:-1:-1:1" concat
  mp_set_option subpos 100
else
  x=`cat /etc/mplayer/mplayer.conf | grep screenw | sed s/screenw=//`
  y=`cat /etc/mplayer/mplayer.conf | grep screenh | sed s/screenh=//`
  mp_set_option vf "expand=$x:$y:-1:-1:1" concat
  mp_set_option subpos 95
fi

echo "quit" > /var/mp_control

exit 0
