diff options
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()); |