From d458f243fccabfa85a3705e56708b097a70d7a6d Mon Sep 17 00:00:00 2001 From: Dimitar Borisov Date: Sat, 29 Sep 2012 11:42:16 +0300 Subject: Camera_test: Video mode fix When start recoding camera is not in video mode but in HQ mode. This is because the width and height are different for preview and video recording. Preview is restarted and in this case the mode is lost and the default HQ mode is set. To prevent this behaviour width and height for the preview are set the same as for video recording. Change-Id: I72df65f7732b3f4067cd4b3e9b5047081a0b0dd7 Signed-off-by: Dimitar Borisov --- test/CameraHal/camera_test_menu.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/CameraHal/camera_test_menu.cpp b/test/CameraHal/camera_test_menu.cpp index 03affe8..23e691d 100644 --- a/test/CameraHal/camera_test_menu.cpp +++ b/test/CameraHal/camera_test_menu.cpp @@ -1303,7 +1303,11 @@ int startPreview() { params.set(KEY_S3D_CAP_FRAME_LAYOUT, stereoCapLayout[stereoCapLayoutIDX]); } - params.setPreviewSize(preview_Array[previewSizeIDX]->width, preview_Array[previewSizeIDX]->height); + if ((cameraInfo.orientation == 90 || cameraInfo.orientation == 270) && recordingMode) { + params.setPreviewSize(previewHeight, previewWidth); + } else { + params.setPreviewSize(previewWidth, previewHeight); + } params.setPictureSize(capture_Array[captureSizeIDX]->width, capture_Array[captureSizeIDX]->height); // calculate display orientation from sensor orientation -- cgit v1.1