开启摄像头和关闭摄像头

打开摄像头:
Camera camera = Camera.getCamera();
camera.setMode(240,180,15);
camera.setKeyFrameInterval(60);
camera.setQuality(144,85 );
Video video = new Video(camera.width*2, camera.height*2);
video.attachCamera(camera);
关闭摄像头:
camera = Camera.getCamera(null);
camera = null;
video.attachCamera(null);

你可能感兴趣的:(开启摄像头和关闭摄像头)