summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/CameraService.cpp
Commit message (Collapse)AuthorAgeFilesLines
* camera: Fix client eviction/disconnect race.Ruben Brunk2015-04-131-4/+23
| | | | | | | | | | | - Add blocking wait in camera service connect call to prevent race when client has called disconnect while eviction of that client is taking place, resulting in early call of device initialization before all HAL resources are available. Bug: 20038135 Change-Id: I7afc5bfa23612ba7f83293fa542ff983a5991230
* camera: Update camera service logging and validation.Ruben Brunk2015-04-091-37/+89
| | | | | | | | | - Expand the logging included by the camera service. - Update user validation checks in connect calls so that these can be correctly called from the camera service. Bug: 20063426 Change-Id: I0a8cbe1ea2c0a652298e6b70c89705da174a50e1
* camera2: Enforce client eviction on user switch.Ruben Brunk2015-03-311-12/+110
| | | | | Bug: 19186859 Change-Id: I172a2ce46c8e8a131ae7e8dd99d60c5f4f0d6668
* Merge "camera: update CameraModule"Yin-Chia Yeh2015-03-241-15/+12
|\
| * camera: update CameraModuleChien-Yu Chen2015-03-241-15/+12
| | | | | | | | | | | | | | | | | | | | 1. Add more accessor methods to CameraModule to prevent exposing raw module pointer 2. Use KeyedVector to replace array Bug: 19897963 Change-Id: I111cc093f09f5fb3c4b13693d5d0687e1f441058
* | camera2: Remove ProCamera.Ruben Brunk2015-03-201-39/+0
|/ | | | | Bug: 19186859 Change-Id: I4aaadb53db65b479f92cbb3c05329d1e40317900
* Fix link error of PROCESS_STATE_NONEXISTENT.Chih-Hung Hsieh2015-03-191-1/+5
| | | | | | | | | * A reference to PROCESS_STATE_NONEXISTENT will cause link error with clang or standard C++ compiler because there is no out-of-class definition, although g++ is allowing it. Use +PROCESS_STATE_NONEXISTENT to get the value instead of reference. Change-Id: I62049584b94e6847b64b572f6ef6c3e9dcc573eb
* camera2: Add camera client eviction enforcement.Ruben Brunk2015-03-181-805/+849
| | | | | | | | | - This updates the CameraService to implement client eviction behavior based on process priority. Bug: 19186859 Change-Id: I646939b1cdf1a2237c4e5044164d55a2542cf36e
* camera: implement flashlight for HAL v1 devicesChien-Yu Chen2015-03-031-13/+0
| | | | | | | | | Implement flashlight for HAL v1 devices and remove CameraHardwareInterface's dependency on CameraService to avoid circular dependency. Bug: 2682206 Change-Id: Id5bbccef085b607a6189763fd7fbe2e3f26868c8
* camera: fix flashlight implementation for HAL v2Chien-Yu Chen2015-03-031-58/+143
| | | | | | | | | | | | | | | | | | Update torch availability when the camera device availability changes. For device HAL v2 and v3 implementation, notify torch unavailable for all camera devices with a flash unit when a camera device is opened. Notify torch available for all camera devices with flash unit when all camera devices are closed. Don't invoke torch status callback in camera service. Invoke torch status callback in HAL or FlashControlBase implementations to avoid race condition. Clean up previous CL. Bug: 2682206 Change-Id: I24f5478f467b2c680565fe98f112eef33e2547a1
* Merge "camera: implement flashlight control"Chien-Yu Chen2015-02-191-1/+175
|\
| * camera: implement flashlight controlChien-Yu Chen2015-02-121-1/+175
| | | | | | | | | | | | | | | | Implement flashlight API for module v2.4 by calling module APIs and by for hal v2 and v3 by using CameraDeviceBase. Bug: 2682206 Change-Id: Ib8b77f6fd462489d672f27e14fe37801d35b7544
* | Look up user-specific device policy for disabling cameraAmith Yamasani2015-02-131-1/+5
|/ | | | | | | | | | | | | | Camera can be disabled on a per-user basis by device admins. Changed the system property format to be per-user so that the policy can be applied based on calling user. TODO: Ideally this policy information should be pulled from the DevicePolicyManager rather than relying on system properties. Property changes will not be applied immediately either, if there's no listener. Bug: 19345698 Change-Id: Ia00034726260bc9ff28ac592f20a27b5c9a77d58
* CameraService: intercept Camera moduleYin-Chia Yeh2015-02-031-27/+29
| | | | | | | | Wrap camera module returned from HAL so get_camera_info returns static_camera_characteristics processed by framework, which generates keys added after HAL3.2 is released. Change-Id: Ief423a1571cf06c7ef80b98b403a33969baf95f6
* am ffa3e71e: am bc0f452b: Merge "Camera2: Fix CameraParameters parse ↵Ruben Brunk2014-11-211-0/+1
|\ | | | | | | | | | | | | segfault." into lmp-mr1-dev * commit 'ffa3e71e47215b68fe4ae0b7a3f976db648d63d3': Camera2: Fix CameraParameters parse segfault.
| * Camera2: Fix CameraParameters parse segfault.Ruben Brunk2014-11-201-0/+1
| | | | | | | | | | Bug: 18331142 Change-Id: I41feec93f753f97b3e6bf963deb4a42b73406421
* | Update calls to IInterface::asBinder()Marco Nelissen2014-11-171-9/+9
| | | | | | | | | | | | | | | | | | | | | | to use the new static version. Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a Conflicts: media/libmedia/IAudioFlinger.cpp media/libmedia/IMediaPlayer.cpp media/libstagefright/CameraSource.cpp
* | Camera: Guard against asBinder() calls on NULL interfacesEino-Ville Talvala2014-11-071-2/+5
|/ | | | | Bug: 18207548 Change-Id: I9879c9b4c0282a6b96b77398f62beedc47f7f0a0
* camera: Allow shutter sounds to be disabled from camera2 apiIgor Murashkin2014-08-191-20/+24
| | | | | | | | | | | When using the connectLegacy binder interface (available only through an @hide java api), then consider the camera to be in the camera2 api legacy mode. In legacy mode, allow disabling the shutter sound unconditionally. Bug: 17109582 Change-Id: Ieb3fc61ff111d792cc657c018e278349c25472cf
* CameraService: Clean up availability listeners and HAL error codesEino-Ville Talvala2014-07-281-47/+49
| | | | | | | | | | | - Refactor where availability listeners are called to centralize behavior, ensuring that all client creation/destruction invokes the listeners - Clean up some of the client hierarchy - Filter error codes from key HAL calls to ensure proper reporting Bug: 16514157 Bug: 16483222 Change-Id: I59875a865b6a508b47423946c78862da8df34cd1
* Camera2: get stream configs by device verisonYin-Chia Yeh2014-06-201-2/+1
| | | | | | | | | | | | | | | | Starting from device version 3.2, the following tags: ANDROID_SCALER_AVAILABLE_FORMATS ANDROID_SCALER_AVAILABLE_JPEG_MIN_DURATIONS ANDROID_SCALER_AVAILABLE_JPEG_SIZES ANDROID_SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES ANDROID_SCALER_AVAILABLE_RAW_MIN_DURATIONS ANDROID_SCALER_AVAILABLE_RAW_SIZES are deprecated and replaced by: ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS Change-Id: Iadc34af0ea985a16a25759d7a9a3eb4845c486fd
* camera: Let #connectLegacy calls through with unspecified HAL versionIgor Murashkin2014-06-201-1/+8
| | | | | | | This enables the camera2 shim to open a camera1 device without turning the error codes into a RuntimeException. Change-Id: I08d9d1e30e72025c41bd54b702d7ae95b32257be
* cameraservice: Implement HAL1 and higher HAL API coexistenceZhijun He2014-06-191-23/+102
| | | | | | | 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
* Merge "camera: Add #getLegacyParameters, #supportsCameraApi to ICameraService"Igor Murashkin2014-06-171-23/+128
|\
| * camera: Add #getLegacyParameters, #supportsCameraApi to ICameraServiceIgor Murashkin2014-06-171-23/+128
| | | | | | | | Change-Id: Ic86c8df3d703e7cf89caa856387e2c0a1b977401
* | CameraService: Fix permissions check issuesEino-Ville Talvala2014-06-171-4/+5
|/ | | | | Bug: 15677063 Change-Id: I012c111fff90fefd9eb0fef7c9d6034f00c9c6df
* camera2: Add jpeg sizes to legacy mode static characteristics.Ruben Brunk2014-06-121-9/+20
| | | | | | | | Bug: 15116722 - Adds jpeg size mapping to available output formats. Change-Id: I73e46dd4309767ba41156d9ba03c4724bf234758
* camera2: Update CameraService for HAL1 shim.Ruben Brunk2014-05-211-71/+239
| | | | | | | | | | | | | | Updates the camera service to handle shim connections. Changes include: - Adds begin/end configure binder calls. - Adds cache for shim client static camera metadata. - Implements basic getCameraCharacteristic functionality for shim clients. Bug: 15116722 Bug: 15117269 Change-Id: I510c5888ca15f8e7d3b8ed1680ff1c7f8f514744
* Merge "camera3: Update CameraMetadata vendor tag handling."Ruben Brunk2014-05-051-1/+14
|\
| * camera3: Update CameraMetadata vendor tag handling.Ruben Brunk2014-05-021-1/+14
| | | | | | | | | | Bug: 12134423 Change-Id: I97dc955ee9dd78ace93a7946296d6d9b0e407d43
| * Revert "camera3: Update CameraMetadata vendor tag handling."Ruben Brunk2014-05-031-14/+1
| | | | | | | | | | | | This reverts commit 4764324d2704f1b08bb7407014bf203924ff2363. Change-Id: I86d7fcc11423502b73fab2a82af6aa89804f0b76
| * camera3: Update CameraMetadata vendor tag handling.Ruben Brunk2014-05-021-1/+14
| | | | | | | | | | Bug: 12134423 Change-Id: I1d1be6792b6a4c9f08e042a8b2c89146bde5665e
* | NULL check in ConnectProNatalie Silvanovich2014-05-051-0/+5
|/ | | | | | | Prevents service crash Bug: 13744720 Change-Id: I7a5cdba830b4f96660f890ede6b94c38fc3108dd
* CameraService: trigger appropriate callbacks for burst capture.Jianing Wei2014-04-101-3/+6
| | | | | | | | | | | | | | | | | | | | * Instead of tracking CameraMetadata only, now we track both CameraMetadata and CaptureResultExtras, which is not part of the HAL metadata. This will enable the correct callback of onCaptureStarted and onResultReceived given burst requests. * Get last frame number in reply when submitting requests, canceling requests, and flushing device. For repeating requests, this frame number is the last frame number of the previous request. For non-repeating requests, this frame number is the expected last frame number of the current request. The goal is provide frame number to Java side in order to trigger onCaptureSequenceCompleted correctly. * Fix notifyError so that onDeviceError can be called correctly. Bug: 10749500 Change-Id: I2f3dda6c530090055d4a2ff9f0f087bbbe8d9257
* Camera3: fix HAL3.x version check issueZhijun He2014-03-271-0/+8
| | | | | | Camera service should support HAL3.x instead of only HAL3.0. Bug: 13609405 Change-Id: If7e86f9abe019547fc0be2e11337551cd7c57870
* am a1aaaf86: am 4f53fe74: Merge "CameraService: deadlock fix"Eino-Ville Talvala2014-03-251-0/+1
|\ | | | | | | | | * commit 'a1aaaf86cd04eabaf961a30d7b0a9fa857089862': CameraService: deadlock fix
| * am 4f53fe74: Merge "CameraService: deadlock fix"Eino-Ville Talvala2014-03-251-0/+1
| |\ | | | | | | | | | | | | * commit '4f53fe74051026e6635ba5bdbed4f1898cb66028': CameraService: deadlock fix
| | * CameraService: deadlock fixKalle Lampila2014-03-251-0/+1
| | | | | | | | | | | | | | | | | | | | | Release lock before return from CameraService::dump() Change-Id: Ia20b0921fc675a284f3b7f8d26e0e3596b5a8774 Signed-off-by: Kalle Lampila <kallex.lampila@intel.com>
* | | am 5c679d41: resolved conflicts for merge of 3d7c5002 to ↵Colin Cross2014-03-241-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | klp-modular-dev-plus-aosp * commit '5c679d41714e42f153f6aeb492df54510a195bc1': libcameraservice: build 64-bit libcameraservice: fix 64-bit print format warnings
| * | resolved conflicts for merge of 3d7c5002 to klp-modular-dev-plus-aospColin Cross2014-03-211-1/+1
| |\ \ | | |/ | | | | | | Change-Id: Ia6d87d56174d1388c1148fb55b6e4bc57d8666db
| | * libcameraservice: fix 64-bit print format warningsColin Cross2014-03-211-1/+1
| | | | | | | | | | | | | | | | | | | | | Use PRId64 from inttypes.h to print nsecs_t (int64_t) Use %zu to print size_t Change-Id: I135620e0388db33587a8a7da393b48a45cb7275a
* | | am 557847ee: am a6ca0acf: am bd3e2e03: camera2: Fix segfault when using null ↵Igor Murashkin2014-03-181-0/+10
|\ \ \ | |/ / | | | | | | | | | | | | | | | availability listener * commit '557847ee511dd5e75d584ff04449322f0f098241': camera2: Fix segfault when using null availability listener
| * | am a6ca0acf: am bd3e2e03: camera2: Fix segfault when using null availability ↵Igor Murashkin2014-03-181-0/+10
| |\ \ | | |/ | |/| | | | | | | | | | | | | listener * commit 'a6ca0acf0d009acf45b05561273aaad44ab22533': camera2: Fix segfault when using null availability listener
| | * camera2: Fix segfault when using null availability listenerIgor Murashkin2014-03-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | ICameraService::addListener / removeListener will now return BAD_VALUE if a null listener is used. Bug: 12891434 Change-Id: I9764110094d8fd42e22fcc8df3ef0e73c1b070e7
* | | camera2: Don't log vendor tag errors when camera HAL too oldIgor Murashkin2014-03-171-1/+1
| | | | | | | | | | | | Change-Id: Iac3d23284230c95c85ee404abbf9b22df1ae721c
* | | camera3: Pass vendor tags through binder.Ruben Brunk2014-03-131-15/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 12134423 - Adds a class for parceling vendor tag definitions. - Passes vendor tag definitions to clients of the camera service. - Switches over to new vendor tag mechanism when reading from HAL. Change-Id: Icef3fe9e67160767bdb8244ac49c85b68b497123
* | | resolved conflicts for merge of 566be7c3 to masterNarayan Kamath2014-02-111-2/+2
|\ \ \ | |/ / | | | | | | Change-Id: I7b1cc71057b2bd4f771e7bcf508a8c3abd6017ce
| * | Make frameworks/av 64-bit compatibleKévin PETIT2014-02-111-2/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | Contains the necessary changes to make frameworks/av build and work on a 64-bit machine. Signed-off-by: Craig Barber <craig.barber@arm.com> Signed-off-by: Kévin PETIT <kevin.petit@arm.com> Signed-off-by: Ashok Bhat <ashok.bhat@arm.com> Signed-off-by: Marcus Oakland <marcus.oakland@arm.com> Change-Id: I725feaae50ed8eee25ca2c947cf15aee1f395c43
* | FINAL ATTEMPT: HTTP services are now provided from JAVA and made available ↵Andreas Huber2014-02-041-1/+2
|/ | | | | | to media code Change-Id: I9f74a86e70422187c9cf0ca1318a29019700192d
* camera: Collect stack traces when bad things happen, print with dumpsysIgor Murashkin2013-10-291-0/+5
| | | | | Bug: 11324229 Change-Id: Ic920e170a8f5a389fc139bbf5416c0e3186c7fb6