简体   繁体   中英

How can Java JMF control my Mac camera?

I try to use JMF to capture image using my Mac's camera. But the result of following code shows I have no available device.

Vector v = CaptureDeviceManager.getDeviceList(null);
System.out.println("size = " + v.size());

Is it the case that Mac does not allow JMF to control its camera? How can I solve it?

AFAIR JMF could only handle camera resolutions up to 640 x 480 px. As such, I would not be surprised if it does not detect/support modern cameras, which went past that resolution a long time ago.

The solution might be to not use an API that was abandoned by Sun over a decade ago. It was a great API in its time, but times change, and it ..didn't.

  • Java-FX ? I added a ? to that since I have not used it, and am not sure if the Media source of the MediaPlayer can be a video camera.
  • VLCJ . Is a more general purpose media handling API, though again I've never used it personally.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM