我尝试使用VLJC流式传输网络摄像头,但如何停止网络摄像头流?这是我启动网络摄像头的代码:
private static void VCVideo() {
MediaPlayerFactory mediaPlayerFactory = new MediaPlayerFactory();
EmbeddedMediaPlayer mediaPlayerForVC = mediaPlayerFactory.newEmbeddedMediaPlayer();
EmbeddedMediaPlayer mediaPlayerForDRV = mediaPlayerFactory.newEmbeddedMediaPlayer();
mediaPlayerForVC.setVideoSurface(mediaPlayerFactory.newVideoSurface(canvasMainCamera_VC));
mediaPlayerForVC.playMedia(CAM_VC_ADDRESS);
}
mediaPlayerForVC.stop()
给我一个异常错误。我也无法使用mediaPlayerForVC.saveSnapshot(file)
拍摄快照。它也给了我一个异常错误。我在这里做错了什么?