如何在一个java应用程序中支持多个摄像头???????? 我很想知道java怎么支持一个摄像头 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我什么都想知道.....GGGGGGGGGGGGGZZZZZZZZZZZZZ jmf把类型作为参数如"vfw:Microsoft WDM Image Capture (Win32):0"没有具体到每个摄像头.另外在一个程序中,同一类摄像头只能用一个.如何在一个java应用程序中支持多个摄像头???????? videoCDI = CaptureDeviceManager.getDevice( "vfw:Microsoft WDM Image Capture (Win32):0"); Format[] cfmts = videoCDI.getFormats(); MediaLocator loc = videoCDI.getLocator(); try { videoPlayer = Manager.createPlayer(loc); } catch (Exception e) {} videoPlayer.addControllerListener(this); videoPlayer.start(); JMFSecurityManager.loadLibrary("jmvfw");这条语句,调用jmvfw.dll,如何反编译过来呀!!! videoCDI是什么呀,楼主能不能给个更完整的一小段程序谢谢啦。 Vector videoDevices; //所有视频设备的向量 Vector devices; //所有视频、音频设备的向量 CaptureDeviceInfo cdi; //截取视频设备信息 VideoFormat videoFormat; // CaptureDeviceInfo videoCDI; CaptureDeviceInfo videoCDI21; String videoDeviceName; VideoFormatChooser chooserVideo; Player videoPlayer; CaptureDeviceInfo ci; //从摄像头中读取数据流 void captureData() { videoCDI = CaptureDeviceManager.getDevice( "vfw:Microsoft WDM Image Capture (Win32):0"); Vector deviceList = CaptureDeviceManager.getDeviceList(new VideoFormat( VideoFormat.YUV)); System.out.println("sum .." + deviceList.size()); if (deviceList.size() > 0) { videoCDI = (CaptureDeviceInfo) deviceList.firstElement(); } else { System.out.println("over..."); return; } Format[] cfmts = videoCDI.getFormats(); MediaLocator loc = videoCDI.getLocator(); try { videoPlayer = Manager.createPlayer(loc); } catch (Exception e) {} videoPlayer.addControllerListener(this); videoPlayer.start(); } // public synchronized void controllerUpdate(ControllerEvent event) { if (videoPlayer == null) { return; } if (event instanceof RealizeCompleteEvent) { visualComponent = videoPlayer.getVisualComponent(); if (visualComponent != null) { contentPane.add(visualComponent); } controlComponent = videoPlayer.getControlPanelComponent(); if (controlComponent != null) { contentPane.add(controlComponent, BorderLayout.SOUTH); } pack(); } } 求助一个题目 java socket客户端发送SQL语句到服务器端,服务器端怎么样将查询到的resultset再发送给客户端,客户端应该怎么样接受客户端? 很简单的问题java 数组 eclipse 能在界面中调用javap -c **.java 命令吗??? 1分攒RP 学习java的时间 如何在一个jlabel中实现滚动的字符串 哪位大哥告诉我怎么配置环境变量啊,我怎么配置了还是编译不了 tomcat低版本比高版本好?中文问题! super 问题 数据库连接池的问题? 关于一个字符串截取的问题
GGGGGGGGGGGGG
ZZZZZZZZZZZZZ
没有具体到每个摄像头.另外在一个程序中,同一类摄像头只能用一个.如何在一个java应用程序中支持多个摄像头????????
videoCDI = CaptureDeviceManager.getDevice(
"vfw:Microsoft WDM Image Capture (Win32):0");
Format[] cfmts = videoCDI.getFormats();
MediaLocator loc = videoCDI.getLocator();
try {
videoPlayer = Manager.createPlayer(loc);
}
catch (Exception e) {}
videoPlayer.addControllerListener(this);
videoPlayer.start();
这条语句,调用jmvfw.dll,如何反编译过来呀!!!
Vector devices; //所有视频、音频设备的向量
CaptureDeviceInfo cdi; //截取视频设备信息
VideoFormat videoFormat; //
CaptureDeviceInfo videoCDI;
CaptureDeviceInfo videoCDI21;
String videoDeviceName;
VideoFormatChooser chooserVideo;
Player videoPlayer;
CaptureDeviceInfo ci;
//从摄像头中读取数据流
void captureData() { videoCDI = CaptureDeviceManager.getDevice(
"vfw:Microsoft WDM Image Capture (Win32):0");
Vector deviceList = CaptureDeviceManager.getDeviceList(new VideoFormat(
VideoFormat.YUV));
System.out.println("sum .." + deviceList.size());
if (deviceList.size() > 0) {
videoCDI = (CaptureDeviceInfo) deviceList.firstElement();
}
else {
System.out.println("over...");
return;
}
Format[] cfmts = videoCDI.getFormats();
MediaLocator loc = videoCDI.getLocator();
try {
videoPlayer = Manager.createPlayer(loc);
}
catch (Exception e) {}
videoPlayer.addControllerListener(this);
videoPlayer.start(); }
//
public synchronized void controllerUpdate(ControllerEvent event) {
if (videoPlayer == null) {
return;
}
if (event instanceof RealizeCompleteEvent) {
visualComponent = videoPlayer.getVisualComponent();
if (visualComponent != null) {
contentPane.add(visualComponent);
}
controlComponent = videoPlayer.getControlPanelComponent();
if (controlComponent != null) {
contentPane.add(controlComponent, BorderLayout.SOUTH);
}
pack();
}
}