summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcKe <herderkewitz@googlemail.com>2014-05-25 10:12:13 +0200
committerMarcKe <herderkewitz@googlemail.com>2014-05-29 08:21:32 +0200
commit9100865b39e0fcdc8b0c86a2eb8e52932cebd5a8 (patch)
tree6d5d8983ab4b492b453b3a5a124f6c188b33f1ad
parent22b9a3bffe68a17cc048255415be3ecc55a9140f (diff)
downloaddevice_samsung_i9300-9100865b39e0fcdc8b0c86a2eb8e52932cebd5a8.zip
device_samsung_i9300-9100865b39e0fcdc8b0c86a2eb8e52932cebd5a8.tar.gz
device_samsung_i9300-9100865b39e0fcdc8b0c86a2eb8e52932cebd5a8.tar.bz2
Add iso mode settings to the CameraWrapper
It's taken from the old wrapper and works just fine. Change-Id: I4c6f5c040f5c4612d4694611b62417c7521dca84
-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());