summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camera/OMXCameraAdapter/OMXAlgo.cpp9
-rw-r--r--camera/OMXCameraAdapter/OMXCameraAdapter.cpp2
-rw-r--r--camera/inc/OMXCameraAdapter/OMXCameraAdapter.h1
3 files changed, 12 insertions, 0 deletions
diff --git a/camera/OMXCameraAdapter/OMXAlgo.cpp b/camera/OMXCameraAdapter/OMXAlgo.cpp
index 2c3c1e1..d163ef2 100644
--- a/camera/OMXCameraAdapter/OMXAlgo.cpp
+++ b/camera/OMXCameraAdapter/OMXAlgo.cpp
@@ -1112,6 +1112,15 @@ status_t OMXCameraAdapter::setSensorOrientation(unsigned int degree)
mPreviewData->mWidth = tmpWidth;
mPreviewData->mHeight = tmpHeight;
+ mPreviewPortInitialized = true;
+ }
+ else if (!mPreviewPortInitialized) {
+ ret = setFormat(OMX_CAMERA_PORT_VIDEO_OUT_PREVIEW, *mPreviewData);
+ if ( NO_ERROR != ret ) {
+ CAMHAL_LOGEB("Error while configuring format 0x%x", ret);
+ return ret;
+ }
+ mPreviewPortInitialized = true;
}
/* Now set Required Orientation*/
diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
index 4f7122e..d4ec707 100644
--- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
+++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
@@ -4150,6 +4150,8 @@ OMXCameraAdapter::OMXCameraAdapter(size_t sensor_index)
#endif
+ mPreviewPortInitialized = false;
+
LOG_FUNCTION_NAME_EXIT;
}
diff --git a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
index a32ad9c..0d67036 100644
--- a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
+++ b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
@@ -1197,6 +1197,7 @@ private:
android::Mutex mImageCaptureLock;
bool mTunnelDestroyed;
+ bool mPreviewPortInitialized;
};