java程序里怎么同时启到多个摄像头 内容如题??? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 那也得有API支持才行啊,就是C++也得要API啊。 得看摄像头支持什么API一般摄像头的Windows驱动需要支持DirectShow或者WIA。 我找全部设置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端口的 为什么啊 VFW有这个限制,不过97年就被淘汰的技术,有缺陷也很正常。 关于内部类的继承问题 请问java类型问题 遇到所谓的“过大的整数”错误! 求java创建一个文件的快捷方式的代码 throw到底是什么东东 『经典电子书下载』Java 2 图形设计卷Ⅰ:AWT Ⅱ:SWING 有人研究过Lucene的算法么? sharetop(老大不小)重出江湖,散分! 小问题,在线!! 关于BufferedWriter缓冲流 这个程序怎么改才能正常运行 关于UDP协议
一般摄像头的Windows驱动需要支持DirectShow或者WIA。
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端口的 为什么啊