views:

689

answers:

2

Hello,

I'm using JMF to capture video stream (webcam) on my Java project.

The camera I'm using is recognized by JMF (JFMStudio) and I manage to get the video stream.

However, on JMF Registry Editor - there's a list of available capture devices, when I click "Add" on one of the items (including the one I need) I get a "Could not add item" error. Therefore this camera is not set in the registry of it (god know where) and later on it is not recognized by my project:

RGBFormat fmt = new RGBFormat(); // could be YUV - doesn't matter Vector v = CaptureDeviceManager.getDeviceList(fmt);

v is empty (while I know the video source is recognized by Java , since I manage to get video on JMF Studio).

Now, this happens only on Vista (where else) and not on XP.

I have a suspiction that somehow Vista security blocks Java from writing the registry file, but of course, I might be wrong.

One more comments: this is vfw:Microsoft WDM Image Capture(Win32):0 device.

Any idea ?

A: 

Well I've used JMF on Vista to capture a webcam image, and it worked. I did not use the JMF Studio though, so can't be of much help on there.

I posted some sample code in this post, you might take a look and see if it'll run for you.

JRL
A: 

Directed at anyone else in future who encounters the same issue

i had the same problem and i realized that it was because my Java Media Framework was installed under "C:\Program Files" by default. When I ran "jmfinit.exe" in \bin, I noticed I couldn't update the "jmf.properties" file

Error replicated below


Found device Microsoft WDM Image Capture (Win32) Querying device. Please wait... Exception on commit = java.io.FileNotFoundException: C:\Program Files\JMF2.1.1e\bin..\lib\jmf.properties (Access is denied)


I changed the security settings for the the JMF2.1.1e folder and everything works fine. I'm pretty sure installing it somewhere else works too

michael