[IOXperts Video-Developers] frame grabbing with USB QuickCam?

Steve Sisak steve.sisak at ioxperts.com
Tue Jan 6 09:58:48 GMT 2004


Hi Rob,

Sorry for the delayed response -- I've been out with the flu for a 
couple weeks.

At 12:18 PM -0700 1/3/04, rob shaw wrote:
>We've been working with a QuickCam Orbit, on OS 9.  Thanks to
>an IOXperts driver, the pan/tilt is operational under program control,
>but we're having difficulty grabbing frames.  What I've been doing is
>opening a component using 'vdig' in the componentType field of the
>ComponentDescriptor, and calling FindNextComponent(), then
>OpenComponent.

This is valid.

>The "ComponentInstance" that gets returned
>works fine for pan/tilting, but when I call VDSetPlayThruDestination()
>in order to use GrabOneFrame(), I get error -2208, "can't do DMA...".
>This code works fine on the built-in video of a Powermac 8500, and
>and old serial port QuickCam.

This is a correct result -- it means that you have all the parameters 
correct and the 'vdig' doesn't do DMA to the destination you 
requested.

(DMA would only make sense if the digitizer hardware had DMA access 
to your video card's frame buffer, which the build-in digitizer on 
the 8500 does, but no USB or FireWire device would)

Modern vdigs are usually "compressed source only", meaning that they 
return buffers of compressed* data to the Sequence Grabber and 
QuickTime handles playthrough if needed.

Before proceeding, you should read this _develop_ article:

<http://www.mactech.com/articles/develop/issue_14/king_woodcock_final.html>

* in this context, a buffer of raw RGB data is considered 
"compressed" because it isn't a PixMap - most of our digitizers 
return Component Video ('yuv2') data and let QT convert it to RGB as 
needed.

>A few years ago I tried "Sequence Grabber Components", using
>"bottlenecks", but the results were painfully slow.  The gurus at IOXperts
>have suggested:
>a) getting a ComponentInstance via the sequence grabber stuff, and
>b) following the "minimung" example from apple sample code.


>Before I spend the hours crashing my machine every five minutes, I
>thought I'd ask whether anyone has gotten a fast frame grab to work
>on a USB QuickCam.  What we're doing is grabbing a frame, then doing
>video processing, in a tight loop.  Thanks for any advice!

You should have no problem getting full frame rate (unless your code 
is too slow).

Normally we discourage bypassing the Sequence Grabber because you 
will have to deal with every possible type of digitizer yourself, but 
compressed source digitzers are also pretty easy to call.

Probably the best thing is for you to read the article above and ask 
more questions.

HTH,

-Steve
-- 
_________________________________________________________________________
Steve Sisak, CTO                                 steve.sisak at ioxperts.com
IOXperts, Inc.                                     voice: +1 617 876-2572
87 Bristol St #3A                                    fax: +1 617 876-2337
Cambridge, MA 02139                               mobile: +1 617 388-6476


More information about the Video-Developers mailing list