summaryrefslogtreecommitdiffstats
path: root/camera/inc/CameraProperties.h
diff options
context:
space:
mode:
Diffstat (limited to 'camera/inc/CameraProperties.h')
-rw-r--r--camera/inc/CameraProperties.h105
1 files changed, 74 insertions, 31 deletions
diff --git a/camera/inc/CameraProperties.h b/camera/inc/CameraProperties.h
index 6f05877..bfc6012 100644
--- a/camera/inc/CameraProperties.h
+++ b/camera/inc/CameraProperties.h
@@ -30,15 +30,27 @@
#include <ctype.h>
#include "cutils/properties.h"
-namespace android {
+#include "Common.h"
-#define MAX_CAMERAS_SUPPORTED 2
+namespace Ti {
+namespace Camera {
+
+#define MAX_CAMERAS_SUPPORTED 3
#define MAX_SIMUL_CAMERAS_SUPPORTED 1
#define MAX_PROP_NAME_LENGTH 50
#define MAX_PROP_VALUE_LENGTH 2048
-#define EXIF_MAKE_DEFAULT "default_make"
-#define EXIF_MODEL_DEFAULT "default_model"
+#define REMAINING_BYTES(buff) ((((int)sizeof(buff) - 1 - (int)strlen(buff)) < 0) ? 0 : (sizeof(buff) - 1 - strlen(buff)))
+
+enum OperatingMode {
+ MODE_HIGH_SPEED = 0,
+ MODE_HIGH_QUALITY,
+ MODE_ZEROSHUTTERLAG,
+ MODE_VIDEO,
+ MODE_STEREO,
+ MODE_CPCAM,
+ MODE_MAX
+};
// Class that handles the Camera Properties
class CameraProperties
@@ -47,19 +59,32 @@ public:
static const char INVALID[];
static const char CAMERA_NAME[];
static const char CAMERA_SENSOR_INDEX[];
+ static const char CAMERA_SENSOR_ID[];
static const char ORIENTATION_INDEX[];
static const char FACING_INDEX[];
- static const char S3D_SUPPORTED[];
static const char SUPPORTED_PREVIEW_SIZES[];
+ static const char SUPPORTED_PREVIEW_SUBSAMPLED_SIZES[];
+ static const char SUPPORTED_PREVIEW_TOPBOTTOM_SIZES[];
+ static const char SUPPORTED_PREVIEW_SIDEBYSIDE_SIZES[];
static const char SUPPORTED_PREVIEW_FORMATS[];
static const char SUPPORTED_PREVIEW_FRAME_RATES[];
+ static const char SUPPORTED_PREVIEW_FRAME_RATES_EXT[];
static const char SUPPORTED_PICTURE_SIZES[];
+ static const char SUPPORTED_PICTURE_SUBSAMPLED_SIZES[];
+ static const char SUPPORTED_PICTURE_TOPBOTTOM_SIZES[];
+ static const char SUPPORTED_PICTURE_SIDEBYSIDE_SIZES[];
static const char SUPPORTED_PICTURE_FORMATS[];
static const char SUPPORTED_THUMBNAIL_SIZES[];
static const char SUPPORTED_WHITE_BALANCE[];
static const char SUPPORTED_EFFECTS[];
static const char SUPPORTED_ANTIBANDING[];
static const char SUPPORTED_EXPOSURE_MODES[];
+ static const char SUPPORTED_MANUAL_EXPOSURE_MIN[];
+ static const char SUPPORTED_MANUAL_EXPOSURE_MAX[];
+ static const char SUPPORTED_MANUAL_EXPOSURE_STEP[];
+ static const char SUPPORTED_MANUAL_GAIN_ISO_MIN[];
+ static const char SUPPORTED_MANUAL_GAIN_ISO_MAX[];
+ static const char SUPPORTED_MANUAL_GAIN_ISO_STEP[];
static const char SUPPORTED_EV_MIN[];
static const char SUPPORTED_EV_MAX[];
static const char SUPPORTED_EV_STEP[];
@@ -97,9 +122,15 @@ public:
static const char CONTRAST[];
static const char IPP[];
static const char GBCE[];
- static const char AUTOCONVERGENCE[];
+ static const char SUPPORTED_GBCE[];
+ static const char GLBCE[];
+ static const char SUPPORTED_GLBCE[];
static const char AUTOCONVERGENCE_MODE[];
- static const char MANUALCONVERGENCE_VALUES[];
+ static const char AUTOCONVERGENCE_MODE_VALUES[];
+ static const char MANUAL_CONVERGENCE[];
+ static const char SUPPORTED_MANUAL_CONVERGENCE_MIN[];
+ static const char SUPPORTED_MANUAL_CONVERGENCE_MAX[];
+ static const char SUPPORTED_MANUAL_CONVERGENCE_STEP[];
static const char SENSOR_ORIENTATION[];
static const char SENSOR_ORIENTATION_VALUES[];
static const char REVISION[];
@@ -113,16 +144,22 @@ public:
static const char MAX_FD_HW_FACES[];
static const char MAX_FD_SW_FACES[];
+ static const char MAX_PICTURE_WIDTH[];
+ static const char MAX_PICTURE_HEIGHT[];
+
static const char PARAMS_DELIMITER [];
- static const char S3D2D_PREVIEW[];
- static const char S3D2D_PREVIEW_MODES[];
+ static const char S3D_PRV_FRAME_LAYOUT[];
+ static const char S3D_PRV_FRAME_LAYOUT_VALUES[];
+ static const char S3D_CAP_FRAME_LAYOUT[];
+ static const char S3D_CAP_FRAME_LAYOUT_VALUES[];
static const char VSTAB[];
static const char VSTAB_SUPPORTED[];
+ static const char VNF[];
+ static const char VNF_SUPPORTED[];
static const char FRAMERATE_RANGE[];
- static const char FRAMERATE_RANGE_IMAGE[];
- static const char FRAMERATE_RANGE_VIDEO[];
static const char FRAMERATE_RANGE_SUPPORTED[];
+ static const char FRAMERATE_RANGE_EXT_SUPPORTED[];
static const char DEFAULT_VALUE[];
@@ -138,7 +175,14 @@ public:
static const char VIDEO_SIZE[];
static const char SUPPORTED_VIDEO_SIZES[];
- static const char PREFERRED_PREVIEW_SIZE_FOR_VIDEO[];
+
+ static const char MECHANICAL_MISALIGNMENT_CORRECTION_SUPPORTED[];
+ static const char MECHANICAL_MISALIGNMENT_CORRECTION[];
+
+ static const char RAW_WIDTH[];
+ static const char RAW_HEIGHT[];
+
+ static const char CAP_MODE_VALUES[];
CameraProperties();
~CameraProperties();
@@ -147,32 +191,31 @@ public:
class Properties
{
public:
+
Properties()
{
- mProperties = new DefaultKeyedVector<String8, String8>(String8(DEFAULT_VALUE));
- char property[PROPERTY_VALUE_MAX];
- property_get("ro.product.manufacturer", property, EXIF_MAKE_DEFAULT);
- property[0] = toupper(property[0]);
- set(EXIF_MAKE, property);
- property_get("ro.product.model", property, EXIF_MODEL_DEFAULT);
- property[0] = toupper(property[0]);
- set(EXIF_MODEL, property);
}
+
~Properties()
{
- delete mProperties;
}
- ssize_t set(const char *prop, const char *value);
- ssize_t set(const char *prop, int value);
- const char* get(const char * prop);
+
+ void set(const char *prop, const char *value);
+ void set(const char *prop, int value);
+ const char* get(const char * prop) const;
+ int getInt(const char * prop) const;
+ void setSensorIndex(int idx);
+ void setMode(OperatingMode mode);
+ OperatingMode getMode() const;
void dump();
protected:
- const char* keyAt(unsigned int);
- const char* valueAt(unsigned int);
+ const char* keyAt(const unsigned int) const;
+ const char* valueAt(const unsigned int) const;
private:
- DefaultKeyedVector<String8, String8>* mProperties;
+ OperatingMode mCurrentMode;
+ android::DefaultKeyedVector<android::String8, android::String8> mProperties[MODE_MAX];
};
@@ -184,15 +227,15 @@ public:
private:
- uint32_t mCamerasSupported;
+ int mCamerasSupported;
int mInitialized;
- mutable Mutex mLock;
+ mutable android::Mutex mLock;
Properties mCameraProps[MAX_CAMERAS_SUPPORTED];
};
-};
+} // namespace Camera
+} // namespace Ti
#endif //CAMERA_PROPERTIES_H
-