Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Jan 1998 12:06:38 +0000
From:      Roger Hardiman <roger@cs.strath.ac.uk>
To:        multimedia@freebsd.org
Subject:   FXTV. Watching two programs at the same time with two BT848s
Message-ID:  <34BA074E.167E@cs.strath.ac.uk>

next in thread | raw e-mail | index | archive | help
I have 2 BT848 cards (a WinTV/PCI and a VideoLogic Captivator PCI).
I want to watch two video inputs, one via each grabber.

FXTV 0.46 is hard coded to open /dev/bktr0 for the video input.

I have changed this to allow a new option, -deviceNumber which can
be any integer. This defines the bktr device to open.
eg fxtv -deviceNumber 0 &
   fxtv -deviceNumber 1 &


The diffs for app_rsrc.h and tvcapture.c follow.
If there are any problems, the entire source, including patch can be
ftp'ed from    vulture.dmem.strath.ac.uk  in /pub/fxtv


Roger Hardiman


---app_rsrc.h
40a41
>     int       device_number;
110a112,113
> #define RNdeviceNumber     "deviceNumber"
> #define RCdeviceNumber     "DeviceNumber"
202a206
>    { "-deviceNumber"       , RNdeviceNumber   , XrmoptionSepArg, NULL        }
,
270a275,277
>     { RNdeviceNumber, RCdeviceNumber, XtRInt, sizeof(int),
>         XtOffsetOf(AppResources, device_number), XtRString,
>         "0" },
446a454
> -deviceNumber <#>           - bktr device number ; def=0      



---tv_capture.c is
1110c1110,1112
<     c->fd = open( "/dev/bktr0", O_RDONLY );
---
>     char device_string[12];
>     sprintf(device_string,"/dev/bktr%d",App_res.device_number);
>     c->fd = open( device_string, O_RDONLY );
1112,1113c1114,1115
<         fprintf( stderr, "open(\"/dev/bktr0\") failed: %s\n",
<                  strerror(errno) );
---
>         fprintf( stderr, "open(\"%s\") failed: %s\n",
>                  device_string,strerror(errno) );
1116c1118,1120
<     c->tfd = open( "/dev/tuner0", O_RDONLY );
---
>
>     sprintf(device_string,"/dev/tuner%d",App_res.device_number);
>     c->tfd = open( device_string , O_RDONLY );
1118,1119c1122,1123
<         fprintf( stderr, "open(\"/dev/tuner0\") failed: %s\n",
<                  strerror(errno) );
---
>         fprintf( stderr, "open(\"%s\") failed: %s\n",
>                  device_string,strerror(errno) );   


Roger Hardiman,       | Department of Computer Science,
PhD Research Student, | University of Strathclyde,
roger@cs.strath.ac.uk | Glasgow, Scotland, UK
http://www.cs.strath.ac.uk/~roger



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?34BA074E.167E>