summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
Diffstat (limited to 'camera')
-rw-r--r--camera/BaseCameraAdapter.cpp3
-rw-r--r--camera/OMXCameraAdapter/OMXCameraAdapter.cpp6
-rw-r--r--camera/inc/BaseCameraAdapter.h1
3 files changed, 10 insertions, 0 deletions
diff --git a/camera/BaseCameraAdapter.cpp b/camera/BaseCameraAdapter.cpp
index 88ba8a4..36b3782 100644
--- a/camera/BaseCameraAdapter.cpp
+++ b/camera/BaseCameraAdapter.cpp
@@ -390,6 +390,8 @@ void BaseCameraAdapter::returnFrame(CameraBuffer * frameBuf, CameraFrame::FrameT
if ( 0 == refCount )
{
#ifdef CAMERAHAL_DEBUG
+ {
+ android::AutoMutex locker(mBuffersWithDucatiLock);
if((mBuffersWithDucati.indexOfKey((int)camera_buffer_get_omx_ptr(frameBuf)) >= 0) &&
((CameraFrame::PREVIEW_FRAME_SYNC == frameType) ||
(CameraFrame::SNAPSHOT_FRAME == frameType)))
@@ -398,6 +400,7 @@ void BaseCameraAdapter::returnFrame(CameraBuffer * frameBuf, CameraFrame::FrameT
for(int i=0;i<mBuffersWithDucati.size();i++) CAMHAL_LOGE("0x%x", mBuffersWithDucati.keyAt(i));
}
mBuffersWithDucati.add((int)camera_buffer_get_omx_ptr(frameBuf),1);
+ }
#endif
res = fillThisBuffer(frameBuf, frameType);
}
diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
index c142fa5..eecce61 100644
--- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
+++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
@@ -2289,7 +2289,10 @@ status_t OMXCameraAdapter::startPreview()
}
mFramesWithDucati++;
#ifdef CAMERAHAL_DEBUG
+ {
+ android::AutoMutex locker(mBuffersWithDucatiLock);
mBuffersWithDucati.add((int)mPreviewData->mBufferHeader[index]->pAppPrivate,1);
+ }
#endif
GOTO_EXIT_IF((eError!=OMX_ErrorNone), eError);
}
@@ -3524,12 +3527,15 @@ OMX_ERRORTYPE OMXCameraAdapter::OMXCameraAdapterFillBufferDone(OMX_IN OMX_HANDLE
mFramesWithDucati--;
#ifdef CAMERAHAL_DEBUG
+ {
+ android::AutoMutex locker(mBuffersWithDucatiLock);
if(mBuffersWithDucati.indexOfKey((uint32_t)pBuffHeader->pBuffer)<0)
{
CAMHAL_LOGE("Buffer was never with Ducati!! %p", pBuffHeader->pBuffer);
for(unsigned int i=0;i<mBuffersWithDucati.size();i++) CAMHAL_LOGE("0x%x", mBuffersWithDucati.keyAt(i));
}
mBuffersWithDucati.removeItem((int)pBuffHeader->pBuffer);
+ }
#endif
if(mDebugFcs)
diff --git a/camera/inc/BaseCameraAdapter.h b/camera/inc/BaseCameraAdapter.h
index b7966b0..c605df1 100644
--- a/camera/inc/BaseCameraAdapter.h
+++ b/camera/inc/BaseCameraAdapter.h
@@ -292,6 +292,7 @@ protected:
uint32_t mFramesWithEncoder;
#ifdef CAMERAHAL_DEBUG
+ android::Mutex mBuffersWithDucatiLock;
android::KeyedVector<int, bool> mBuffersWithDucati;
#endif