summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Nedev <pnedev@mm-sol.com>2012-02-20 16:12:34 +0200
committerDaniel Levin <dendy@ti.com>2012-07-25 08:55:41 -0500
commit3eed394626f01506ad5964e4c7e553d0bd63f175 (patch)
tree54d9e39e68ececbdfa066ef14622290c216115e7
parent644e7b6ac5f5ed467adcb3727b96859ddbc229ed (diff)
downloadhardware_ti_omap4-3eed394626f01506ad5964e4c7e553d0bd63f175.zip
hardware_ti_omap4-3eed394626f01506ad5964e4c7e553d0bd63f175.tar.gz
hardware_ti_omap4-3eed394626f01506ad5964e4c7e553d0bd63f175.tar.bz2
CameraHAL: Default S3D preview layout set to TB_SUB
Added default S3D preview and capture layout values in OMX capabilities. If the default value is not supported the first supported value is used as default. Default S3D preview layout value is "tb-subsampled" while the default S3D capture layout value is "tb-full". Change-Id: I6a53f5e81aae2555549f4056d25a33ae25a244ae Signed-off-by: Pavel Nedev <pnedev@mm-sol.com>
-rw-r--r--camera/OMXCameraAdapter/OMXCapabilities.cpp29
-rw-r--r--camera/OMXCameraAdapter/OMXDefaults.cpp2
-rw-r--r--camera/inc/OMXCameraAdapter/OMXCameraAdapter.h2
3 files changed, 24 insertions, 9 deletions
diff --git a/camera/OMXCameraAdapter/OMXCapabilities.cpp b/camera/OMXCameraAdapter/OMXCapabilities.cpp
index 0bed42c..0409153 100644
--- a/camera/OMXCameraAdapter/OMXCapabilities.cpp
+++ b/camera/OMXCameraAdapter/OMXCapabilities.cpp
@@ -1839,14 +1839,20 @@ status_t OMXCameraAdapter::insertGLBCESupported(CameraProperties::Properties* pa
status_t OMXCameraAdapter::insertDefaults(CameraProperties::Properties* params, OMX_TI_CAPTYPE &caps)
{
status_t ret = NO_ERROR;
- char temp[MAX_PROP_VALUE_LENGTH];
char *pos;
+ char temp[MAX_PROP_VALUE_LENGTH];
LOG_FUNCTION_NAME;
- strncpy(temp, params->get(CameraProperties::S3D_PRV_FRAME_LAYOUT_VALUES),
- MAX_PROP_VALUE_LENGTH - 1);
- if ((pos = strstr(temp, PARAM_SEP))) {
- *pos = '\0';
+
+ /* If default is supported - set it, else - set first supported */
+ if (strstr(params->get(CameraProperties::S3D_PRV_FRAME_LAYOUT_VALUES), DEFAULT_S3D_PREVIEW_LAYOUT)) {
+ strncpy(temp, DEFAULT_S3D_PREVIEW_LAYOUT, MAX_PROP_VALUE_LENGTH - 1);
+ } else {
+ strncpy(temp, params->get(CameraProperties::S3D_PRV_FRAME_LAYOUT_VALUES),
+ MAX_PROP_VALUE_LENGTH - 1);
+ if ((pos = strstr(temp, PARAM_SEP))) {
+ *pos = '\0';
+ }
}
params->set(CameraProperties::S3D_PRV_FRAME_LAYOUT, temp);
@@ -1859,10 +1865,15 @@ status_t OMXCameraAdapter::insertDefaults(CameraProperties::Properties* params,
params->set(CameraProperties::SUPPORTED_PREVIEW_SIZES, params->get(CameraProperties::SUPPORTED_PREVIEW_SUBSAMPLED_SIZES));
}
- strncpy(temp, params->get(CameraProperties::S3D_CAP_FRAME_LAYOUT_VALUES),
- MAX_PROP_VALUE_LENGTH - 1);
- if ((pos = strstr(temp, PARAM_SEP))) {
- *pos = '\0';
+ /* If default is supported - set it, else - set first supported */
+ if (strstr(params->get(CameraProperties::S3D_CAP_FRAME_LAYOUT_VALUES), DEFAULT_S3D_PICTURE_LAYOUT)) {
+ strncpy(temp, DEFAULT_S3D_PICTURE_LAYOUT, MAX_PROP_VALUE_LENGTH - 1);
+ } else {
+ strncpy(temp, params->get(CameraProperties::S3D_CAP_FRAME_LAYOUT_VALUES),
+ MAX_PROP_VALUE_LENGTH - 1);
+ if ((pos = strstr(temp, PARAM_SEP))) {
+ *pos = '\0';
+ }
}
params->set(CameraProperties::S3D_CAP_FRAME_LAYOUT, temp);
diff --git a/camera/OMXCameraAdapter/OMXDefaults.cpp b/camera/OMXCameraAdapter/OMXDefaults.cpp
index 9caf076..7f6dd0a 100644
--- a/camera/OMXCameraAdapter/OMXDefaults.cpp
+++ b/camera/OMXCameraAdapter/OMXDefaults.cpp
@@ -47,11 +47,13 @@ const char OMXCameraAdapter::DEFAULT_JPEG_QUALITY[] = "95";
const char OMXCameraAdapter::DEFAULT_THUMBNAIL_QUALITY[] = "60";
const char OMXCameraAdapter::DEFAULT_THUMBNAIL_SIZE[] = "160x120";
const char OMXCameraAdapter::DEFAULT_PICTURE_FORMAT[] = "jpeg";
+const char OMXCameraAdapter::DEFAULT_S3D_PICTURE_LAYOUT[] = "tb-full";
const char OMXCameraAdapter::DEFAULT_PICTURE_SIZE[] = "320x240";
const char OMXCameraAdapter::DEFAULT_PICTURE_SS_SIZE[] = "640x240";
const char OMXCameraAdapter::DEFAULT_PICTURE_TB_SIZE[] = "320x480";
const char OMXCameraAdapter::DEFAULT_PREVIEW_FORMAT[] = "yuv420sp";
const char OMXCameraAdapter::DEFAULT_FRAMERATE[] = "30";
+const char OMXCameraAdapter::DEFAULT_S3D_PREVIEW_LAYOUT[] = "tb-subsampled";
const char OMXCameraAdapter::DEFAULT_PREVIEW_SIZE[] = "640x480";
const char OMXCameraAdapter::DEFAULT_PREVIEW_SS_SIZE[] = "1280x480";
const char OMXCameraAdapter::DEFAULT_PREVIEW_TB_SIZE[] = "640x960";
diff --git a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
index 7c1e7ff..2efa4ca 100644
--- a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
+++ b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
@@ -838,11 +838,13 @@ private:
static const char DEFAULT_THUMBNAIL_QUALITY[];
static const char DEFAULT_THUMBNAIL_SIZE[];
static const char DEFAULT_PICTURE_FORMAT[];
+ static const char DEFAULT_S3D_PICTURE_LAYOUT[];
static const char DEFAULT_PICTURE_SIZE[];
static const char DEFAULT_PICTURE_SS_SIZE[];
static const char DEFAULT_PICTURE_TB_SIZE[];
static const char DEFAULT_PREVIEW_FORMAT[];
static const char DEFAULT_FRAMERATE[];
+ static const char DEFAULT_S3D_PREVIEW_LAYOUT[];
static const char DEFAULT_PREVIEW_SIZE[];
static const char DEFAULT_PREVIEW_SS_SIZE[];
static const char DEFAULT_PREVIEW_TB_SIZE[];