Set surface view fixed size adapting to preview

Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
camera2
Leo Ma 9 years ago
parent bd6f929b1a
commit 0f9e5f0589

@ -133,8 +133,9 @@ public class SrsCameraView extends GLSurfaceView implements GLSurfaceView.Render
}
public int[] setPreviewResolution(int width, int height) {
mCamera = openCamera();
getHolder().setFixedSize(width, height);
mCamera = openCamera();
mPreviewWidth = width;
mPreviewHeight = height;
Camera.Size rs = adaptPreviewResolution(mCamera.new Size(width, height));

Loading…
Cancel
Save