AC.motion

July 10, 2005

JMF cam image capture woes (mostly solved)

With the W2K "Imaging" application I can choose between the two cams, "Creative WebCam 3 or WebCam Plus" and "Logitech Camera" (which I installed first). When trying to capture an image, a preview application (specific to the camera) shows up in both cases, but only the Logitech works. Since I only had installed the drivers for the Creative cam I installed the Web Cam Control app as well. After I rebootet I installed the update, too. Capturing images with the app that comes with the cam now works, but not with the "Imaging" app.

Results of my research. VfW (Video for Windows) is old. WDM (Windows Drivers Model) is new. There seems to be a WDM wrapper for VfW, which makes WDM drivers appear as VfW drivers (in that order). The cams are not shown as an option by the USB device manager in the system tray. The Creative image capture software works with the Logitech cam, too (!). Works the other way round as well (!!). Both cams show up under "Bildbearbeitungsgeräte" in the device manager. Only the Creative cam shows up as a scanner device (WDM). The button on the Creative cam works, the one on the Logitech doesn't. The JMF registry detects the Logitech as "vfw:Microsoft WDM Image Capture (Win32):0" and the Creative as "", ahm: not at all! After plugging them in both, the Creative is shown as "vfw:Video Blaster WebCam 3/WebCam Plus (VFW):1". Does that make me happy? Not yet...

Tried out JMF Studio (comes with JMF) for the heck of it. To my surprise both cameras are now options for video capture, and it works, and (at 320 x 240) with only 20% CPU load. What the?! So: why does the stuff work with JMF Studio and not in my program!! Holy S.: after copying the properties file created by the JMF registry into the workspace project folder things suddently work... Well, thanks for sending me circling for 4h!

Weird: After starting Eclipse 3.1 suddently it didn't find any imports from the RXTX lib any more; after shutdown/restart it did. Still, I get an error now that the device object can be created. Some "jmvfw" lib is missing, and Google does not offer much on the subject. Resorted to defining an Eclipse user lib containing the JMF JARs and setting the "native library path" of that lib to the JMF dir. Works!

Now the well known JMF problems start: both VfW devices seem to refer to the same camera. More on that some other day...

0 Comments:

Post a Comment

<< Home