[英]How can Java JMF control my Mac camera?
I try to use JMF to capture image using my Mac's camera. 我尝试使用JMF使用Mac的相机捕获图像。 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? Mac是否不允许JMF控制其相机? How can I solve it?
我该如何解决?
AFAIR JMF could only handle camera resolutions up to 640 x 480 px. AFAIR JMF只能处理高达640 x 480像素的相机分辨率。 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. 解决方案可能是不使用Sun十年前放弃的API。 It was a great API in its time, but times change, and it ..didn't.
在那个时代,它是一个很棒的API,但是时代在变化,..没有。
Media
source of the MediaPlayer
can be a video camera. MediaPlayer
的Media
来源是否可以是摄像机。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.