java程序里怎么同时启到多个摄像头

FireMain 2009-08-11 08:42:01

内容如题。。。。。。。。。???
...全文
258 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
FireMain 2009-08-14
  • 打赏
  • 举报
回复
我找全部设置
Vector device = CaptureDeviceManager.getDeviceList(new VideoFormat(VideoFormat.YUV));// new
// VideoFormat(VideoFormat.RGB)

if (device != null && device.size() > 0) {
int deviceCount = device.size();
videoDevice = new ArrayList<CaptureDeviceInfo>();
audioDevice = new ArrayList<CaptureDeviceInfo>();
Format[] format;
for (int i = 0; i < deviceCount; i++) {
cpInof = (CaptureDeviceInfo) device.elementAt(i);
format = cpInof.getFormats();
for (int j = 0; j < format.length; j++) {
if (format[j] instanceof VideoFormat) {
videoDevice.add(cpInof);
break;
} else if (format[j] instanceof AudioFormat) {
audioDevice.add(cpInof);
break;
}
}
}
}

但这样我得到的videoDevice 里面只有一个vfw:Microsoft WDM Image Capture (Win32):0
这一个 我明明有两个摄像头啊 一个机器上的另一个Usb端口的 为什么啊
  • 打赏
  • 举报
回复
重命名 加个
蒋晟 2009-08-14
  • 打赏
  • 举报
回复
VFW有这个限制,不过97年就被淘汰的技术,有缺陷也很正常。
老紫竹 2009-08-13
  • 打赏
  • 举报
回复
和启用一个有区别吗?我不认为有。除非有硬件冲突,不能同时使用!
蒋晟 2009-08-12
  • 打赏
  • 举报
回复
得看摄像头支持什么API
一般摄像头的Windows驱动需要支持DirectShow或者WIA。
healer_kx 2009-08-11
  • 打赏
  • 举报
回复
那也得有API支持才行啊,就是C++也得要API啊。

62,621

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧