summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorathurh <athurh@gmail.com>2012-09-10 01:45:50 +0200
committerathurh <athurh@gmail.com>2012-09-10 01:45:50 +0200
commit9ed62aeb6e2b7c15bf7a5db091c1b5a34b77c8da (patch)
tree8d09b9ed5ecf12ed2ee7a089de6b992725ee0165 /camera
parentcbb1f1e1083c2baed5175be9837d0ed5e2bf544b (diff)
downloaddevice_samsung_galaxys2-common-9ed62aeb6e2b7c15bf7a5db091c1b5a34b77c8da.zip
device_samsung_galaxys2-common-9ed62aeb6e2b7c15bf7a5db091c1b5a34b77c8da.tar.gz
device_samsung_galaxys2-common-9ed62aeb6e2b7c15bf7a5db091c1b5a34b77c8da.tar.bz2
camera: Fix camcorder preview sizes
Change-Id: I66d23df932ae8d2babf4fa80033ce5f2f047e0a9
Diffstat (limited to 'camera')
-rw-r--r--camera/CameraWrapper.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/camera/CameraWrapper.cpp b/camera/CameraWrapper.cpp
index c360705..6e886a7 100644
--- a/camera/CameraWrapper.cpp
+++ b/camera/CameraWrapper.cpp
@@ -92,6 +92,8 @@ static int check_vendor_module()
}
const static char * iso_values[] = {"auto,ISO50,ISO100,ISO200,ISO400,ISO800","auto"};
+const static char * video_preview_sizes[] = {"1920x1080,1280x720,640x480",
+ "640x480,352x288,320x240,176x144"};
static char * camera_fixup_getparams(int id, const char * settings)
{
@@ -100,6 +102,14 @@ static char * camera_fixup_getparams(int id, const char * settings)
// fix params here
+ params.remove(android::CameraParameters::KEY_SUPPORTED_VIDEO_SIZES);
+
+ if(params.get("cam_mode") && !strcmp(params.get("cam_mode"), "1")) {
+ params.set(android::CameraParameters::KEY_SUPPORTED_PREVIEW_SIZES, video_preview_sizes[id]);
+ const char* videoSize = params.get(android::CameraParameters::KEY_VIDEO_SIZE);
+ params.set(android::CameraParameters::KEY_PREVIEW_SIZE, videoSize);
+ }
+
params.set("iso-values", iso_values[id]);
android::String8 strParams = params.flatten();