Useful controls for mplayer (keyboard shortcuts etc) can be found at these links:
http://www.mplayerhq.hu/DOCS/HTML/en/control.html
http://www.mplayerhq.hu/DOCS/man/en/mpl ... %20CONTROL
NOTE WELL: I've named this dotpet as a beta; I really haven't had time to give it much of a test (my one year old baby was pulling at my arm as I coded...)! Also, I didn't want to alter your own code too much, so I just placed most of the new code in functions of its own and a few clean up lines just at the end of the program, so that could probably be tidied up at least. Also, I just stuck a simple pause button on the GUI. Pressing Resume (or most any other button) unpauses; a side effect is that on unpausing you would need to press the Resume button twice if you really also want to Resume. You'll understand what I mean if you test it. With slight alterateion to the code could make pause control a toggle action if you like - I think I prefer it as provided here instead (tho could have both).
EDIT: The change needed would be this function:
Code: Select all
PAUSEPLAY (){ # mcewanw
# putting following if...elif statement in would give pause control a toggle action. Similar line could then be removed from CONTROL function, or have both
if [ -e ${TMPFOLDER}/pauseplay ];then
UNPAUSEPLAY # mcewanw
elif [ -e ${TMPFOLDER}/play.pid ];then
PEASYPIDPLAY=$(cat ${TMPFOLDER}/play.pid 2>/dev/null)
kill -STOP $PEASYPIDPLAY 2>/dev/null
touch ${TMPFOLDER}/pauseplay
fi
}
NOTE: I notice that some programs, for example ffconvert, allows files to be send directly to them via right click (not just Open With). Seems to just be a matter of having the symlink to the program in all the hidden subfolders of OpenWith, such as .video_mp4, of /root/.config/rox.sourceforge.net/OpenWith but I'm not sure of that or how it is best set up.