summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/camera2/Parameters.h
diff options
context:
space:
mode:
Diffstat (limited to 'services/camera/libcameraservice/camera2/Parameters.h')
-rw-r--r--services/camera/libcameraservice/camera2/Parameters.h35
1 files changed, 28 insertions, 7 deletions
diff --git a/services/camera/libcameraservice/camera2/Parameters.h b/services/camera/libcameraservice/camera2/Parameters.h
index 817d001..f768605 100644
--- a/services/camera/libcameraservice/camera2/Parameters.h
+++ b/services/camera/libcameraservice/camera2/Parameters.h
@@ -29,12 +29,17 @@
namespace android {
namespace camera2 {
-// Current camera state; this is the full state of the Camera under the old
-// camera API (contents of the CameraParameters object in a more-efficient
-// format, plus other state). The enum values are mostly based off the
-// corresponding camera2 enums, not the camera1 strings. A few are defined here
-// if they don't cleanly map to camera2 values.
+/**
+ * Current camera state; this is the full state of the Camera under the old
+ * camera API (contents of the CameraParameters object in a more-efficient
+ * format, plus other state). The enum values are mostly based off the
+ * corresponding camera2 enums, not the camera1 strings. A few are defined here
+ * if they don't cleanly map to camera2 values.
+ */
struct Parameters {
+ /**
+ * Parameters and other state
+ */
int cameraId;
int cameraFacing;
@@ -104,6 +109,12 @@ struct Parameters {
bool recordingHint;
bool videoStabilization;
+ enum lightFxMode_t {
+ LIGHTFX_NONE = 0,
+ LIGHTFX_LOWLIGHT,
+ LIGHTFX_HDR
+ } lightFx;
+
String8 paramsFlattened;
// These parameters are also part of the camera API-visible state, but not
@@ -117,9 +128,13 @@ struct Parameters {
int currentAfTriggerId;
bool afInMotion;
+ int precaptureTriggerCounter;
+
uint32_t previewCallbackFlags;
bool previewCallbackOneShot;
+ bool zslMode;
+
// Overall camera state
enum State {
DISCONNECTED,
@@ -132,7 +147,7 @@ struct Parameters {
} state;
// Number of zoom steps to simulate
- static const unsigned int NUM_ZOOM_STEPS = 10;
+ static const unsigned int NUM_ZOOM_STEPS = 30;
// Full static camera info, object owned by someone else, such as
// Camera2Device.
@@ -149,7 +164,9 @@ struct Parameters {
int32_t maxFaces;
} fastInfo;
- // Parameter manipulation and setup methods
+ /**
+ * Parameter manipulation and setup methods
+ */
Parameters(int cameraId, int cameraFacing);
~Parameters();
@@ -170,6 +187,9 @@ struct Parameters {
// Validate and update camera parameters based on new settings
status_t set(const String8 &params);
+ // Update passed-in request for common parameters
+ status_t updateRequest(CameraMetadata *request) const;
+
// Static methods for debugging and converting between camera1 and camera2
// parameters
@@ -184,6 +204,7 @@ struct Parameters {
static int sceneModeStringToEnum(const char *sceneMode);
static flashMode_t flashModeStringToEnum(const char *flashMode);
static focusMode_t focusModeStringToEnum(const char *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,