summaryrefslogtreecommitdiffstats
path: root/core/jni/android_hardware_Camera.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Camera: Working barcode scanning with software renderingWolfgang Wiedmeyer2017-01-041-0/+43
| | | | | | | | | | | | | | | | | | | | Barcode scanner apps expect YUV as preview format. However, the software renderer cannot handle YUV. Thus, RGB 565 is used. Barcode scanner apps only need the first plane Y which is basically greyscale. The solution is a conversion from RGB to greyscale of preview frames that are requested by apps for processing. Apps request preview frames via onPreviewFrame(). The conversion is done using native code for optimal speed. The conversion algorithm is based on the implementations in the RGBLuminanceSource class of ZXing[1] and the RGB565LuminanceSource class of FastBarcodeScanner[2]. Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de> [1] https://github.com/zxing/zxing/blob/cc16a72c85e4958ce406af9547764e5eee9adb6e/core/src/main/java/com/google/zxing/RGBLuminanceSource.java [2] https://github.com/tschaumburg/FastBarcodeScanner/blob/5a4c166a722730d0099d4c6a1c15d312b93547da/tracking-barcode-scanner/src/main/java/dk/schaumburgit/trackingbarcodescanner/RGB565LuminanceSource.java
* Camera: Longshot with Burst Functionality.Vijay Kumar Tumati2015-11-051-3/+21
| | | | | | | New Longshot stop command is sent after receiving all the required YUV callbacks or releasing the shutter before reaching Max number. Change-Id: I264d94cde624b5f2ead88236bdff8d6db41e12e6
* Allow sending vendor- or device-specific commands to the camera HAL.Danny Baumann2015-10-271-0/+15
| | | | Change-Id: I2aaa9e526b6f1a35d45e96b6d23e3db972d82733
* Camera: Extend face detectionShuzhen Wang2015-10-061-3/+65
| | | | | | | | | | | | | | | | | | | | | | | | This change is the combination of below commits, plus removing ExtendedFace class from frameworks/base. # This is the 1st commit message: Add framework support for extended face detect CRs-Fixed: 587195 Change-Id: I2a1c477ee6d11f2b9764966abbb85ede9100fe91 # This is the 2nd commit message: Camera: Extended face features added - QCFace renamed to ExtendedFace CRs-Fixed: 587195 Change-Id: I7c7e2073f283522c2f0bd0fa5e7b96a74ae18011 # This is the 3rd commit message: Camera: QCFace AOST copyrights fixed AOST files copyright data must not be updated to 2014 CRs-Fixed: 587195 Change-Id: I0cd603da674152c9f47350e571ec3e230b61f8dd Change-Id: I5d099efe1721e5d26af51006dae4e5f3ea3292d6
* Camera: Add feature extensionsShuzhen Wang2015-10-061-1/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change includes below gerrits: # This is a combination of 7 commits. # The first commit's message is: Camera: Add support for QC camera features. Added APIs and keys for all QC features. This will enable application to get/set paramters. (cherrypicked from commit d0c5a0ee7e9af41320fed00ff324c6d0f22eb697) Change-Id: I68c23aaf7267645efeb4d4743b390a048292b7fd # This is the 2nd commit message: Camera: Adds support for meta data callbacks - This change adds a new type of callback that will be called when there are pending meta data notifications. Change-Id: I84f5cbafe4f023c7b0efa9ec8620756b0eaa428d # This is the 3rd commit message: Camera: Adds support for longshot configuration - The Camera API is extended with one additional call for longshot mode configuration. (cherrypicked from commit 867c4865b2a61a8e844e2784c41b7aafc392aec0 ) Change-Id: Idb91a21dc0d9fa9d22b4a6bbcc0b2eebfc2cb6db # This is the 4th commit message: Camera: Add support for manual 3A Add API for manual 3A (awb/af/aec). Change-Id: Ia5240207ce7a6628e8fdfef79f56db01add14aef # This is the 5th commit message: Camera: use single KEY for set/get manual 3A parameters. Instead of using different KEYs, we can share one same key, for set/get 3A parameters from APK. Change-Id: Ie3216ee4e1b8f62fcdd57a0be119d4b8dcdd81b3 # This is the 6th commit message: Framework: Adding support for Auto HDR Adding support for Auto HDR for camera CRs-fixed: 629556 Change-Id: Ie5e4718524d2ed799f1f9af1f76e89c01d743ac8 # This is the 7th commit message: Camera: Add support for video rotation Adding apis to support video rotation. CRs-Fixed: 672804 Change-Id: Ic67e82058824a6dc7cc803ef0efe61475350bafc Change-Id: Ideb191d666e7de8db132811f66a7796d87e75971
* Camera2: Add camera type to getNumberOfCameras.Eino-Ville Talvala2015-08-141-0/+6
| | | | | | | | Do not list strange cameras in old API; ensure new API gets all cameras. Bug: 23194168 Change-Id: Ia1fdffac245525674c913fefb1ec06e9094fe8d3
* am 1334a6f3: am 8d47bc97: Merge "Camera: Clarify JNI exception message" into ↵Eino-Ville Talvala2015-01-151-1/+2
|\ | | | | | | | | | | | | lmp-mr1-dev * commit '1334a6f34296094baddc0d4c0c93357532b2a96d': Camera: Clarify JNI exception message
| * Camera: Clarify JNI exception messageEino-Ville Talvala2015-01-121-1/+2
| | | | | | | | | | | | | | | | This exception may be generated through MediaRecorder method calls as well, so clarify that the issue is an invalid camera object. Bug: 18414095 Change-Id: I189ab1a71ab0d6a432b87c45a82c90fe11d22ef8
* | resolved conflicts for merge of 3fc5e3ca to lmp-mr1-dev-plus-aospAndreas Gampe2014-11-211-38/+12
|\ \ | | | | | | | | | Change-Id: Id8286e5a4381315a6060251a8055b0f1d1a96019
| * | Frameworks/base: Consistency in core/jniAndreas Gampe2014-11-211-38/+12
| | | | | | | | | | | | | | | | | | | | | | | | Make consistent use of core_jni_helpers for registration. Translate some #ifdefs into const bools. Change-Id: I37639aa053dd50f003a552cbd8550dddecc811c5
* | | resolved conflicts for merge of 8e0cfe7c to lmp-mr1-dev-plus-aospDan Albert2014-11-201-4/+4
|\ \ \ | |/ / | | | | | | Change-Id: I068d2a0fb118d4e2b4c1e546bebfcbc2cb120d36
| * | Merge "Fix clang warnings in core/jni."Dan Albert2014-11-201-4/+4
| |\ \
| | * | Fix clang warnings in core/jni.Dan Albert2014-11-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a few bugs in here too (mostly people expecting + to concatenate C strings) :( Change-Id: I0a243c05c4ea8b56e84896f37814d0fbea4c39d5
* | | | am d8c169fe: am 0c437fd3: Merge "Add appropriate casts for char16_t."Dan Albert2014-11-201-3/+6
|\ \ \ \ | |/ / / | | | / | |_|/ |/| | * commit 'd8c169fedf883491e46b354484909694fd52cfaf': Add appropriate casts for char16_t.
| * | Add appropriate casts for char16_t.Dan Albert2014-11-201-3/+6
| |/ | | | | | | | | | | | | | | C++11 defines a real char16_t, which is not implicitly convertible to uint16_t (and by extension jchar). Add casts as needed. Bug: 18300613 Change-Id: I00752002ef2e938bdb57f70947e8fd53ec103293
* | camera: Fix missing optional Face fields (eyes, mouth, id)Igor Murashkin2014-09-181-0/+55
|/ | | | | Bug: 17557634 Change-Id: Ife2ba0cb881f9dba3195b02021fb1876a6d0825e
* camera: Get detailed error reporting from api1 Camera if open failsIgor Murashkin2014-06-201-2/+7
| | | | | | * Also maps camera2 open errors the same for shim/nonshim paths Change-Id: I08d9d1e30e72025c41bd54b702d7ae95b32257be
* Camera: Implement HAL1 and higher HAL API coexistenceZhijun He2014-06-191-5/+14
| | | | | | | A higher hal version device like HAL3.2 can be opened as HAL1.0 device if HAL supports it. This only applies to camera API1. Change-Id: I4ae9f59f4317158cc1bd7ed7726e4032cdd1fa07
* camera2: Add HAL1 compatibility shim skeleton.Ruben Brunk2014-05-211-11/+12
| | | | | | | | | | | | | | | | This adds basic support for running the Camera2 API on a device running a camera HAL version lower than CAMERA_MODULE_API_VERSION_2_0. This CL includes support for: - N-way preview output streams - N-way jpeg output streams - CameraDevice emulation at the binder interface - Basic camera metadata querying in the CameraManager Bug: 15117269 Bug: 15116722 Change-Id: I8322955034c91f34bb348d4b28c2b774dbef38f6
* Fix warningsGlenn Kasten2014-03-281-1/+1
| | | | Change-Id: Ie00f6c58a944e2db0539f1119d2983a483b6f10c
* AArch64: Use long for pointers in hardware classesAshok Bhat2014-01-081-11/+11
| | | | | | | | | | | | | | For storing pointers, long is used in hardware classes, as native pointers can be 64-bit. In addition, some minor changes have been done to conform with standard JNI practice (e.g. use of jint instead of int in JNI function prototypes) Change-Id: Icdeb67f9273fb2d8f6d88ca68d7f7d0950796fc1 Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
* Camera1: Rename setPreviewTexture to ...Target for clarityEino-Ville Talvala2013-08-211-2/+2
| | | | | Bug: 10312644 Change-Id: I4bee90428cb932a12d73dad89e91bb2ef492dc86
* Clearly separate consumer and producer interfacesMathias Agopian2013-08-061-8/+4
| | | | | Bug: 9265647 Change-Id: Ic68e91788d0a05251e1d2fb9f9d4de403c7099bf
* Camera: Add hidden camera preview to renderscript allocation APIEino-Ville Talvala2013-04-171-0/+27
| | | | | | | | | | | - Camera.createPreviewAllocation() creates YUV allocations for use as a preview buffer destination. - Camera.setPreviewCallbackAllocation() sets such an allocation as the target for preview data from camera. Bug: 8563840 Change-Id: Ie42033976fed825d396550bbc033d434c8206b6b
* remove uses of Surface in favor of IGraphicBufferProducerMathias Agopian2013-03-121-2/+6
| | | | Change-Id: I2ec590eed03c76a084ee6b0af362a3ca6476bf9f
* fix JNI use of incStrong/decStrongMathias Agopian2013-03-061-2/+2
| | | | Change-Id: Ia11b404dea483dc19bbc30f4d7bcff516655e180
* Camera and MediaRecorder: Support AppOpsEino-Ville Talvala2013-02-251-3/+10
| | | | | | | | - Allow media processes to update AppOps state - Pass package name to media services Bug: 8181262 Change-Id: I115d39f0b306cb9eb7cd3d3e663c680b7322fd3f
* Restore a mistakenly-removed null checkJesse Hall2013-02-211-1/+4
| | | | | | | | | Passing null to camera.setPreviewDisplay() needs to work; this restores the behavior from before the Surface/SurfaceControl refactoring. Bug: 8225538 Change-Id: Ib73bfa9fe53457a41a69b7fe5dfff3a3aa260f52
* split Surface in two classes: SurfaceControl and SurfaceMathias Agopian2013-02-141-6/+3
| | | | | | | | | SurfaceControl is the window manager side; it can control the attributes of a surface but cannot push buffers to it. Surface on the other hand is the application (producer) side and is used to push buffers to the surface. Change-Id: Ib6754c968924e87e8dd02a2073c7a447f729f4dd
* Rename ISurfaceTexture and SurfaceTextureAndy McFadden2012-12-181-2/+2
| | | | | | | | | | The C++ class names don't match what the classes do, so rename ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to GLConsumer. Bug 7736700 Change-Id: I08e677faf2ebb418ef131d0a8008e01037db0e50
* Updated android.graphics.SurfaceTexture to use wp for FrameAvailableListenerIgor Murashkin2012-10-301-5/+3
| | | | | Bug: 7425644 Change-Id: I7ccdc0ef421df7240d6cff9222c37411b1ecaf01
* Camera: Query AudioService for shutter sound enforcement.Eino-Ville Talvala2012-10-081-2/+2
| | | | | | | | | The AudioService now tracks the shutter sound enforcement status, in addition to the existing approach. Check with it when doing shutter sound operations. Bug: 7032634 Change-Id: Ief855d3a36ca5679832cf439f5638b10f70b8636
* NEW_API: Add android.hardware.Camera.CameraInfo#canDisableShutterSoundEino-Ville Talvala2012-09-191-0/+10
| | | | | | | | Allow applications to check if the camera shutter sound can be disabled. Bug: 7172643 Change-Id: I3e9184325d3676b24830cc5418ebca8dcade8697
* Camera: Add enableShutterSound method.Eino-Ville Talvala2012-09-101-0/+22
| | | | | | | | | | Some camera apps may wish to replace the system camera shutter sound with their own, especially if they are taking rapid bursts of images. Add method to allow this when possible. Hidden for now. Change-Id: I6520f5441d28675626fafab48c6609c589fc6f7e
* Remove new camera open API.Wu-cheng Li2012-04-191-15/+3
| | | | | | | | Applications are not resumed under the lock screen now. This API is not needed anymore. bug:5584464 Change-Id: I1c18efb5ba1ecd39320eb5fd252c6e1229d7b89c
* Add a new camera open API that allows taking the ownership.Wu-cheng Li2012-03-151-4/+21
| | | | | | | | | | | | | | The purpose is to let face unlock always get the camera successfully. What happened was the camera applications may have opened the camera in onResume under the lock screen. This API lets face unlock take the camera from the camera application. A new permission will be added, so other applicatoins won't be able to take the camera from the face unlock. bug:5584464 Change-Id: Ib3d9dcbc2161815b68db42327dc01148453704c6
* SurfaceTexture: Fully refactored from BufferQueueDaniel Lam2012-03-131-3/+13
| | | | | | Cleaning up camera and media interactions as part of SurfaceTexture refactoring Change-Id: Iea2b10ff80b5f01f83ed0902c725df1d3b4c541a
* fix libgui header locationMathias Agopian2012-02-271-1/+1
| | | | Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-10/+10
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-061-2/+2
| | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
* Fix compile error in android_hardware_Camera.cpp.Wu-cheng Li2011-11-301-1/+1
| | | | Change-Id: I06b187deaacb98e01813dbfb8d92a332bfc08fc4
* Add camera focus move callback.Wu-cheng Li2011-11-291-0/+14
| | | | | bug:5534973 Change-Id: Iaadcb2738ad040f94849be30ee531326f6199431
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-37/+37
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* Fix jpeg callback is lost if setPreviewCallbackWithBuffer has been called.Wu-cheng Li2011-09-211-25/+14
| | | | | | | | | mManualBufferMode is only for CAMERA_MSG_PREVIEW_FRAME. If it is CAMERA_MSG_COMPRESSED_IMAGE, a new byte array should be allocated. bug:5340480 Change-Id: I4f33bd6297bfd30505e0e15ae46012ea44e85962
* Pass camera frame metadata from camera service to Java.Wu-cheng Li2011-08-021-9/+85
| | | | | bug:4460717 Change-Id: I2fae6e1dfca6b8f3a5ee5716fc7817f5417bf657
* Add frame metadata parameter to camera data_callback.Wu-cheng Li2011-07-291-3/+3
| | | | | bug:4460717 Change-Id: Ib47d7d7df20af8155a719f3dabefe030893bfebc
* Add camera face detection API.Wu-cheng Li2011-07-271-1/+48
| | | | | | | API are still hidden. bug:4460717 Change-Id: I1a515061f141a89bd61c875257712789fb15d2d4
* frameworks/base: include system/core header camera.h in Camera.hIliyan Malchev2011-05-031-7/+7
| | | | | | | | | | | | We define struct CameraInfo in this camera/Camera.h, even though an identical struct camera_info is defined in hardware/camera.h (but not in hardware/camera_defs.h). We may not export struct definitions from the HAL into headers which may find their way into the NDK. This commit also renames FRAME_CALLBACK_FLAG_xxx to CAMERA_FRAME_CALLBACK_xxx. Change-Id: I3e2ddd01d61bf5371ff2fc1a397995e0f1ee11f8 Signed-off-by: Iliyan Malchev <malchev@google.com>
* More JNI exception-throwing cleanup.Elliott Hughes2011-04-081-19/+16
| | | | | | | | | | | | | There are a few (unimportant) bug fixes here. There were several attempts to throw exceptions in situations where there's already a pending exception. There were also cases where the code was wrong; it was checking for a NULL return from Get*ArrayElements and throwing NPE, but passing NULL is an error that causes a crash and a NULL return means an exception has already been thrown. I didn't want to get into the Scoped* classes just yet, but that was by far the easiest way to fix this. Change-Id: I0b31160ee51b96e82539f6514b8412b149dba7c3
* Application-managed callback buffer support for raw imageJames Dong2011-02-221-67/+173
| | | | | | bug - 3292153 Change-Id: I9789f7c5cde3a3889d7375e881181e9152d95fc2