diff options
author | Akwasi Boateng <akwasi.boateng@ti.com> | 2011-09-30 13:39:31 -0500 |
---|---|---|
committer | Iliyan Malchev <malchev@google.com> | 2011-10-07 11:12:14 -0700 |
commit | 6cd6e6f0f952d68e0301b58f7c77422448f51730 (patch) | |
tree | 4ee2531b1c0ccbd2893844ded9a9e76b4cb3021d /camera/inc | |
parent | b0f698a6430c3a9478bd476af7189849a1fb1a9d (diff) | |
download | hardware_ti_omap4-6cd6e6f0f952d68e0301b58f7c77422448f51730.zip hardware_ti_omap4-6cd6e6f0f952d68e0301b58f7c77422448f51730.tar.gz hardware_ti_omap4-6cd6e6f0f952d68e0301b58f7c77422448f51730.tar.bz2 |
omap4xxx: camera: switch to executing state when surface is null
Partial fix for b/5422679
To enhance standby to first shot performance
Change-Id: Ib32e8120a7908419c76e8cf2f1830f0667b258c0
Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
Diffstat (limited to 'camera/inc')
-rw-r--r-- | camera/inc/BaseCameraAdapter.h | 2 | ||||
-rw-r--r-- | camera/inc/CameraHal.h | 1 | ||||
-rw-r--r-- | camera/inc/OMXCameraAdapter/OMXCameraAdapter.h | 9 |
3 files changed, 11 insertions, 1 deletions
diff --git a/camera/inc/BaseCameraAdapter.h b/camera/inc/BaseCameraAdapter.h index c205b3c..a11ea1d 100644 --- a/camera/inc/BaseCameraAdapter.h +++ b/camera/inc/BaseCameraAdapter.h @@ -135,6 +135,8 @@ protected: // ( if supported ) virtual status_t stopFaceDetection(); + virtual status_t switchToExecuting(); + // Receive orientation events from CameraHal virtual void onOrientationEvent(uint32_t orientation, uint32_t tilt); diff --git a/camera/inc/CameraHal.h b/camera/inc/CameraHal.h index 3ca9ed7..68f5cac 100644 --- a/camera/inc/CameraHal.h +++ b/camera/inc/CameraHal.h @@ -755,6 +755,7 @@ public: CAMERA_TIMEOUT_EXPIRED = 21, CAMERA_START_FD = 22, CAMERA_STOP_FD = 23, + CAMERA_SWITCH_TO_EXECUTING = 24, }; enum CameraMode diff --git a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h index 6701aa6..960846e 100644 --- a/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h +++ b/camera/inc/OMXCameraAdapter/OMXCameraAdapter.h @@ -398,10 +398,13 @@ protected: virtual status_t getFrameDataSize(size_t &dataFrameSize, size_t bufferCount); virtual status_t startFaceDetection(); virtual status_t stopFaceDetection(); + virtual status_t switchToExecuting(); virtual void onOrientationEvent(uint32_t orientation, uint32_t tilt); private: + status_t doSwitchToExecuting(); + void performCleanupAfterError(); status_t switchToLoaded(); @@ -630,7 +633,8 @@ private: enum { COMMAND_EXIT = -1, CAMERA_START_IMAGE_CAPTURE = 0, - CAMERA_PERFORM_AUTOFOCUS + CAMERA_PERFORM_AUTOFOCUS = 1, + CAMERA_SWITCH_TO_EXECUTING }; private: @@ -846,6 +850,9 @@ private: Semaphore mStartCaptureSem; Semaphore mStopCaptureSem; Semaphore mSwitchToLoadedSem; + Semaphore mSwitchToExecSem; + + mutable Mutex mSwitchToExecLock; Vector<struct TIUTILS::Message *> mEventSignalQ; Mutex mEventLock; |