哪个同胞有JAVA视频会议的源代码,或者哪能下到 JAVA视频会议的源代码 !!!帮你up ,找到了一定共享呀。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 java来做这个。。应该是一个很大的项目而且采用java,可能会有效率上的问题, /* * @(#)Vadio.java 1.0 04/01/29 * @auther jaddy0302 * * You can modify the template of this file in the * directory ..\JCreator\Templates\Template_1\Project_Name.java * * You can also create your own project template by making a new * folder in the directory ..\JCreator\Template\. Use the other * templates as examples. * */import java.awt.*;import java.awt.event.*;import javax.media.*;import java.util.*;import java.net.*;import javax.media.format.*;import javax.media.control.*;import javax.media.util.*;class Vadio extends Frame implements ControllerListener{ Vector videoDevices; //所有视频设备的向量 Vector devices; //所有视频、音频设备的向量 CaptureDeviceInfo cdi; //截取视频设备信息 VideoFormat videoFormat; // CaptureDeviceInfo videoCDI; CaptureDeviceInfo videoCDI21; String videoDeviceName; URL url=null; // VideoFormatChooser chooserVideo; Player videoPlayer; CaptureDeviceInfo ci; static Vadio contentPane=new Vadio(); //从摄像头中读取数据流 public static void main(String args[]) { try { System.out.println("Starting Vadio..."); contentPane.captureData(); contentPane.setSize(400, 400); contentPane.setTitle("Vadio"); contentPane.setVisible(true); }catch(Exception e) { e.printStackTrace(); } } 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(); for(int i=0;i<cfmts.length;i++) System.out.println(cfmts[i].getEncoding()); MediaLocator loc = videoCDI.getLocator(); //loc.getProtocol() try { videoPlayer = Manager.createPlayer(loc); } catch (Exception e) { e.printStackTrace(); } videoPlayer.start(); videoPlayer.addControllerListener(this); } // public synchronized void controllerUpdate(ControllerEvent event) { if (videoPlayer == null) { return; } if (event instanceof RealizeCompleteEvent) { Component visualComponent = videoPlayer.getVisualComponent(); if (visualComponent != null) { System.out.println("test"); contentPane.add(visualComponent); } Component controlComponent = videoPlayer.getControlPanelComponent(); if (controlComponent != null) { contentPane.add(controlComponent); } pack(); } }}这是一个完整的视频采集程序,如果有两个视频采集源,在数组中可以遍历,如果想同时将两个视频都显示出来,一定要注意要在不同的线程中启动,而且两个视频采集卡应该是不同类型的,不能有相同的标识符,如果相同则一定找不到,比如两个摄像头或两个同一厂家生产的数码相机,则JMF一定找不到另外一个。 劝你趁早放弃,jmf操作摄像头时还要在客户机上设置classpath,如果只是在服务器端也就算了,太麻烦了。 用java applet来做就是了 to hapybird(hapybird) :说的就是用Java applet做时要做在client上设置classpath,要加一个jmf.jar很麻烦. java jna 调用linux中so库有兴趣的进来瞅瞅 操作同一张表需要事务吗? 求高人解析一段字符串 在线等。。。struts2 与json 转换的问题。。答对后。。马上加分。。 学习j2ee书籍选择的问题 求教:hibernate使用oracle sequence报错 有关两个服务器的跳转 javabean 在 Tomcat 5.0 里的热拔插问题 实战EJB2。0(中文),不甘独享,请大家分享! 请问:在哪里可以下Eclipse? (在线等) EJB,Struts应用中 build index.jsp是出错???? ejb中如何访问远程数据库,如:sqlserver
应该是一个很大的项目
而且采用java,可能会有效率上的问题,
* @(#)Vadio.java 1.0 04/01/29
* @auther jaddy0302
*
* You can modify the template of this file in the
* directory ..\JCreator\Templates\Template_1\Project_Name.java
*
* You can also create your own project template by making a new
* folder in the directory ..\JCreator\Template\. Use the other
* templates as examples.
*
*/
import java.awt.*;
import java.awt.event.*;
import javax.media.*;
import java.util.*;
import java.net.*;
import javax.media.format.*;
import javax.media.control.*;
import javax.media.util.*;class Vadio extends Frame implements ControllerListener
{
Vector videoDevices; //所有视频设备的向量
Vector devices; //所有视频、音频设备的向量
CaptureDeviceInfo cdi; //截取视频设备信息
VideoFormat videoFormat; //
CaptureDeviceInfo videoCDI;
CaptureDeviceInfo videoCDI21;
String videoDeviceName;
URL url=null;
// VideoFormatChooser chooserVideo;
Player videoPlayer;
CaptureDeviceInfo ci;
static Vadio contentPane=new Vadio();
//从摄像头中读取数据流
public static void main(String args[])
{
try
{
System.out.println("Starting Vadio...");
contentPane.captureData();
contentPane.setSize(400, 400);
contentPane.setTitle("Vadio");
contentPane.setVisible(true);
}catch(Exception e)
{
e.printStackTrace();
}
}
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();
for(int i=0;i<cfmts.length;i++)
System.out.println(cfmts[i].getEncoding());
MediaLocator loc = videoCDI.getLocator();
//loc.getProtocol()
try {
videoPlayer = Manager.createPlayer(loc);
}
catch (Exception e)
{
e.printStackTrace();
}
videoPlayer.start();
videoPlayer.addControllerListener(this);
}
//
public synchronized void controllerUpdate(ControllerEvent event)
{
if (videoPlayer == null) {
return;
}
if (event instanceof RealizeCompleteEvent) {
Component visualComponent = videoPlayer.getVisualComponent();
if (visualComponent != null) {
System.out.println("test");
contentPane.add(visualComponent);
}
Component controlComponent = videoPlayer.getControlPanelComponent();
if (controlComponent != null) {
contentPane.add(controlComponent);
}
pack();
}
}
}
这是一个完整的视频采集程序,如果有两个视频采集源,在数组中可以遍历,如果想同时将两个视频都显示出来,一定要注意要在不同的线程中启动,而且两个视频采集卡应该是不同类型的,不能有相同的标识符,如果相同则一定找不到,比如两个摄像头或两个同一厂家生产的数码相机,则JMF一定找不到另外一个。
说的就是用Java applet做时要做在client上设置classpath,要加一个jmf.jar很麻烦.