diff options
author | athurh <athurh@gmail.com> | 2012-07-07 22:11:22 +0200 |
---|---|---|
committer | Andrew Dodd <atd7@cornell.edu> | 2012-07-11 20:49:21 -0400 |
commit | cb1fe2677d70f398f715374c66a9726a009647d0 (patch) | |
tree | e00f003b8f1518f8ed46a3b6de0f46ea4ad8aa29 /camera | |
parent | c24039039a9598d4969e785a0746772d65a8fa4b (diff) | |
download | device_samsung_n7000-cb1fe2677d70f398f715374c66a9726a009647d0.zip device_samsung_n7000-cb1fe2677d70f398f715374c66a9726a009647d0.tar.gz device_samsung_n7000-cb1fe2677d70f398f715374c66a9726a009647d0.tar.bz2 |
n7000: camera: add ISO support
Change-Id: I175d720ded59c356eeafd35d48d2f18faaece975
Diffstat (limited to 'camera')
-rw-r--r-- | camera/CameraWrapper.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/camera/CameraWrapper.cpp b/camera/CameraWrapper.cpp index a605b08..9154216 100644 --- a/camera/CameraWrapper.cpp +++ b/camera/CameraWrapper.cpp @@ -96,6 +96,8 @@ const static char * video_preview_sizes[] = { "640x480,352x288,320x240,176x144" }; +const static char * iso_values[] = {"auto,ISO50,ISO100,ISO200,ISO400,ISO800","auto"}; + static char * camera_fixup_getparams(int id, const char * settings) { android::CameraParameters params; @@ -110,6 +112,8 @@ static char * camera_fixup_getparams(int id, const char * settings) params.set(android::CameraParameters::KEY_PREVIEW_SIZE, videoSize); } + params.set(android::CameraParameters::KEY_SUPPORTED_ISO_MODES, iso_values[id]); + android::String8 strParams = params.flatten(); char *ret = strdup(strParams.string()); @@ -129,6 +133,20 @@ char * camera_fixup_setparams(int id, const char * settings) params.set(android::CameraParameters::KEY_SUPPORTED_VIDEO_SIZES, video_preview_sizes[id]); } + if(params.get("iso")) { + const char* isoMode = params.get(android::CameraParameters::KEY_ISO_MODE); + if(strcmp(isoMode, "ISO50") == 0) + params.set(android::CameraParameters::KEY_ISO_MODE, "50"); + else if(strcmp(isoMode, "ISO100") == 0) + params.set(android::CameraParameters::KEY_ISO_MODE, "100"); + else if(strcmp(isoMode, "ISO200") == 0) + params.set(android::CameraParameters::KEY_ISO_MODE, "200"); + else if(strcmp(isoMode, "ISO400") == 0) + params.set(android::CameraParameters::KEY_ISO_MODE, "400"); + else if(strcmp(isoMode, "ISO800") == 0) + params.set(android::CameraParameters::KEY_ISO_MODE, "800"); + } + android::String8 strParams = params.flatten(); char *ret = strdup(strParams.string()); |