我是学习java的,我准备做一个基于java的视频会话系统,但是对于如何获取视频流和将视频流数据在播放器里播放没有思路,大家有没有什么好的建议??非常感谢

解决方案 »

  1.   

    视频没了解过,音频的简单的使用过AudioClip 这个类 /**
     * 响应:有其他用户上线
     * @param resp
     */
    public void otherLogin(Response resp){
    //1.设置该用户状态为上线状态
    userMap.get(Integer.parseInt(resp.getSenderId())).setIsUp(1);
    //2.上线提示音
    new Thread(){
    @SuppressWarnings("deprecation")
    public void run() {
    URL musicURL = null;
    try {
    musicURL = new File("music\\up.wav").toURL();
    } catch (MalformedURLException e1) {
    e1.printStackTrace();
    }
    AudioClip ac = Applet.newAudioClip(musicURL);
    ac.play();
    };
    }.start();
    new ViewServiceImpl().flushInfo(userMap.get(Integer.parseInt(resp.getReciverId())));
    }