Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 18 Nov 2005 07:51:57 -0800 (PST)
From:      Arne "Wörner" <arne_woerner@yahoo.com>
To:        "Frank J. Beckmann" <frank@barda.agala.net>, freebsd-multimedia@freebsd.org
Subject:   Re: Which TV cards do send the audio data via PCI?
Message-ID:  <20051118155157.61649.qmail@web30309.mail.mud.yahoo.com>
In-Reply-To: <200511181637.42158.frank@barda.agala.net>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Hi!

--- "Frank J. Beckmann" <frank@barda.agala.net> wrote:
> That sounds interesting. Which aplications work with
> that card?
>
The PVR 250 interface is quite simple:
1. pvr250-setchannel - to set the channel
2. pvr250-setsize - to set the screen size (720x576, 352x288)
3. dd if=/dev/cxm0 of=tv.mpg ibs=1m obs=1m

I worte a little script, that helps scheduling the recording (via
at) and manages the recording (on my old box are some odds and
edges: NIC usage should be reduced during recording and sometimes
dd gets no more data).

I attached that script. I dont know, if it needs a license... If
yes, then it shall hereby be the BSD license or so...

Bye
Arne


	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
[-- Attachment #2 --]
#!/bin/sh
# $Id$

me="`realpath $0`"

cd /opt/aw/tv/pvr250
if [ -z "$1" ]; then
	read what len where when size
	TZ=CET ; export TZ
	echo "date +%s | lockf cxm0.lck $me $what $len $where $size" | at -t $when
	echo at job scheduled
	exit 0
fi

if [ "$1" = STOP ]; then
	touch cxm0-stop
	exit 0
fi

read delta
logger -t pvr "$@ delta$delta `date +%s`"
echo -n $0 $@
pvr250-setchannel $3
if [ "$4" = p ] ; then
	pvr250-setsize 352 288
else
	pvr250-setsize 720 576
fi
dt=`expr $2 \* 60`
ets=`date +%s`
delta=`expr $ets - $delta`
echo delta$delta
ets=`expr $ets + $dt - $delta - 10`
while [ 1 ] ;do
	fn=${1}.`date +%s`.mpg
	dd if=/dev/cxm0 of=${1}.`date +%s`.mpg ibs=1m obs=1m &
	pid=$!
	while [ 1 ]; do
		touch dead-dd-chk
		sleep 30
		if [ -f cxm0-stop ]; then
			kill -INFO $pid
			sleep 1
			kill -TERM $pid
			sleep 1
			kill -KILL $pid
			break
		fi
		if [ `date +%s` -gt $ets ]; then
			kill -INFO $pid
			sleep 1
			kill -TERM $pid
			sleep 1
			kill -KILL $pid
			break
		fi
		if [ $fn -ot dead-dd-chk ]; then
			kill -INFO $pid
			sleep 1
			kill -TERM $pid
			sleep 1
			kill -KILL $pid
			break
		fi
	done
	if [ `date +%s` -gt $ets ]; then
		break
	fi
	if [ -f cxm0-stop ]; then
		echo stopped
		rm cxm0-stop
		break
	fi
done

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051118155157.61649.qmail>