Pergunta

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?

Foi útil?

Solução

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.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top