summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/CameraService.h
Commit message (Collapse)AuthorAgeFilesLines
* CameraService: trigger appropriate callbacks for burst capture.Jianing Wei2014-04-101-3/+8
| | | | | | | | | | | | | | | | | | | | * 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: Pass vendor tags through binder.Ruben Brunk2014-03-131-15/+18
| | | | | | | | | | 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
* Camera: Implement getCameraCharacteristicsZhijun He2013-09-251-0/+2
| | | | | | Bug: 10904541 Bug: 10360518 Change-Id: Ie9ca6b3b0b5f2fe529e6b0decc193096e770a017
* Camera1: Set preview to be asynchronous, and remove dead codeEino-Ville Talvala2013-08-211-2/+1
| | | | | | | | | | | | | - Use the controlledByApp flag to make sure application-bound preview buffer queue is asynchronous as before - Remove setPreviewDisplay in service, since it is no longer in the binder interface - Rename setPreviewTexture to setPreviewTarget, to make it clear it's the only game in town now. Rename only on the binder level and service for now. Bug: 10312644 Change-Id: Icd33a462022f9729a63dc65c69b755cb7969857e
* Refactor CameraService to handle errors properly.Ruben Brunk2013-08-161-8/+16
| | | | | | | | Bug: 10361136 -Connect calls now return status_t error flags. Change-Id: Idca453b111e5df31327f6c99ebe853bb2e332b95
* Camera: Rename new API to camera2, rearrange camera serviceEino-Ville Talvala2013-07-301-2/+2
| | | | | | | | | | | - Support API rename from photography to camera2 - Reorganize camera service files - API support files to api1/, api2/, api_pro/ - HAL device support files into device{1,2,3}/ - Common files into common/ - Camera service remains at top-level Change-Id: Ie474c12536f543832fba0a2dc936ac4fd39fe6a9
* Make android.hardware.photography.Camera work on HAL3+ devicesIgor Murashkin2013-06-201-1/+4
| | | | | Bug: 9213377 Change-Id: I5b2eeab28985f53dfcb7b8e3029930f5adcd74f5
* Initial implementation of android.hardware.photography.CameraDevice (service)Igor Murashkin2013-06-201-7/+25
| | | | | | | | | | | * Verified preview streaming requests * Other things *should* work but unverified / unimplemented in client side Missing: * CameraService needs to return static camera info metadata Bug: 9213377 Change-Id: I71568560fcf18d0e2b408ed1c4d0066647314868
* am a790258a: am a5751c3a: Merge "Camera: Hotplug - conditionally transition ↵Igor Murashkin2013-05-081-5/+3
|\ | | | | | | | | | | | | to PRESENT when clients disconnect" into jb-mr2-dev * commit 'a790258aa5061a18ef455061de914c025fa86ded': Camera: Hotplug - conditionally transition to PRESENT when clients disconnect
| * Camera: Hotplug - conditionally transition to PRESENT when clients disconnectIgor Murashkin2013-05-021-5/+3
| | | | | | | | | | | | | | | | | | Fixes an issue where a client could unconditionally transition to PRESENT after a client disconnects, even though the underlying HAL status was actually NOT_PRESENT or ENUMERATING. Bug: 8780114 Change-Id: I68adb5fc819eec3b046ddcb2507b84bedc999a0f
* | Camera: Add preview callback surface supportEino-Ville Talvala2013-04-171-0/+2
|/ | | | | | | | - Add call to set a preview callback surface - Implement support for HAL2/3 devices - Still need HAL1 implementation Change-Id: I0dc0bd72e43d871aa487858d1665c1efca633ffe
* Camera: Add hotplug support (for fixed # of cameras)Igor Murashkin2013-03-261-2/+12
| | | | | | | * Minor: also change addListener to fire the current status upon subscription * Minor: STATUS_AVAILABLE is now an alias for STATUS_PRESENT and deprecated Change-Id: I254608a7332095e3ef201ffea64cff156cfc1b3e
* Camera: Make ProCamera connect take the same paths as Camera connectIgor Murashkin2013-03-111-19/+26
| | | | | | | | * ProCamera uses the app ops manager * Refactored connect calls to be as common as possible * Removed some useless not implemented function calls in ProClient Change-Id: I5dab30d20f0c202a494a07b2cfe4c1fa04a2a076
* CameraService: Refactor Camera2Client to share a base with ProCameraClientIgor Murashkin2013-03-111-5/+9
| | | | Change-Id: I249e2a0fc47ae84f29c9d9c4a223fba13da3ee66
* Camera: Drop ProCamera connections when a Camera connection happensIgor Murashkin2013-02-281-1/+29
| | | | | | | * Also adds an ICameraServiceListener with available/not available statuses Bug: 8291653 Change-Id: I24680f1a2dc109510caf451cf7c7bd180b670d84
* camera_client: refactor Camera/ProCamera commonalities into BasicCameraIgor Murashkin2013-02-261-1/+6
| | | | Change-Id: Ie10a4094522d49683657665fe94ab0b7ccd280e9
* CameraService and Stagefright: Support AppOpsEino-Ville Talvala2013-02-251-7/+50
| | | | | | | | | | | | | Camera: - Signal to AppOpsService when camera usage starts and stops - Listen to permissions revocations and act on them - Currently just kill camera connection when permissions lost Stagefright: - Pass on client name, UID to camera as needed Bug: 8181262 Change-Id: I9e33c9d05e9daa77dbb2d795045d08eb887ec8f0
* Camera: Add ProCamera private binder interface for an API2-light functionalityIgor Murashkin2013-02-221-24/+123
| | | | Change-Id: I2af7a807c99df75ea659e6e6acc9c4fca6a56274
* Rename ISurfaceTexture and SurfaceTextureAndy McFadden2012-12-181-1/+1
| | | | | | | | | | The C++ class names don't match what the classes do, so rename ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to GLConsumer. Bug 7736700 Change-Id: I64520a55f8c09fe6215382ea361c539a9940cba5
* Camera2: Don't promote weak IBinder ptrs to strong onesIgor Murashkin2012-10-051-2/+2
| | | | | | | | | The Binder driver does not support promoting weak pointers into strong pointers. Occassionally the system would lock up when trying to do this (when closing the camera app). Bug: 7289040 Change-Id: I8bc0b5c48616bf0b7f4eed1878ad4994ee635871
* Camera2: Handle client processes dying by closing camera resourcesIgor Murashkin2012-10-031-2/+13
| | | | | | | | | CameraService now subscribes to binder death notifications for each client, and disconnects the client if the death happened without cleanly shutting down the client first. Bug: 7258314 Change-Id: I7803836b589fd8f0dfe00f6c28a707b82012e751
* Camera service: Initialization for camera2 clients and devicesEino-Ville Talvala2012-05-291-0/+2
| | | | | | | | | | | - Refactor initialization code to hide device type from CameraService - Add metadata queue class to Camera2Device - Initialization of Camera2Device, Camera2Client - Conversion from HAL2 device static metadata to camera API parameters. Bug: 6243944 Change-Id: I524145b45438e906d8493dae202704ce8f090aeb
* Camera service: Add skeleton support for camera2 devices.Eino-Ville Talvala2012-05-171-1/+0
| | | | | | | | | | | | - Add Camera2Client, which maps the current android.hardware.Camera API to the new camera2 semantics - Add Camera2Device, a C++ wrapper for the HAL camera 2 device No functionality besides create/destroy; all client methods return error or null. Bug: 6243944 Change-Id: I6bd5136fa1efd8279b8cd2d9847d9b0bb2862294
* Break out CameraClient from CameraService.Eino-Ville Talvala2012-05-161-134/+60
| | | | | | | | | | | | | | To allow for different low-level implementations of the current camera API, the Client class inside CameraService has to be inheritable. This change breaks it up into the common section accessed by the camera service, and the full implementation for camera device HAL version 1. The full implementation is moved out to CameraClient.h/.cpp. There are no functionality changes, just code reorganization. Bug: 6243944 Change-Id: I8a79b31a3ae3617198dc6bb5576a9f2e2d9c95de
* Remove new camera connect API.Wu-cheng Li2012-04-191-13/+2
| | | | | | | | Applications are not resumed under the lock screen now. This API is not needed anymore. bug:5584464 Change-Id: I115daf6b647348617ec0fc05b626878c945b9b29
* Fix deadlock in camera destruction after client app's crashKeun young Park2012-03-281-3/+13
| | | | | | | | | | | | | | | | | | | | | | | * why deadlock happened: when an app (CTS camera test) crashes while using camera, its binder is closed and reference counter is decreased. If camera is inside callback, sp<Client> inside callback will hold the Client instance, and Client instance is destroyed when the callback ends as sp<Client> to hold it no longer exists. The destructor of Client instance tries to clean up camera H/W which tries to stop threads created by camera HAL including the thread context where the callback is running. This causes deadlock where the callback thread itself is waiting for itself to terminate. Note that the deadlock will not happen if camera callback is not active. In that case, closing of binder will force the destruction of Client instance, and the destruction happens in binder thread. * Fix: Forces Client descruction in binder thread - remove sp<Client> from callbacks to prevent destruction in callback context - add client lock to allow callback to use raw pointer safely. This prevents the destructor from deleting the instance while callback is using it. - add status change inside destructor with client lock to safely destroy Client Bug: 6214383 Change-Id: Ic6d6396d4d95ce9e72a16ec2480ae65c100fe806
* Add a new camera open API that allows taking the ownership.Wu-cheng Li2012-03-151-2/+13
| | | | | | | | | | | | | | 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
* Switch camera sounds to always use the system enforced audio stream.Eino-Ville Talvala2012-01-061-1/+0
| | | | | | | | | | Instead of picking between the music stream and the enforced audio stream, change the camera service to always play sounds through enforced system stream. Also update the currently-hidden CameraSound API to match. Bug: 5778365 Change-Id: I3cc64b1d1ff567dbac8020a665d5b19846197ff3
* Fix 5468644: Use the proper audio stream type to play sound.Chih-Chung Chang2011-10-171-0/+3
| | | | Change-Id: I80dd37da277b1810959a2dbdd852078b26f70cf5
* Pass camera frame metadata from camera service to Java.Wu-cheng Li2011-08-021-3/+7
| | | | | bug:4460717 Change-Id: I2fae6e1dfca6b8f3a5ee5716fc7817f5417bf657
* Add frame metadata parameter to camera data_callback.Wu-cheng Li2011-07-291-1/+2
| | | | | bug:4460717 Change-Id: Ib47d7d7df20af8155a719f3dabefe030893bfebc
* CameraService: (dis)connect from preview windowsJamie Gennis2011-07-141-0/+4
| | | | | | | This change makes CameraService connect and disconnect from preview windows (Surfaces and SurfaceTextures) that get set. Change-Id: I726971688367d5ce0d9aa90c44168037bce33deb
* frameworks/base: switch CameraService to a HAL moduleIliyan Malchev2011-05-031-2/+5
| | | | | | | | | | | | | | | This patch changes CameraService to load a camera HAL module, instead of linking directly against a library that implements the CameraHardwareInterface class. CameraHardwareInterface no longer defines the API to the camera HAL. Instead, this is now in HAL header hardware/camera.h. We keep CamerHardwareInterface as a class local to CameraService, which wraps around the new HAL calls. In the future, we may remove this class entirely and have CameraService call the HAL methods directly. Change-Id: I5c61ac40078fc0b50bbac5881a556fe6c8837641 Signed-off-by: Iliyan Malchev <malchev@google.com>
* remove more unused references to ISurfaceMathias Agopian2011-04-051-6/+0
| | | | Change-Id: I2201f1ca2bb8f203a081d94a0134f798778dfbef
* frameworks/base: some camera-interface cleanupIliyan Malchev2011-03-281-3/+1
| | | | | | | | | Methods getNumberOfVideoBuffers() and getVideoBuffer() as well as struct image_rect_struct are no longer used (instead, the necessary information is passed through ANativeWindow.) Change-Id: If4b11446fc9ccbde1f6b45bc70c0d0b8e54376eb Signed-off-by: Iliyan Malchev <malchev@google.com>
* Application-managed callback buffer support for raw imageJames Dong2011-02-221-1/+1
| | | | | | bug - 3292153 Change-Id: I9789f7c5cde3a3889d7375e881181e9152d95fc2
* Add camera service support for SurfaceTexture.Jamie Gennis2011-01-061-1/+3
| | | | | | | This change enables the use of a SurfaceTexture in place of a Surface as the destination of camera preview frames. Change-Id: Ic70d404c8fe261e9d5da6f1de93d6babb5b191cb
* remove support for PUSH_BUFFER surfaces and overlaysMathias Agopian2010-12-081-7/+0
| | | | | | | the same functionality is now supported through the h/w composer HAL, and YUV support in the GPU. Change-Id: I8146605449954b8e8fd7f78810b7d873c2d8f5bf
* Mirror the camera preview if the camera is front-facing.Wu-cheng Li2010-10-251-1/+3
| | | | | bug:3095272 Change-Id: Ib1c1d1edc06a33e9d4d2dcb42bc1dd2c25b1310c
* Camera framework change required for 0-memcpy recordingJames Dong2010-10-191-0/+3
| | | | | | bug - 3042125 Change-Id: I46eb7a10b5394086b353fd73e4503beceeed76f1
* Fix camera display orientation.Wu-cheng Li2010-10-121-0/+2
| | | | | bug:3036262 Change-Id: I6fc3dc381fcfaceba09fd5bd14afb85045b3d676
* resolved conflicts for merge of 191a25e1 to masterWu-cheng Li2010-09-271-1/+3
|\ | | | | | | Change-Id: I6f4940e337a992bf84e50bc1d22432593937499c
| * The old overlay should be destroyed if orientation changes.Wu-cheng Li2010-09-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously the orientation was wrong after suspend and resume. When the camera app is resumed behide the lock screen, it orinteation is portrait. When users slide to unlock the screen, surfaceChanged is called and the orientation is landscape. The camera app stops the preview, sets the display orientation, and starts the preview. Overlay should be destroyed if the orientation has changed. bug:3031640 Change-Id: I38b527f9ea78c91b538463292152c023383b4695
* | Adding enable/disable option for sendCommand()Nipun Kwatra2010-09-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | - Added enum CAMERA_CMD_ENABLE_SHUTTER_SOUND which corresponds to command type for enabling/disabling shutter sound. - The implementation checks if it is legal to disable shutter sound. If it is, then any process can disable the sound. If not, then only the mediaserver process is allowed to do this. Currently time lapse capture needs this functionality to disable shutter sound when still mode is used to capture time lapse video. Change-Id: Id147a3bcc6a345c2c6a6d52bf98fd8292386bb19
* | Change the framework to use the new camera preview path.Jamie Gennis2010-08-231-1/+8
|/ | | | | | | | | | | | This change makes the camera HAL interface take an ANativeWindow interface from which all the camera preview buffers will be allocated. The framework code running in application processes now passes a Surface object rather than an ISurface to the camera server via Binder when setting the preview surface. The camera server then forwards that Surface object (which implements the ANativeWindow interface) to the camera HAL, which uses it to communicate with SurfaceFlinger to allocate the camera preview buffers. Change-Id: Ie438f721559cd7de5e4f848a26d96360dda07b5f
* Handle the camera open failure better.Wu-cheng Li2010-08-191-0/+1
| | | | | | Check if camera hardware is NULL to avoid mediaserver crash. Change-Id: Ibde0251f30bdb6b36a5d5380222d7be25ec9449c
* resolved conflicts for merge of 27eecb70 to gingerbreadJean-Baptiste Queru2010-07-301-1/+0
| | | | Change-Id: If064f2f4950fc1a4ff38e6927fe2120af76b26f1
* added BinderService<> template to help creating native binder servicesMathias Agopian2010-07-141-2/+7
| | | | Change-Id: Id980899d2647b56479f8a27c89eaa949f9209dfe
* move native services under services/Mathias Agopian2010-07-141-0/+194
moved surfaceflinger, audioflinger, cameraservice all native services should now reside in this location. Change-Id: Iee42b83dd2a94c3bf5107ab0895fe2dfcd5337a8