summaryrefslogtreecommitdiff
path: root/camera
AgeCommit message (Collapse)Author
2013-12-19libexif is now libjheadMarco Nelissen
Change-Id: I78c3eae1dc3a3e37da182513078749ad83d6d004
2013-11-02camera: do not use GNU old-style field designatorssynergydev
Avoiding the use of GNU extensions improves portability Fixes the following: error: use of GNU old-style field designator extension Change-Id: Ic1bf7e44b3bf0c9b30c8c950b02ad71452a0bd8f
2013-04-22camera: Handle capture request in AF runandroid-sdk-4.4.2_r1.0.1android-sdk-4.4.2_r1android-cts-4.4_r4android-cts-4.4_r1android-4.4_r1.2.0.1android-4.4_r1.2android-4.4_r1.1.0.1android-4.4_r1.1android-4.4_r1.0.1android-4.4_r1android-4.4_r0.9android-4.4_r0.8android-4.4_r0.7android-4.4.2_r2.0.1android-4.4.2_r2android-4.4.2_r1.0.1android-4.4.2_r1android-4.4.1_r1.0.1android-4.4.1_r1android-4.3_r3.1android-4.3_r3android-4.3_r2.3android-4.3_r2.2android-4.3_r2.1android-4.3_r2android-4.3_r1.1android-4.3_r1android-4.3_r0.9.1android-4.3_r0.9android-4.3.1_r1tools_r22.2kitkat-releasekitkat-mr1.1-releasekitkat-mr1-releasekitkat-cts-releasekitkat-cts-devjb-mr2.0.0-releasejb-mr2.0-releasejb-mr2-releasejb-mr2-devd-kitkat-releaseAlex Ray
Bug: 8140969 Change-Id: I1e1889434d57714cdb0c10929609eade299c1ea9
2013-04-09Add liblogYing Wang
Bug: 8580410 Change-Id: If897b4d39c67a49aa590b1692d26db794a53c2a3
2012-11-07Revert "CameraHal: Sync AF cancel with incoming OMX events"android-sdk-support_r11android-cts-4.2_r2android-cts-4.2_r1android-4.2_r1android-4.2.2_r1.2android-4.2.2_r1.1android-4.2.2_r1android-4.2.1_r1.2android-4.2.1_r1.1android-4.2.1_r1jb-mr1.1-releasejb-mr1.1-devjb-mr1-releasejb-mr1-devEino-Ville Talvala
This reverts commit b96dffd40e25d29a61f9fbd7f2e5968b5335b957. Bug: 7495861
2012-10-23CameraHal: Sync AF cancel with incoming OMX eventsEmilian Peev
- Cancel AF is made to wait on incoming OMX events when AF status changes. An AF timeout is introduced in order not to block this call indefinitely. - Additionally calls to 'autoFocus()' will immediately trigger AF callbacks if fixed modes are being used. Bug: 6949572 Change-Id: I5f240fb6fc7fe53aecaff76d75d608dd522c1e27 Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-10-15CameraHal: Avoid race condition during recording stopEmilian Peev
- A race condition is possible when recording is stopped. 'BaseCameraAdapter::stopVideoCapture()' is clearing 'mVideoBuffersAvailable'. A delayed video frame from 'AppCallbackNotifier' can return afterwards though and then try to query the already empty 'KeyedVector'. This will result in a segfault. Solution is to move the vector reset away from 'stopVideoCapture()' and in to 'startVideoCapture()' where it is needed. Bug: 7021214 Change-Id: Ic234189b49e35c990b3af70bd713a12cb762362c Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-07-09Fixup ion change to old libraryRebecca Schultz Zavin
Missed a few places that needed updating Change-Id: I1a483d9d85858e752df0f1d970559fcac6695856 Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2012-06-28Put back old ion libraryRebecca Schultz Zavin
Non-backwards compatible changes are being made to the version in system core Change-Id: I66d5119fb28a7eb3dc6cb9f7cbd1a8a8d902f290 Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2012-05-23CameraHal: Avoids possible race conditions while accessing 'mParams'Emilian Peev
- Direct access of 'mParams' outside of 'get-/setParameters()' should be avoided. The underlying strings can get invalidated with each call to 'setParameters()', which can lead to instabilities. - This change also removes legacy stereo code, which is not used any more. Bug: 6509329 Change-Id: Ief6df206c33fbdc666644cea8630e0bce6a36c00 Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-05-10CameraHAL: Aligns UV planes during YV12 preview callbacksEmilian Peev
- UV planes stride should be multiple of 16. The buffer size should also be updated accordingly. Bug: 6447707 Change-Id: If436801fbb2750523a3207878f611c8094667367 Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-05-08CameraHal: Remove lock queries from 'mParams' during 'getParameters()'Emilian Peev
- A race condition with 'set3ALock()' is possible, which can lead to a segfault during calls to 'getParameters()'. Bug: 6255665 Change-Id: Id64cf3ccfa1e47501d7ba0fb892f2f72329a2ad6 Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-05-07CameraHal: Add support for YUY2 preview callbacksEmilian Peev
- The currently used Gralloc buffers for preview are limited to only NV12 pixelformat. In order to support this type of preview callbacks, CameraHal will internally convert from NV12 to YUY2. Bug: 6419136 Change-Id: I879e32d4b2142bdd0a1f89fe7c5496d250039b73 Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-05-04CameraHal: Do full AF sweep during lost AF statusEmilian Peev
- Previously only "OMX_FocusStatusUnableToReach" status was activating the full AF scan. Currently with CAF callbacks updates in Ducati, this is no longer the case and "OMX_FocusStatusLost" should be considered as well. Bug: 6378194 Change-Id: Ib296c6d7197cd275a9e5106f791451f4179be3e9 Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-04-29CameraHal: Fix for YV12 camera callbacksEmilian Peev
- 'mPreviewPixelFormat' was being set incorrectly for YV12 case. Bug: 6325348 Change-Id: I80acc5cd721d317fac9525bdb734fe2e70df85bf Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-04-11CameraHAL: Fix for CTS test #testFocusDistancesEmilian Peev
- The 'focusStatus' variable in 'doAutoFocus()' is uninitialized in the case where the camera client sets focus lock in CAF mode. Depending on the current stack content this method might try to set CAF focus again and wait for a focus callback, which will inevitably timeout. - Fix for random fails during CTS test #testFocusDistances. Change-Id: Iafa84bbf5b7119d77f1f666a6a88c613b657541e Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-03-23CameraHal: Speedup face detection startEmilian Peev
- Currently when face detection gets enabled the face priority for AE and AF is getting configured as well. This configuration takes around 18 ms. on average and can delay the overall startup time. The optimization will move the algo setup away from face detection enablement and in to the FillBufferDone callback. Bug: 5488236 Change-Id: I2b0e8df9fdead7a5d761a1efbcbf57d39e27ae3c Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-03-23camera: fix deadlock because of mStateSwitchLockTyler Luu
When OMXCameraAdapter::UseBuffersPreview() is failing mStateSwitchLock must be unlocked. b/6046798 Change-Id: Ie9ecccc2e23b0a31b2972beb0411faca279d5d0c Signed-off-by: Daniel Levin <dendy@ti.com> Signed-off-by: Tyler Luu <tluu@ti.com>
2012-03-23camera: prevent possible deadlock scenarioTyler Luu
Hold scope of returnFrame lock for just the calculation of refCount. Otherwise, we could have a scenario where endImageCapture and stopRecording could cause a deadlock competing for mReturnFrameLock and mLock. Issue arises mainly because endImageCapture is signalled from fillThisBuffer which stopRecording will need to get into. Make sure mEventQ has a message before calling get() since read on the pipe will block with notifyEvent holding mLock. Change-Id: I3a125711632fa311fd794e300cd5008321a84c40 Signed-off-by: Tyler Luu <tluu@ti.com>
2012-03-23CameraHal: Remove excessive focus mode configurationsEmilian Peev
- This change should improve overall stability during image capture. Configuring focus mode while image capture is active is always going to result in 'OMX_ErrorBadParameter'. Bug: 6026480 Change-Id: I735c5d25adc293d163f77488c0dc6d30a636544b Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-03-23CameraHal: Don't signal off AF status events to 'doAutoFocus()'Emilian Peev
- In dark lighting conditions and when AF assist is active sometimes the OMX camera component changes the AF status to off and generates and OMX event. Currently this is being interpreted as cancel AF. Bug: 6197932 Change-Id: Ibddd0033eecd186c1bfc90530af651f1c0223a25 Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-03-13Merge "CameraHal: Omit 'apply3Adefaults()' during initialization"Wu-cheng Li
2012-03-13Merge "CameraHal: Cuts down execution time of 'get-/setParameters()'"Wu-cheng Li
2012-03-13CameraHal: Omit 'apply3Adefaults()' during initializationEmilian Peev
- This change should improve the standby to first shot PPM bug:6136966 Signed-off-by: Emilian Peev <epeev@mm-sol.com> Change-Id: I20ffd1178a64b77d45b35bac1cf04be21d2d602b
2012-03-13CameraHal: Cuts down execution time of 'get-/setParameters()'Emilian Peev
- The change utilizes two approaches: Wrap unused parameters in 'OMAP_ENHANCEMENT' macro. Minimize usage of CameraParameters. bug:6136966 Change-Id: Ie4a4d2f007e6571ee9a403ed68e977d6cbf6756b Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-03-12Switched to use header files from /frameworks/nativeJames Dong
o related-to-bug: 6044887 Change-Id: I45362c0a68f49684e0393fc77ab4d5f55ec53716
2012-03-05fix hardcoded include pathsMathias Agopian
Change-Id: Idda63f9af654bf136755efc38e7bb50ba6f8ca24
2012-02-24remove dependency on android_native_buffer.hMathias Agopian
Change-Id: I7af0a5054b91a771ea9e77fd052ab5fd921ba78e
2012-02-22Update includes for ion helper libraryRebecca Schultz Zavin
libion is being moved to system/core. Update the includes to reflect the change. Change-Id: If94feb9b89ff1f6c8f55303ba610d3c39c8d80d8 Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2012-02-14CameraHal: Workaround for delayed AF eventsEmilian Peev
Addresses a corner case with b/5534973 - If the OMX Camera component delays ( for whatever reason ) the AF status notification during cancelAF, then there is a chance that the AF callback timeout inside 'doAutoFocus()' might expire and an incorrect failed AF callback might be generated to the client. What this change does is to immediately unblock the thread waiting for AF status after the configuration for stopping AF. This way we are effectively skipping the wait on the OMX component. Change-Id: Ieda419b3ceee20eee80b543a00cd59b8f51d1cbe Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-02-11CameraHal: Reduces Camera logcat printsEmilian Peev
Change-Id: Id32ad1b882a76f091866583b15ae0ca2929bacef Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-02-11CameraHal: Various AF related fixesEmilian Peev
- In case of AF timeout the focus callback was being disabled. This callback will not get re-enabled again until preview is restarted. - Cancel AF is not working properly. Depending on the timing the off status event might not reach 'doAutoFocus()'. - This change also replaces the 'mDoAFSem' semaphore with a condition variable. Change-Id: I2ab7d87a05d97435aa6e67a122cc37a975794fc2 Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-02-11CameraHal: Avoid possible segfaults in 'setExtraData()'Emilian Peev
- There is a chance that the OMX component could get released while 'startImageCapture()' is still waiting for the shutter callback. In this case we should omit the extra data configuration. - Should fix bug: 5911295 Change-Id: I82344573e56d7b58f119f68905e2fa1eaa3d69fe Signed-off-by: Emilian Peev <epeev@mm-sol.com>
2012-02-01CameraHal: Implementation for CAF status callbacksTyler Luu
1. Remove internal handling of CAMERA_MSG_FOCUS. Before we were enabling CAMERA_MSG_FOCUS only when application calls autoFocus(). No longer needed since the CAMERA_MSG_FOCUS can come just during preview now. 2. Add handling of unregistered focus callbacks. Since OMXCamera will send callbacks even when we are not waiting for one, add some handling. Signed-off-by: Tyler Luu <tluu@ti.com> Change-Id: I457e67b33b2561dd0b1ce3863ce807a8c27f79f6 Conflicts: camera/OMXCameraAdapter/OMXFocus.cpp
2012-02-01CameraHal: Fix timing issue with focus msg disableTyler Luu
Disable focus message before sending notification because client can immediately call focus again after receiving notification and before we get a chance to disable the message. This will result in the focus notificiation for the subsequent focus call to be missed. Change-Id: I1367cdcebe490c32251e992b87ada3edf6b28036 Signed-off-by: Tyler Luu <tluu@ti.com>
2012-01-19Prevent duplicate DateTime tags in EXIF.Angus Kong
bug:5766177 Change-Id: Ib60030374ffca8e27c814503621cc545f9132360
2012-01-08Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block
See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: I7d131473964d92c62a495d082a1207867f435885
2012-01-05Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block
See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I71aea6795e3ed22beacb9a8f5774499e96c69a4d
2012-01-04Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGESteve Block
See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib3b6ce6a89755e29aa9f830e9185064c25dd138e
2012-01-03Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block
See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I551e5a040249a8908251cd8c8d7131287f1f53de
2011-12-14am 3500401f: am 82a05e51: Use local time in EXIF.Angus Kong
* commit '3500401fabe4e4ce8f9e6e1cc503fdc87b3a2222': Use local time in EXIF.
2011-12-14Use local time in EXIF.android-sdk-4.0.3-tools_r1android-cts-verifier-4.0_r1android-cts-verifier-4.0.3_r1android-cts-4.0.3_r2android-cts-4.0.3_r1ics-mr1Angus Kong
UTC is only used in GPS time stamp and local time is used in other date/time field. bug: 5757809 Change-Id: I8c728dca9db003c6a750df300d993e3615ef71c8
2011-12-12CameraHal: Add missing null check in OMX3ATyler Luu
Check for null before strcmp b/5639860 Change-Id: I552213c9894679eeb64cd06419f3f430276b273e Signed-off-by: Tyler Luu <tluu@ti.com>
2011-12-05CameraHal: Fix preview not starting after surface is abdandonedTyler Luu
If an application gets backgrounded (HOME key) without stopping preview and releasing camera, preview would previously not restart when application is resumed. ANativeWindowDisplayAdapter would detect that the preview surface was abandoned and stop sending buffers to CameraAdapter. We were previously not doing anything when CameraService called setPreviewWindow when a display adapter was already created. To fix this issue, we need to send the preview window and restart preview. Change-Id: I36089b0046f9861897d32c50b52128a41e2de2a5 Signed-off-by: Tyler Luu <tluu@ti.com>
2011-12-02CameraHAL: Prevent deadlock in AppCallbackNotifier::stop()Tyler Luu
There is a small chance that a stopPreview call can come from CameraService right around the same time Encoder thread will send a data callback for the video snapshot. Currently, we are waiting for the encoder thread to join in AppCallbackNofier:: stop(), so we could deadlock if CameraService locks in lockIfMessageWanted for the video snapshot. Instead of waiting for Encoder thread to join, we can make cancel() block until Encoder thread is done canceling the encode. After cancel() returns, we can free up the cookies that we passed to it, so Encoder thread does not need to call the callback function to AppCallbackNotifier. Change-Id: Ib453d49d91077925b143c812d43a7d1b782c181c Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-12-01CameraHAL: Fixes a couple of corner cases with AF and capture DO NOT MERGEAkwasi Boateng
Fixes b/5627968. On some occasions during monkey tests, both the AF callback and the shutter callback can be delayed just enough to encounter the OMX component in loaded state. Usually this happens when the camera is getting closed and this scenario should be properly handled by exiting immediately without trying to trigger any callbacks to the client. Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com> Change-Id: Ia18faf471a8e10579b09973178d73e69e782c63c
2011-12-01CameraHAL: Exit Appcallback thread immediately.Akwasi Boateng
Allow appcallback thread to exit immediately when exit command is processed. Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com> Change-Id: I83db309cf973e1ce9494c855430897a0c41704d8
2011-12-01CameraHAL: Fixes a couple of corner cases with AF and captureAkwasi Boateng
- On some occasions during monkey tests, both the AF callback and the shutter callback can be delayed just enough to encounter the OMX component in loaded state. Usually this happens when the camera is getting closed and this scenario should be properly handled by exiting immediately without trying to trigger any callbacks to the client. Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com> Change-Id: Ia18faf471a8e10579b09973178d73e69e782c63c Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-12-01CameraHAL: Handling OMX initializationAkwasi Boateng
Additional mOmxInitialized flag has been added to track whether OMX has been succesfully initialized to prevent duplicate OMX_DeInit() in OMXCameraAdapter destructor. Signed-off-by: Daniel Levin <x0155538@ti.com> Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com> Change-Id: I269c5ac9d5de3f3e9088a11a3bea7127c1bd79de
2011-12-01CameraHAL: Avoids a possible deadlock in AppCallbackNotifierAkwasi Boateng
- 'disableMsgType()' was querying CameraHal for enabled message types through 'msgTypeEnabled()'. This method will lock 'mLock' in CameraHal. On the other hand 'takePicture()' inside CameraHal will also lock 'mLock' before execution. If preview callbacks are enabled before image capture, then 'takePicture()' will call AppCallbackNotifier's 'disableMsgType()', which will try to lock 'mLock' again. Solution, a query to CameraHal for enabled message types is not needed inside 'disableMsgType()' because the passed argument 'msgType' already contains all the needed information. Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com> Change-Id: Ia4b7634ce21b8243f08d9124823c77e6bde84a8d