Code example for Camera

Methods: getParameterssetParametersunlock

0
		stopRecording(); 
	} 
	 
    private void initMediaRecorder() { 
    	camera = Camera.open();
		Camera.Parameters p = camera.getParameters();
		/*p.setPreviewSize(320, 240); 
		p.setPreviewFormat(PixelFormat.YCbCr_422_SP); 
		p.setPictureFormat(PixelFormat.YCbCr_422_SP);*/ 
		p.set("orientation", "landscape");
		p.set("rotation", 90);
		camera.setParameters(p);
		 
    	camera.unlock();
    	 
		recorder = new MediaRecorder();
		recorder.setCamera(camera);
		recorder.setPreviewDisplay(surfaceHolder.getSurface());
		recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
		recorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);
		recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);