summaryrefslogtreecommitdiffstats
path: root/camera/inc
diff options
context:
space:
mode:
authorSundar Raman <sunds@ti.com>2011-09-25 23:10:19 -0700
committerIliyan Malchev <malchev@google.com>2011-09-27 17:33:06 -0700
commit85578165e01e09144a8d7166c24d1cac54dd6cf7 (patch)
treeb80f9ad31302963720d803cbb4ef2ae925f8840b /camera/inc
parent2a879c15f4b83f5e0a461e4b738df149ef50a460 (diff)
downloadhardware_ti_omap4-85578165e01e09144a8d7166c24d1cac54dd6cf7.zip
hardware_ti_omap4-85578165e01e09144a8d7166c24d1cac54dd6cf7.tar.gz
hardware_ti_omap4-85578165e01e09144a8d7166c24d1cac54dd6cf7.tar.bz2
CameraHAL: Improved error handling inside the adapters
1. unlock and cancel buffers to ANativeWindow when freeBuffers is called 2. Free the omx handle and deinitialize DOMX when errors occur while calling critical OMXCamera apis 3. Retry OMX_GetHandle if it fails to take care of error recovery scenarios. "Fixes b/5379663" Change-Id: I4729fab40e6104dfa6660ba6f6b1a90f805c2f59 Signed-off-by: Sundar Raman <sunds@ti.com>
Diffstat (limited to 'camera/inc')
-rw-r--r--camera/inc/ANativeWindowDisplayAdapter.h1
-rw-r--r--camera/inc/OMXCameraAdapter/OMXCameraAdapter.h6
2 files changed, 7 insertions, 0 deletions
diff --git a/camera/inc/ANativeWindowDisplayAdapter.h b/camera/inc/ANativeWindowDisplayAdapter.h
index fa6a624..e4698d0 100644
--- a/camera/inc/ANativeWindowDisplayAdapter.h
+++ b/camera/inc/ANativeWindowDisplayAdapter.h
@@ -99,6 +99,7 @@ public:
bool processHalMsg();
status_t PostFrame(ANativeWindowDisplayAdapter::DisplayFrame &dispFrame);
bool handleFrameReturn();
+ status_t returnBuffersToWindow();
public:
diff --git a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
index 06d7d73..3435305 100644
--- a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
+++ b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h
@@ -46,6 +46,7 @@ extern "C"
#include "timm_osal_semaphores.h"
}
+
namespace android {
#define Q16_OFFSET 16
@@ -372,6 +373,9 @@ public:
OMX_ERRORTYPE OMXCameraAdapterFillBufferDone(OMX_IN OMX_HANDLETYPE hComponent,
OMX_IN OMX_BUFFERHEADERTYPE* pBuffHeader);
+
+ static OMX_ERRORTYPE OMXCameraGetHandle(OMX_HANDLETYPE *handle, OMX_PTR pAppData=NULL);
+
protected:
//Parent class method implementation
@@ -398,6 +402,8 @@ protected:
private:
+ void performCleanupAfterError();
+
status_t switchToLoaded();
OMXCameraPortParameters *getPortParams(CameraFrame::FrameType frameType);