head     1.1;
access   ;
symbols  ;
locks    ; strict;
comment  @# @;


1.1
date     91.06.21.16.31.23;  author prisms;  state Exp;
branches ;
next     ;


desc
@@



1.1
log
@Initial revision
@
text
@#!/bin/csh -f
#
#	This records the video through IRIS NTSC video output
#	This triggers through a serial port to an Abekas
#
#	to record to the Abekas over a serial port and the IRIS RGB outputs,
#	frame 1 to 100 step 2, at Abekas time 21 seconds, invoke as
#
#		record -a 21:00 1 100 2
#
#	if triggering through a special command, with a delay of 13 seconds,
#	invoke as
#
#		record -t custom_record -d 13 1 100 2
#

onintr FINISH

set OPT =  (	"v 0 VERBOSE"	\
		"a 1 ABEKASTIME"\
		"t 1 TRIGGER"	\
		"d 1 DELAY"	\
	   )

set USAGE = ( '[-v] [-r resx resy] [-w left right bottom top] [-d #divs div]' \
	      '        where -v is the verbose option' \
	    )

set FRAMES 
set DIR = .

source /ufs/prisms/support/templates/args.sh

blanktime 1000000

if ( $status ) exit $status

if ( ! $?ABEKASTIME ) then
	echo specify Abekas time with -a
	exit 1
endif

set START = $F
setntsc

while ( $F <= $FEND )
	echo frame $F ...
#
#	The following composites 2 images and boosts according to zero black
#
	fcomposite -w 640 -h 486 /tmp/temp.pic = setup .075 $F.pic over bg.pic
#
#	display picture and record
#
	if ( $ABEKAS != "" ) then

	    set R = `echo $F $START - $FINC / p | dc`
	    abekas -o $ABEKASTIME -r $R /dev/ttyd2
	    sleep 2
	
	else if ( $TRIGGER != "" ) then

	    setenv SLEEP $DELAY
	    fd -S -c $TRIGGER /tmp/temp.pic
	
	endif

	@@ F = $F + $FINC
end

FINISH:

sleep 2
set60
rm -f /tmp/temp.pic $MAP
@
