summaryrefslogtreecommitdiffstats
path: root/core/java/android/hardware/Camera.java
Commit message (Collapse)AuthorAgeFilesLines
* Camera: Working barcode scanning with software renderingWolfgang Wiedmeyer2017-01-041-1/+21
| | | | | | | | | | | | | | | | | | | | 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
* Merge tag 'android-6.0.1_r22' of ↵Steve Kondik2016-03-111-2/+2
|\ | | | | | | | | | | | | | | https://android.googlesource.com/platform/frameworks/base into cm-13.0 Android 6.0.1 release 22 Change-Id: I0d31899b234156a91accb61e0a7fb3d8d16d5062
| * Camera: Documentation updatesEino-Ville Talvala2015-11-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Clarify hardware.camera feature being only for the back camera - Clarify what setting a CaptureRequest field to null does - Use preCorrectionActiveArray instead of activeArray in list of possible raw output sizes - Clarify length of GPS processing field for camera1 API Bug: 24540625 Bug: 23908116 Bug: 23051627 Bug: 17345901 Change-Id: Iaf11fdf626268cf30f66b3628153ec3ac770c4f4
* | Camera: Force HAL1 for predefined package list.Sai Kumar Sanagavarapu2016-02-201-2/+16
| | | | | | | | | | | | | | Force HAL1 for some of the popular apps to optimize power savings. Use the following setprop to add any package : camera.hal1.packagelist Change-Id: I14321c63516178dead54f04e2f6828e10225ed9e
* | Udpate instrumentation codeWilliam Clark2015-11-301-5/+5
| | | | | | | | | | | | Added changes to support new features in QSSP Change-Id: I92c0a4eb3cb5363fbf08185f25644a3202c38788
* | Camera: Longshot with Burst Functionality.Vijay Kumar Tumati2015-11-051-0/+9
| | | | | | | | | | | | | | New Longshot stop command is sent after receiving all the required YUV callbacks or releasing the shutter before reaching Max number. Change-Id: I264d94cde624b5f2ead88236bdff8d6db41e12e6
* | Guard in short-circuit evaluations for stringSplit methods.Mohammed Irfan2015-10-271-2/+2
| | | | | | | | | | | | | | | | | | * splitRange function should also check if string is empty instead of just checking for null, as a faulty camera can return an empty RangeLength string. * See (stripped) logcat: http://pastebin.com/kVV3ZJhz Change-Id: Icbb8f12d1c2511366856889edc9b2060b764f2d0
* | Allow sending vendor- or device-specific commands to the camera HAL.Danny Baumann2015-10-271-0/+14
| | | | | | | | Change-Id: I2aaa9e526b6f1a35d45e96b6d23e3db972d82733
* | Camera: Don't throw exceptions when value pairs have spaces in themRicardo Cerqueira2015-10-181-0/+1
| | | | | | | | | | | | "(1,2)" worked, "(1, 2)" crapped out. Fix it. Change-Id: I71262909280f88d930898a2bcf37d379add4fdea
* | SEEMP: Add more framework instrumentationWilliam Clark2015-10-061-0/+5
| | | | | | | | | | | | | | | | | | Instrument framework files to log events of interest. Conflicts: core/java/android/accounts/AccountManager.java Change-Id: Ia45651e6352586f910039b51cac2356f65f80010
* | Camera: Extend face detectionShuzhen Wang2015-10-061-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+1473
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add camera app op - frameworkSvetoslav2015-05-021-3/+2
| | | | Change-Id: I17736a8abe2c6775e990b88fb3eab963f47167d0
* camera: Add eviction errorcode to Camera1 API.Ruben Brunk2015-04-151-2/+6
| | | | | Bug: 19186859 Change-Id: Ie46150d130e769feb62935ebee8e32e96c0821fd
* Remove unused imports in frameworks/base.John Spurlock2015-02-281-1/+0
| | | | Change-Id: I031443de83f93eb57a98863001826671b18f3b17
* camera2: legacy: disable shutter sounds unconditionally via camera2 apiIgor Murashkin2014-08-191-0/+20
| | | | | Bug: 17109582 Change-Id: Ieb3fc61ff111d792cc657c018e278349c25472cf
* DO NOT MERGE: camera2: Performance potpourri.Ruben Brunk2014-07-161-0/+13
| | | | | | | | | | | | | | | | | | Bug: 16208403 Bug: 15116722 Fixes many of the performance issues in the Camera2 API and LEGACY mode CPU path, including: - Only call getParameters/setParameters when the request has changed. - Cache Request/Result objects. - Cache object hashes for long-lived CameraMetadata, TypeReference, and Key objects with frequently used hash methods. - Switch to Command pattern instead of repeated if/equals calls. in frequently hit CameraMetadata get/set methods. - Move string construction for logging behind flags to avoid extra StringBuilder calls in frequently acquired lock methods. - Cache results from frequently used JNI calls in object Builders. Change-Id: I77bc4a023d4fe8bc46efcf771ff18ee268dcb9a9
* Deprecate android.hardware.CameraEino-Ville Talvala2014-07-131-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | __ || || || ||---____-----+ || \_/ | || /. .\ | || ||---|| | || |___| | || | | | ||---____-----+ || || || _____________||_________________ Replaced by android.hardware.camera2 - Also deprecate MediaRecorder#setCamera - Also deprecate all Camera inner classes - Update reference documentation in various classes to point to camera2 - Add note to camera API guide that it uses the old API (until a new guide is available) - Remove old hidden raw sensor format; superceded by RAW_SENSOR. Change-Id: I3d839765fc9b9aae906751ee32d6956ef40451ce
* camera2: Add crop region support and some other AE tags to legacyIgor Murashkin2014-07-021-0/+40
| | | | Change-Id: If7a87b210a57ea13d6329bb363b1c7ecdadc52e8
* camera: Get detailed error reporting from api1 Camera if open failsIgor Murashkin2014-06-201-42/+42
| | | | | | * 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-2/+129
| | | | | | | 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-5/+44
| | | | | | | | | | | | | | | | 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
* camera: Fix setParameters for Preview FPS single/range valuesIgor Murashkin2014-03-201-4/+26
| | | | | Bug: 12609188 Change-Id: I82ea6f5de2183dd046d4bf5683600c97f37ab4db
* am 29eadb32: am 9a743575: am 71cdc73d: am 53acc7ae: am f5598210: Merge ↵Narayan Kamath2014-01-081-1/+1
|\ | | | | | | | | | | | | "AArch64: Use long for pointers in hardware classes" * commit '29eadb328a71f912b0d479860286cd606ed3dc87': AArch64: Use long for pointers in hardware classes
| * AArch64: Use long for pointers in hardware classesAshok Bhat2014-01-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Remove unused imports from frameworks/base.John Spurlock2013-11-201-1/+0
|/ | | | Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
* Fix build break due to javadoc linking errorIgor Murashkin2013-06-111-15/+18
| | | | Change-Id: I9da1cb03afef25c11844ec863200f7b5b009e77a
* Camera: Add hidden camera preview to renderscript allocation APIEino-Ville Talvala2013-04-171-0/+155
| | | | | | | | | | | - 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
* Camera and MediaRecorder: Support AppOpsEino-Ville Talvala2013-02-251-2/+7
| | | | | | | | - Allow media processes to update AppOps state - Pass package name to media services Bug: 8181262 Change-Id: I115d39f0b306cb9eb7cd3d3e663c680b7322fd3f
* fix typo in docsHai Guo2012-12-051-1/+1
| | | | | | | description of 'android/hardware/Camera.Parameters.html# setPreviewFpsRange(int, int)' not right Change-Id: Ic83c0f404710a0125138df1e2b7663994301aee7
* Camera: Document new video snapshot picture size behavior.Eino-Ville Talvala2012-11-051-16/+20
| | | | | | | | On some devices, video snapshot may return pictures that are smaller than requested. Make that clear. Bug: 7475089 Change-Id: I0bd759072a7f954e517f3d09cb676fb23f863912
* Camera: Query AudioService for shutter sound enforcement.Eino-Ville Talvala2012-10-081-2/+34
| | | | | | | | | 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
* Camera: Improve enableShutterSound documentation.Eino-Ville Talvala2012-09-241-13/+16
| | | | | Bug: 7216272 Change-Id: I1b9add715c7d3671472b9f98d9b1d80823109365
* NEW_API: Add android.hardware.Camera.CameraInfo#canDisableShutterSoundEino-Ville Talvala2012-09-191-0/+15
| | | | | | | | Allow applications to check if the camera shutter sound can be disabled. Bug: 7172643 Change-Id: I3e9184325d3676b24830cc5418ebca8dcade8697
* Camera: Document face detection confidence recommendations.Eino-Ville Talvala2012-09-151-2/+8
| | | | | Bug: 7108023 Change-Id: I9de583254d127f9c1f702b7ed159a7080bcbfd25
* Merge "NEW_API: Unhide android.hardware.Camera#enableShutterSound" into ↵Eino-Ville Talvala2012-09-131-1/+0
|\ | | | | | | jb-mr1-dev
| * NEW_API: Unhide android.hardware.Camera#enableShutterSoundEino-Ville Talvala2012-09-111-1/+0
| | | | | | | | Change-Id: I8e7ef3e035dd261be51874f514d6be2fb8933e96
* | Merge "NEW_API: Unhide android.hardware.Camera.Parameters#SCENE_MODE_HDR" ↵Eino-Ville Talvala2012-09-111-1/+0
|\ \ | | | | | | | | | into jb-mr1-dev
| * | NEW_API: Unhide android.hardware.Camera.Parameters#SCENE_MODE_HDREino-Ville Talvala2012-09-111-1/+0
| | | | | | | | | | | | | | | | | | Bug: 7054970 Change-Id: I509fa18f1203022bb23cd9ef5c70cb3a3fbb8b77
* | | Merge "Camera: Add SCENE_MODE_HDR." into jb-mr1-devEino-Ville Talvala2012-09-111-0/+10
|\ \ \ | |/ / | | / | |/ |/|
| * Camera: Add SCENE_MODE_HDR.Eino-Ville Talvala2012-09-101-0/+10
| | | | | | | | Change-Id: I43262e6ecd4bdd9a2ed2e94c05ad95435b32a0cd
* | Camera: Add enableShutterSound method.Eino-Ville Talvala2012-09-101-0/+25
|/ | | | | | | | | | 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
* Change StringTokenizer to TextUtils.StringSplitterAli Utku Selen2012-08-101-25/+26
| | | | | | | | | | Replacing StringTokenizer to TextUtils.StringSplitter, since TextUtils.StringSplitter is more suitable for basic splitting tasks. Also increased initial values for HashMap and StringBuilders to avoid unnecessary buffer enlargement operations. This improves the performance of these operations. Change-Id: If9a5b68e6596ba9a6d29597876b6164ef34b57ac
* Fix race condition with preview callback.Eino-Ville Talvala2012-05-301-3/+3
| | | | | Bug: 6301018 Change-Id: I19b8bc03ef3983d69e1e986c0f1a8154af5ab080
* Fix startFaceDetection will fail after taking a picture.Wu-cheng Li2012-05-291-0/+1
| | | | | bug:6568961 Change-Id: I353c24496ec00805ed46ba90457729dfb5b2c337
* Merge "Avoid deadlocks when calling autoFocus from onAutoFocus callback." ↵Wu-cheng Li2012-05-031-30/+31
|\ | | | | | | into jb-dev
| * Avoid deadlocks when calling autoFocus from onAutoFocus callback.Wu-cheng Li2012-05-041-30/+31
| | | | | | | | | | | | | | | | | | Applicatons may use different threads for calling autoFocus and onAutoFocus callback. bug:6026574 Change-Id: I114a60240e22af15ca469b591e080121367db8e2
* | Merge "Update docs for YV12 format and camera preview callbacks." into jb-devEino-Ville Talvala2012-05-031-13/+57
|\ \ | |/ |/|
| * Update docs for YV12 format and camera preview callbacks.Eino-Ville Talvala2012-05-031-13/+57
| | | | | | | | | | | | | | | | | | | | | | | | - Define stride for YV12 when using it for preview callbacks - Include equations for calculating stride and start indexes of Y, U, and V planes for YV12. - Add more cross-references so that equations are easier to find. Bug: 6330501 Change-Id: I85a78757ec767d08173b9fe714adb715835244b4
* | Fix a race condition in Camera API for handling focusJames Dong2012-04-301-6/+34
|/ | | | | | | | | | | | | | | | | | In the case where a previous AF completion was outstanding but before the completion notification reached the application, the application cancelled this AF request, and then started a new AF request. Right after the new AF request, the AF completion notification for earlier AF request reached the application. The application could not tell the AF completion notification was meant for the cancelled AF, but thought the new AF was successfully completed. Subsequently, the application trid to take a picture, which failed as a result. The fix is to add an explicit lock in the Camera.java class to fix the race condition to synchornize autoFocus(), cancelAutoFocus() and the callback of the pending AF completion message. o related-to-bug: 6026480 Change-Id: I33d244d908ac066698e792f641ba88fe228b14a9