Code example for Camera

Methods: getParameterssetParameterssetPreviewDisplaystartPreview

0
	// initialize camera 
	private void setupCamera( SurfaceView sv ) throws java.io.IOException {
 
		//Log.v( TAG, "::setupCamera: " + sv.toString() ); 
 
		Camera.Parameters param = cam.getParameters();
		param.setPreviewFormat( PixelFormat.YCbCr_420_SP );
		param.setPreviewSize( 640, 480 );
		cam.setParameters( param );
 
		cam.setPreviewDisplay( sv.getHolder() );
		cam.startPreview();
	} 
 
 
	// initialize output directory 
	private void setupOutdir() { 
 
		Time now = new Time();
		now.set( System.currentTimeMillis() );