summaryrefslogtreecommitdiffstats
path: root/camera/CameraWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'camera/CameraWrapper.cpp')
-rw-r--r--camera/CameraWrapper.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/camera/CameraWrapper.cpp b/camera/CameraWrapper.cpp
index 3f8b017..be454d9 100644
--- a/camera/CameraWrapper.cpp
+++ b/camera/CameraWrapper.cpp
@@ -93,6 +93,8 @@ static int check_vendor_module()
return rv;
}
+const static char * iso_values[] = {"auto,ISO100,ISO200,ISO400,ISO800","auto"};
+
static char * camera_fixup_getparams(int id, const char * settings)
{
bool videoMode = false;
@@ -125,6 +127,8 @@ static char * camera_fixup_getparams(int id, const char * settings)
}
#endif
+ params.set(android::CameraParameters::KEY_SUPPORTED_ISO_MODES, iso_values[id]);
+
/* We do support it, so announce it */
params.set(android::CameraParameters::KEY_VIDEO_SNAPSHOT_SUPPORTED, "true");
@@ -162,7 +166,19 @@ char * camera_fixup_setparams(int id, const char * settings)
}
#endif
- params.dump();
+ if (params.get("iso")) {
+ const char* isoMode = params.get(android::CameraParameters::KEY_ISO_MODE);
+ 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");
+ }
+
+ //params.dump();
android::String8 strParams = params.flatten();
char *ret = strdup(strParams.string());