[cpia] Re: 2 cameras streaming at once?

Peter Pregler Peter_Pregler@email.com
Sat, 9 Sep 2000 12:18:51 +0200


On Tue, Sep 05, 2000 at 12:45:09PM +0200, WJ Vlothuizen wrote:
> 
> While looking through the source of cpia.c I got the impression that the
> driver will not really perform double buffering in the sense that one
> buffer is filled in the background while the other is 'used' by the
> client. Am I right, and would such behaviour be required/wanted by
> video4linux?

Sorry for the late reply. Your impression is correct. I wrote the
v4l-layer with a single parport camera. With the 2.2. parport-driver I
could never get the interrupt-handling correct that you need to
implement streaming camera driven capturing. This might work with the
cleaner 2.4 parport driver.

Also due my limited time I wanted to devote to this and non-existing
kernel-knowlege on my side things became unstable on SMP-machines. So I
fell back to a synchronous polling scheme which works resonable well in
all cases for a single camera on a fast enough machine. You basically
have to rewrite fetch_frame/capture_frame in cpia.c to switch to an
interrupt-drive scheme. The hooks for the interrupt-routines should be
there in cpai_usb.c and cpia_pp.c. As for the first one I have no idea
if the interrupts are generated correctly. As for the second I am
almost sure that it needs quite some debugging.

Now your question: is this really necessary? I have a parport and a
usb-camera right now. On PIII-350 I get no visible performance
degradation if I have gqcam open with both. So I guess unless you don't
want to do serious video-capturing on a smp-machine streaming will not
gain you that much. But who wants to do that with a bunch of
CPiA-cameras anyway? In short right now it is a desktop driver for a
desktop camera.

I will get some usb-cameras in a few weeks. Until I do have the
hardware to test I don't want to dig into the two-usb cameras driver
problem.

Greetings,  Peter

-- 
Even the thought that a ship was waiting to take him back to Earth
did not wipe out the sense of loss he felt at that moment.
-------------------------------
Email: Peter_Pregler@email.com