diff options
author | Tyler Luu <tluu@ti.com> | 2012-06-21 09:55:44 -0500 |
---|---|---|
committer | Daniel Levin <dendy@ti.com> | 2012-11-26 20:09:16 +0200 |
commit | 7eeb4f61f989b3aa0da6f77a579d6e4de1b5e885 (patch) | |
tree | 1082816d04a28286bbc6a362fe1d8f14c763186a /camera/OMXCameraAdapter | |
parent | 7f483836fab38c86abd3fd9ee5d996ac99379674 (diff) | |
download | hardware_ti_omap4-7eeb4f61f989b3aa0da6f77a579d6e4de1b5e885.zip hardware_ti_omap4-7eeb4f61f989b3aa0da6f77a579d6e4de1b5e885.tar.gz hardware_ti_omap4-7eeb4f61f989b3aa0da6f77a579d6e4de1b5e885.tar.bz2 |
CameraHal: Init capture reference count logic to derived adapters
- Moving initializing for capture reference count to
derived adapters since useBuffers call for capture
is going to called queuing shots as well.
- This patch needs to include V4L adapter before merging
on mainline.
Change-Id: Ifc4986a68173234ec636ef943b62009f7df1e041
Signed-off-by: Tyler Luu <tluu@ti.com>
Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com>
Diffstat (limited to 'camera/OMXCameraAdapter')
-rw-r--r-- | camera/OMXCameraAdapter/OMXCapture.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/camera/OMXCameraAdapter/OMXCapture.cpp b/camera/OMXCameraAdapter/OMXCapture.cpp index e5de0c5..5231960 100644 --- a/camera/OMXCameraAdapter/OMXCapture.cpp +++ b/camera/OMXCameraAdapter/OMXCapture.cpp @@ -1877,6 +1877,17 @@ status_t OMXCameraAdapter::UseBuffersCapture(CameraBuffer * bufArr, int num) // CPCam mode only supports vector shot // Regular capture is not supported if (mCapMode == CP_CAM) initVectorShot(); + + mCaptureBuffersAvailable.clear(); + for (unsigned int i = 0; i < imgCaptureData->mMaxQueueable; i++ ) { + mCaptureBuffersAvailable.add(&mCaptureBuffers[i], 0); + } + + // initial ref count for undeqeueued buffers is 1 since buffer provider + // is still holding on to it + for (unsigned int i = imgCaptureData->mMaxQueueable; i < imgCaptureData->mNumBufs; i++ ) { + mCaptureBuffersAvailable.add(&mCaptureBuffers[i], 1); + } } if ( NO_ERROR == ret ) |