FW: [AG-TECH] Multiple Capture Challenge

Ivan R. Judson judson at mcs.anl.gov
Sun Nov 10 21:52:11 CST 2002



..........
Ivan R. Judson .~. http://www.mcs.anl.gov/~judson
Futures Laboratory .~.  630 252 0920
Argonne National Laboratory .~. 630 252 6424 Fax
 

> -----Original Message-----
> From: owner-openmash-developers at bmrc.berkeley.edu 
> [mailto:owner-openmash-developers at bmrc.berkeley.edu] On 
> Behalf Of Matthew Delco
> Sent: Sunday, November 10, 2002 9:39 PM
> To: 'Open Mash Developers'
> Subject: RE: [AG-TECH] Multiple Capture Challenge
> 
> 
> static VfwScanner find_vfw_devices(4);
> 
> is a piece of code that's basically used in all mash video 
> device "drivers".  It looks like a function definition/call, 
> but what it's really doing is allocating an instance of 
> "VfwScanner" called "find_vfw_devices", passing the argument 
> (4) to the constructor.
> 
> So, you want to examine VfwScanner::VfwScanner() in 
> video-win32.cc, which basically dynamically allocates an 
> instance of "VfwDevice" for each device that's returned by 
> V4L's capGetDriverDescription().
> 
> Thus, increasing 4 to a larger value seems appropriate.  In 
> fact, it might be better to avoid a static value, and use 
> something like the following for 
> VfwScanner::VfwScanner():
> 
> char deviceName[80] ;
> char deviceVersion[100] ;
> int index = 0;
> 
> while(capGetDriverDescription(index++,
> 					(LPSTR)deviceName,
> 					sizeof(deviceName),
> 					(LPSTR)deviceVersion,
> 					sizeof(deviceVersion))) {
> 	char* wrk = new char[32];
> 	sprintf(wrk, "VideoCapture/VFW%d", index-1);
> 	new VfwDevice(wrk, strdup(deviceName), index-1);
> }
> 
> MD
> 
> P.S. I only sent this to openmash-developers and not Andrew 
> Heisen since pop/imap (at least as I have it configured) is 
> restricted to local e-mail accts.
> 
> > I just looked at the source code for vic.  There is a static array 
> > inside the video device abstractions that only allows 4 devices. It 
> > looks like it would be very easy to change it.
> > 
> > If you download the current Open Mash code and go to the file
> > 	mash-code/mash/video/video-win32.cc
> > Then search for a line with
> > 	static VfwScanner find_vfw_devices(4);
> > 
> > I am not certain that this is the place that upper bound on 
> devices is 
> > set, but it might be.  I tried to find the definition of the 
> > find_vfw_devices but couldn't find it.  It is part of the 
> MS software 
> > libraries.  I'm pretty sure the arguement is the number of devices.
> so,
> > try changing that to 6 or 8 and recompiling the code - that 
> might fix 
> > your problem.
> > 	Larry
> 




More information about the ag-dev mailing list