我试图使用以下代码段
在J2ME应用程序中捕获视频private void createCamera() throws IOException, MediaException {
videoComponent = VideoComponent.createVideoPeer("capture://video");
videoComponent.setPreferredH(height);
videoComponent.setPreferredW(cameraForm.getWidth());
player = (Player) videoComponent.getNativePeer();
player.realize();
player.prefetch();
videoControl = (VideoControl) player.getControl("VideoControl");
}
当我在真实设备上运行应用程序时,我收到错误:
javax.microedition.media.MediaException: Invalid locator: capture://video
如果我使用字符串capture:// image,它只会显示摄像头的图像。我该如何解决这个问题?