开发者

Unable to detect Capture Device (webcam) through JMF

I am using JMF to operate my web cam.My usb webcam works perfectly with JMF, I used it in JMStudio however,when I make this call from my java code

deviceListVector = CaptureDeviceManager.getDeviceList( null );

my USB "webcam" is detected however when i am trying to detect webcam on my laptop it is not detecting any device.

How can I properly detect the webcam of lap开发者_如何学Gotop, and its formats, from JMF API?


  1. Make sure that the system you're using it on contains all the required files eg On Windows it requires certain dlls. The easiest way to do this is to use the setup program.
  2. Once JMF is properly installed run JMFRegistry?, detect the camera, then register and/or save the results. (In vista you'll need to run it as Administrator for it work)
  3. The code should now be returning the list of devices. Assuming the code has jmf.jar added to its project files.

You might be interested in alternatives: http://en.wikipedia.org/wiki/Java_Media_Framework#Alternatives The FMJ project is one that is designed to be API compatible(not everything is implemented yet) and does dynamic device detection.


Be sure to include jmf.jar & sound.jar in your project classpath. Although I had it in my CLASSPATH, it didn't work until I included those files in my project libraries.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜