title: Barcode scanner SurfaceView Rectangle
body: <p>I am now developing a barcode scanner application in android.I have achieved the camera part using SurfaceView in android. And i have drawn a rectangle overlay at centre on surfaceview. Now i want the Camera preview frames only through the particular rectangle line drawn. 
    Now it seems i am getting preview frame from the entire surface. I tried to restrict this using setPreviewSize in camera parameters.
  But here i am not able to give Previewsize which is not supported by the camera. 
   So how could i achieve this and i want to know how other barcode scanner applications do this?(e.g zxing barcode scanner)</p>