summaryrefslogtreecommitdiffstats
path: root/camera/OMXCameraAdapter
diff options
context:
space:
mode:
authorKyle Repinski <repinski23@gmail.com>2015-01-06 23:50:55 -0600
committerZiyan <jaraidaniel@gmail.com>2015-04-11 20:24:52 +0200
commitc52c76fa1593f374173a818b4de5bd7c51903fbc (patch)
tree9235f74121a9acd3f90cf53435df2a7799b80cd6 /camera/OMXCameraAdapter
parent0f63d0e84746ec4e3851ac5456e165f3365a42f6 (diff)
downloaddevice_samsung_tuna-c52c76fa1593f374173a818b4de5bd7c51903fbc.zip
device_samsung_tuna-c52c76fa1593f374173a818b4de5bd7c51903fbc.tar.gz
device_samsung_tuna-c52c76fa1593f374173a818b4de5bd7c51903fbc.tar.bz2
camera: More-or-less disable face detection.
This is causing a lot of problems.
Diffstat (limited to 'camera/OMXCameraAdapter')
-rwxr-xr-xcamera/OMXCameraAdapter/OMXCameraAdapter.cpp4
-rw-r--r--camera/OMXCameraAdapter/OMXCapture.cpp6
-rw-r--r--camera/OMXCameraAdapter/OMXFocus.cpp6
3 files changed, 15 insertions, 1 deletions
diff --git a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
index 49f9f8c..1ae440d 100755
--- a/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
+++ b/camera/OMXCameraAdapter/OMXCameraAdapter.cpp
@@ -2554,12 +2554,14 @@ void OMXCameraAdapter::onOrientationEvent(uint32_t orientation, uint32_t tilt)
if (device_orientation != mDeviceOrientation) {
mDeviceOrientation = device_orientation;
+#ifndef OMAP_TUNA
mFaceDetectionLock.lock();
if (mFaceDetectionRunning) {
// restart face detection with new rotation
setFaceDetection(true, mDeviceOrientation);
}
mFaceDetectionLock.unlock();
+#endif
}
CAMHAL_LOGVB("orientation = %d tilt = %d device_orientation = %d", orientation, tilt, mDeviceOrientation);
@@ -2975,6 +2977,7 @@ OMX_ERRORTYPE OMXCameraAdapter::OMXCameraAdapterFillBufferDone(OMX_IN OMX_HANDLE
}
recalculateFPS();
+#ifndef OMAP_TUNA
{
Mutex::Autolock lock(mFaceDetectionLock);
if ( mFaceDetectionRunning && !mFaceDetectionPaused ) {
@@ -2996,6 +2999,7 @@ OMX_ERRORTYPE OMXCameraAdapter::OMXCameraAdapterFillBufferDone(OMX_IN OMX_HANDLE
}
}
}
+#endif
///Prepare the frames to be sent - initialize CameraFrame object and reference count
// TODO(XXX): ancillary data for snapshot frame is not being sent for video snapshot
diff --git a/camera/OMXCameraAdapter/OMXCapture.cpp b/camera/OMXCameraAdapter/OMXCapture.cpp
index 0a622cc..34a0357 100644
--- a/camera/OMXCameraAdapter/OMXCapture.cpp
+++ b/camera/OMXCameraAdapter/OMXCapture.cpp
@@ -743,8 +743,10 @@ status_t OMXCameraAdapter::startImageCapture()
return NO_ERROR;
}
+#ifndef OMAP_TUNA
// Camera framework doesn't expect face callbacks once capture is triggered
pauseFaceDetection(true);
+#endif
//During bracketing image capture is already active
{
@@ -922,9 +924,11 @@ status_t OMXCameraAdapter::stopImageCapture()
}
}
+#ifndef OMAP_TUNA
// After capture, face detection should be disabled
// and application needs to restart face detection
stopFaceDetection();
+#endif
//Wait here for the capture to be done, in worst case timeout and proceed with cleanup
mCaptureSem.WaitTimeout(OMX_CAPTURE_TIMEOUT);
@@ -1092,7 +1096,7 @@ status_t OMXCameraAdapter::UseBuffersCapture(void* bufArr, int num)
//TODO: Support more pixelformats
CAMHAL_LOGDB("Params Width = %d", (int)imgCaptureData->mWidth);
- CAMHAL_LOGDB("Params Height = %d", (int)imgCaptureData->mWidth);
+ CAMHAL_LOGDB("Params Height = %d", (int)imgCaptureData->mHeight);
if (mPendingCaptureSettings & SetFormat) {
mPendingCaptureSettings &= ~SetFormat;
diff --git a/camera/OMXCameraAdapter/OMXFocus.cpp b/camera/OMXCameraAdapter/OMXFocus.cpp
index 32478af..f584184 100644
--- a/camera/OMXCameraAdapter/OMXFocus.cpp
+++ b/camera/OMXCameraAdapter/OMXFocus.cpp
@@ -110,8 +110,10 @@ status_t OMXCameraAdapter::doAutoFocus()
OMX_INIT_STRUCT_PTR (&focusStatus, OMX_PARAM_FOCUSSTATUSTYPE);
+#ifndef OMAP_TUNA
// If the app calls autoFocus, the camera will stop sending face callbacks.
pauseFaceDetection(true);
+#endif
// This is needed for applying FOCUS_REGION correctly
if ( (!mFocusAreas.isEmpty()) && (!mFocusAreas.itemAt(0)->isZeroArea()))
@@ -319,8 +321,10 @@ status_t OMXCameraAdapter::cancelAutoFocus()
// re-apply CAF after unlocking and canceling
// mPending3Asettings |= SetFocus;
}
+#ifndef OMAP_TUNA
// If the apps call #cancelAutoFocus()}, the face callbacks will also resume.
pauseFaceDetection(false);
+#endif
LOG_FUNCTION_NAME_EXIT;
@@ -472,8 +476,10 @@ status_t OMXCameraAdapter::returnFocusStatus(bool timeoutReached)
notifyFocusSubscribers(focusStatus);
}
+#ifndef OMAP_TUNA
// After focus, face detection will resume sending face callbacks
pauseFaceDetection(false);
+#endif
LOG_FUNCTION_NAME_EXIT;