diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2012-10-02 18:04:23 -0700 |
---|---|---|
committer | Eino-Ville Talvala <etalvala@google.com> | 2012-10-02 18:04:23 -0700 |
commit | f93992e4b0dce1755ef4d2571b0930ef3a1107f0 (patch) | |
tree | ee8f63ebf9000acbad626c8d336fc73b60a58411 /services/camera/libcameraservice/camera2/Parameters.h | |
parent | f94abc50fb0bed3cac3b9e6ce2b35dff1cf14045 (diff) | |
parent | 2cde1722cdda85b38ca95badbb2e2700dacd3be6 (diff) | |
download | frameworks_av-f93992e4b0dce1755ef4d2571b0930ef3a1107f0.zip frameworks_av-f93992e4b0dce1755ef4d2571b0930ef3a1107f0.tar.gz frameworks_av-f93992e4b0dce1755ef4d2571b0930ef3a1107f0.tar.bz2 |
resolved conflicts for merge of 9bf263b2 to master
Change-Id: I28da6f16a1d044864c81d5f1dcf6543169c09460
Diffstat (limited to 'services/camera/libcameraservice/camera2/Parameters.h')
-rw-r--r-- | services/camera/libcameraservice/camera2/Parameters.h | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/services/camera/libcameraservice/camera2/Parameters.h b/services/camera/libcameraservice/camera2/Parameters.h index af23a4e..cf2bb73 100644 --- a/services/camera/libcameraservice/camera2/Parameters.h +++ b/services/camera/libcameraservice/camera2/Parameters.h @@ -23,6 +23,8 @@ #include <utils/Mutex.h> #include <utils/String8.h> #include <utils/Vector.h> +#include <utils/KeyedVector.h> +#include <camera/CameraParameters.h> #include "CameraMetadata.h" @@ -115,6 +117,7 @@ struct Parameters { LIGHTFX_HDR } lightFx; + CameraParameters params; String8 paramsFlattened; // These parameters are also part of the camera API-visible state, but not @@ -162,8 +165,26 @@ struct Parameters { int32_t arrayHeight; uint8_t bestFaceDetectMode; int32_t maxFaces; + struct OverrideModes { + flashMode_t flashMode; + uint8_t wbMode; + focusMode_t focusMode; + OverrideModes(): + flashMode(FLASH_MODE_INVALID), + wbMode(ANDROID_CONTROL_AWB_OFF), + focusMode(FOCUS_MODE_INVALID) { + } + }; + DefaultKeyedVector<uint8_t, OverrideModes> sceneModeOverrides; } fastInfo; + // Quirks information; these are short-lived flags to enable workarounds for + // incomplete HAL implementations + struct Quirks { + bool triggerAfWithAuto; + bool useZslFormat; + } quirks; + /** * Parameter manipulation and setup methods */ @@ -185,7 +206,10 @@ struct Parameters { size_t minCount=0, size_t maxCount=0) const; // Validate and update camera parameters based on new settings - status_t set(const String8 ¶ms); + status_t set(const String8 ¶mString); + + // Retrieve the current settings + String8 get() const; // Update passed-in request for common parameters status_t updateRequest(CameraMetadata *request) const; @@ -208,12 +232,16 @@ struct Parameters { static const char *formatEnumToString(int format); static int wbModeStringToEnum(const char *wbMode); + static const char* wbModeEnumToString(uint8_t wbMode); static int effectModeStringToEnum(const char *effectMode); static int abModeStringToEnum(const char *abMode); static int sceneModeStringToEnum(const char *sceneMode); static flashMode_t flashModeStringToEnum(const char *flashMode); + static const char* flashModeEnumToString(flashMode_t flashMode); static focusMode_t focusModeStringToEnum(const char *focusMode); + static const char* focusModeEnumToString(focusMode_t focusMode); static lightFxMode_t lightFxStringToEnum(const char *lightFxMode); + static status_t parseAreas(const char *areasCStr, Vector<Area> *areas); static status_t validateAreas(const Vector<Area> &areas, @@ -233,7 +261,6 @@ struct Parameters { int arrayYToNormalized(int height) const; int normalizedXToArray(int x) const; int normalizedYToArray(int y) const; - }; // This class encapsulates the Parameters class so that it can only be accessed |