summaryrefslogtreecommitdiffstats
path: root/camera/CameraHalUtilClasses.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CameraHAL: Moved Camera HAL sources out of namespace androidDaniel Levin2012-07-251-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | C++ namespace android:: is reserved for base Google Android types to avoid current and further conflicts with 3rd party code. Having TI Camera HAL under namespace android:: violates this rule, adding potential conflicts. This patch moves libtiutils and Camera HAL code out of namespace android:: to custom local namespaces. Putting camera code under namespace android and 'using namespace android' is not allowed anymore. All C++ Android types should have android:: namespace prefix explicitly. Next namespaces added: - Ti:: - placeholder for all custom code - Ti::Utils:: - common utility helper library - Ti::Camera:: - Camera HAL code Also added Ti::status_t as typedef for android::status_t. Change-Id: Ie8cc00d6d6bd4e8a8ddf089421010c370ee40ebe Signed-off-by: Daniel Levin <dendy@ti.com>
* CameraHal: Add CameraBuffer (major refactoring)Tyler Luu2012-07-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | Add a CameraBuffer type, which contains information corresponding to an internal CameraHal buffer - how it was allocated, relevant handles, and any internal data to be associated with the buffer, such as metadata, OMX indexes, current state. The simplest possible refactoring was done to convert the void * used for exchanging buffer information into the 'opaque' field in the CameraBuffer structure. A few hacks were added to minimize the size of the refactoring, these will be cleaned up in upcoming commits. Adding a private structure for buffers eliminates the need for a lot of KeyedVectors that are currently in use. Most of these were left in place, and will be refactored into the CameraBuffer structure later. The pAppPrivate field of OMX_BUFFERHEADERTYPE was used to eliminate another KeyedVector. Change-Id: I147ad971e4cdc03b2c445b5fba81d0ba83bc5fb3 Signed-off-by: David Schleef <ds@ti.com> Signed-off-by: Vladimir Petrov <vppetrov@mm-sol.com> Signed-off-by: Tyler Luu <tluu@ti.com>
* CameraHAL: Fixed events disableAndriy Chepurnyy2012-07-251-1/+1
| | | | | | | | | Use MSB 16 bits for CameraHAL events and LSB 16 bits is for frame types when enable/disable various notifications. Change-Id: Ie878d454d3de8209677fee4d31639156eff877a8 Signed-off-by: Andriy Chepurnyy <x0155536@ti.com>
* CameraHAL: Improved debug loggingDaniel Levin2012-07-251-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0. Renamed DEBUG_LOG macro to CAMERAHAL_DEBUG and moved it from CameraHal.h into Android.mk. To enable debug logging next variable should be put into $AFS/buildspec.mk: TI_CAMERAHAL_DEBUG_ENABLED := 1 To enable verbose debug logging next variable should be put into $AFS/buildspec.mk: TI_CAMERAHAL_VERBOSE_DEBUG_ENABLED := 1 1. CAMHAL_LOG*A and CAMHAL_LOG*B macros have been united into single CAMHAL_LOG* macro that accepts both variants. 2. Rewritten LOG_FUNCTION_NAME/LOG_FUNCTION_NAME_EXIT macros. Now they do operate on internal FunctionLogger class instance that does function enter/exit logging in constructor/destructor. If LOG_FUNCTION_NAME is used then LOG_FUNCTION_NAME_EXIT can be skipped in source code, in this case destructor will correctly print function exit entry. 3. Added optional printing message timestamps. To enable timestamp printing next variable should be put into $AFS/buildspec.mk: TI_CAMERAHAL_DEBUG_TIMESTAMPS := 1 4. Moved LOG_TAG macro definition from all CameraHAL sources to Android.mk. 5. Added printing message thread ids. 6. Added printing per thread call stack indentation to visualize call hierarchy. 7. Added CAMHAL_ASSERT(condition) and CAMHAL_ASSERT_X(condition,description) macros to assert conditions at runtime and abort process on failure. 8. Added CAMHAL_UNUSED(x) to mark unused variables which are not mistakes. 9. Added next variables to enable debug logging for MessageQueue, that should be put into $AFS/buildspec.mk: TI_UTILS_MESSAGE_QUEUE_DEBUG_ENABLED := 1 TI_UTILS_MESSAGE_QUEUE_DEBUG_FUNCTION_NAMES := 1 Signed-off-by: Daniel Levin <dendy@ti.com> Change-Id: I8ebea607199de621860ada6dfcab9164ba85674a
* CameraHAL: Fixed line endingsDaniel Levin2012-07-251-362/+362
| | | | | | | | | | | | | Replaced line endings to UNIX in CameraHAL related sources. Also removed executable flag from random sources. No code changes. Signed-off-by: Daniel Levin <x0155538@ti.com> Signed-off-by: Jean Johnson <a0271255@ti.com> Change-Id: Id32c429fe7527342cfa2a7b9b1724e5f088dbd3f
* omap4xxx: camera: only set CameraAreas if changedTyler Luu2011-10-071-0/+23
| | | | | | | | | | | | Partial fix for b/5371242 Add logic to compare areas for metering and focus before calling SetConfig for the respective indices so we only set the areas if the areas have changed Change-Id: Id6b55e3d8e78557f45b92a5afefdb8298450da61 Signed-off-by: Tyler Luu <tluu@ti.com> Signed-off-by: Iliyan Malchev <malchev@google.com>
* CameraHAL: CTS fixes related to #testMeteringAreasSundar Raman2011-09-211-3/+3
| | | | | | | | | | | | | | | | | | - The status of "parseAreas()" should always be checked in order to return proper error code in case of invalid input arguments. - If the input metering areas are more than the supported ones, then always return an error. - 'parseAreas()' expects the buffer size, not the string length. - Refactors "parseFocusAreas()' to the more general 'parseAreas()'. Change-Id: I4c70bcaa3c676f525b721916cc39c66db5e0fc17 Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Sundar Raman <sunds@ti.com>
* Grallock lock and unlock fixesAkwasi Boateng2011-09-211-0/+11
| | | | | | | | | | | 1. Get and store Y and UV pointers from all gralloc handles to be used for preview callback and video frames. 2. Ensure gralloc lock is successfull before frame return to OMXCameraAdapter Change-Id: Ibeea6d00f2c1a1c45bcd2eafb22b90a795516e5c Signed-off-by: Akwasi Boateng <akwasi.boateng@ti.com>
* CameraHal: Fixes related to CTS test #testFocusAreasTyler Luu2011-08-161-1/+56
| | | | | | | | | | | | - Sanity checks should be performed on the individual areas for the test to pass. - On invalid configuration CameraParameters should revert to the last known good configuration. Change-Id: I9026f287e884835a98c835e8f949ad4441c030bd Original-author: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Emilian Peev <epeev@mm-sol.com> Signed-off-by: Tyler Luu <tluu@ti.com>
* initial commitIliyan Malchev2011-08-081-0/+273
Change-Id: I8f7a7eeece0e516efa486b77e9d97805c0e65d3e Signed-off-by: Iliyan Malchev <malchev@google.com>