summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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[];