#!/bin/csh -f
# Created 01/14/2002 dB

# Use xine if it is installed - JTN: for RHEL 3
if( -e /usr/bin/xine ) then
  xine --loop --no-logo --no-splash $1
  exit 0
endif

# Play the input file at one frame per second and then prompt the user for a different framerate.
set fr = 4
set filename = $1

	
PLAY:
	echo ""
	echo "Playing $1 at $fr frame per second."
	mpeg_play -framerate $fr -dither color -quiet -position +500+500 $filename >/dev/null &
	echo ""
	echo "Use the controls to play the movie."
	echo "To restart it at a different framerate: "
	echo "enter the frames per second (1 to 30 fps) in this window, and then enter return."
	echo ""
	echo "To quit enter q"
	set fr = $<
	
	if ($fr == "q" || $fr == "") then
		kill %
	else if ($fr >= 0 && $fr <= 30) then
		kill %
		goto PLAY
	endif
	
