summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/api1
Commit message (Collapse)AuthorAgeFilesLines
* C++11 compatibility.Dan Albert2014-11-201-2/+4
| | | | | | | | | | | | | | * Fix string literal concatenation to not be interpreted as UD literals. * Add constexpr compatibility for non-integral static members. * Use __typeof__ instead of typeof (should become decltype once this actually becomes C++11). * Add an appropriate cast for atomic_uintptr_t, since moving to C++11 means moving from <stdatomic.h> to <atomic>, which has better typechecking (hooray for not macros!). Bug: 18466763 Change-Id: I9561dcb2526578687819ff85421ba80d8e1a9694
* Update calls to IInterface::asBinder()Marco Nelissen2014-11-172-5/+5
| | | | | | | | | | | 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-072-2/+4
| | | | | Bug: 18207548 Change-Id: I9879c9b4c0282a6b96b77398f62beedc47f7f0a0
* Camera2Client: avoid two consecutive sets of configure_streams callsZhijun He2014-10-141-0/+4
| | | | | | | | | | | | When mediaRecorder starts without an active preview stream, Camera2Client starts preview then immediately start recording, which could cause the second configure_streams to call into HAL before any preview request is sent. This could cause HAL to run into bad state. This change work around this issue by making sure the first preview request is submitted to the HAL before start recording. Bug: 17915062 Change-Id: I94ae64ee76487603695a469240da601ddcb29a66
* CameraService: API1: Reallocate JPEG ashmem heap if size changesEino-Ville Talvala2014-09-291-1/+14
| | | | | Bug: 17682603 Change-Id: I7cba3365d00c33cf4267b1b59a94bd7d0bba08df
* Camera2Client: Revert HALv2 device behavior back to MR2Eino-Ville Talvala2014-09-282-47/+69
| | | | | | | | | | | | | | - Do not idle device before video snapshot stream configuration, to avoid deadlock during waiting. - Do not tear down ZSL stream - Don't refresh ZSL stream after deletion was requested. The v2 HAL implementations really don't like the ZSL stream being touched ever. Bug: 17634430 Bug: 17628507 Change-Id: I36b44a395e697be9802c4bd917a82b77c8d04be2
* CameraService: API1: Fix flash modeEino-Ville Talvala2014-09-271-1/+1
| | | | | | | | Sometimes it's useful to ensure variables are initialized in all code paths. Bug: 17680416 Change-Id: I9bed8a3bcb94417384bf0551fe1c0eee6cc49577
* Camera1 shim: If there's no flash, the keys need to be null.Eino-Ville Talvala2014-09-251-10/+13
| | | | | | | | | | | | | | | | Previously, we set FLASH_MODE_OFF for FLASH_MODE when a flash unit isn't available. However, per the API documentation, the key has to be null instead. - Make sure that the flash mode and supported flash mode keys are null if there's no flash unit on start - Don't set flash mode in later setParameters calls if there is no flash unit - Map NULL value for flash mode key to FLASH_MODE_OFF for internal consistency. Bug: 17660716 Change-Id: I3033682f0b882b8c2004114e2afef31662caebda
* Camera2Client: log an error when autoFocus is called in wrong stateZhijun He2014-09-231-0/+2
| | | | | Bug: 17555612 Change-Id: Ife33da712fbc8dc44d81e1e869fc75fb21026204
* API1: ZSL buffers should be skipped for manual AF modeZhijun He2014-09-191-0/+5
| | | | | | | | | ZSL counts on good auto focus (CAF). It is really tricky to enable ZSL for manual focus mode. as it is bascically a locked focus mode, you can not tell if the focus is good or not by reading the afstate. Bug: 17577928 Change-Id: I68ff7d143e7d56f942bb00a8da6a9faea57b52a0
* Camera2: handle one more videosnapshot failureYin-Chia Yeh2014-09-151-13/+7
| | | | | | | | Handle one more corner case. Also remove redundant re-try path. Bug: 17484683 Change-Id: I0b3e1223f4f28022e7ec6abe028ca3c2623829de
* Merge "Camera1: Validate scene mode override AF mode" into lmp-devEino-Ville Talvala2014-09-141-0/+14
|\
| * Camera1: Validate scene mode override AF modeEino-Ville Talvala2014-09-131-0/+14
| | | | | | | | | | | | | | | | | | Don't allow uncalibrated cameras to list a fixed focus mode for variable-focus cameras, since uncalibrated cameras cannot do INFINITY focus. Bug: 17492043 Change-Id: I5835efd6f21be0ebb74a9b7ea3ef5b2e7cf63e7a
* | Camera3: Update ZSL post-processing tagsZhijun He2014-09-142-0/+50
| | | | | | | | | | | | | | | | | | Update ZSL processing tags according the still capture template Also cache the request template to avoid extra cost of querying into HAL every time. Bug: 17463102 Change-Id: I2eeffefb0a4131c99a85dd3e4484cc6f0f025efa
* | Merge "Camera: Allow larger preview resolutions in API1 for >= HALv2 ↵Eino-Ville Talvala2014-09-132-4/+29
|\ \ | |/ | | | | devices" into lmp-dev
| * Camera: Allow larger preview resolutions in API1 for >= HALv2 devicesEino-Ville Talvala2014-09-132-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | Limit preview resolutions to a max of 1920x1920 instead of 1920x1080p, so that any aspect ratio with a 1920 as the larger dimension can be used. Also improve the initial preview/video size selection logic, to ensure that the selected size is both a valid preview and video size, and not too large. Bug: 17458832 Change-Id: Iea006fadb5fbf0f03d23c3c5babb5b3611469688
* | Merge "Camera2: fix 4K recording" into lmp-devZhijun He2014-09-134-18/+111
|\ \
| * | Camera2: fix 4K recordingYin-Chia Yeh2014-09-134-18/+111
| |/ | | | | | | | | Bug: 17484683 Change-Id: I09bb12698057555329286c777102b9b310452fb3
* | Merge "camera: add latest parameters to dumpsys for api1 cameras" into lmp-devIgor Murashkin2014-09-122-0/+14
|\ \ | |/ |/|
| * camera: add latest parameters to dumpsys for api1 camerasIgor Murashkin2014-09-112-0/+14
| | | | | | | | | | Bug: 17290106 Change-Id: I08ac1659d0367613c37669d5bf6e6bf7b2b63bc2
* | Merge "Camera2: improve ZSL candidate selection logic" into lmp-devYin-Chia Yeh2014-09-123-2/+38
|\ \
| * | Camera2: improve ZSL candidate selection logicYin-Chia Yeh2014-09-113-2/+38
| |/ | | | | | | | | | | | | | | | | 1. Clear ZSL queue when focus mode is changed and autoFocus is cancelled. 2. Do not check focus state is focus mode is fixed. Bug: 17185356 Change-Id: I2cb10fb457b080f0db950c894e56995f638e147b
* | Merge "camera2: skip capture result after clearZslQueue" into lmp-devYin-Chia Yeh2014-09-122-2/+6
|\ \ | |/ |/|
| * camera2: skip capture result after clearZslQueueYin-Chia Yeh2014-09-112-2/+6
| | | | | | | | | | | | | | | | After ZSL queue is cleared, don't add capture result to ZSL queue if its corresponding buffer has been cleared. Bug: 17185356 Change-Id: Iddac39ab09b2560e2ce9390895927217c1736d5a
* | Merge "camera2: Fix video snapshot for HAL 2.* devices." into lmp-devRuben Brunk2014-09-105-2/+52
|\ \ | |/ |/|
| * camera2: Fix video snapshot for HAL 2.* devices.Ruben Brunk2014-09-095-2/+52
| | | | | | | | | | | | | | | | | | | | | | Bug: 15408128 - Lazily destroy ZSL stream when ZslProcessor is updated, or when the camera client is disconnected, allowing HAL 2.* devices that rely on the ZSL stream to capture video snapshots to function correctly. Change-Id: Ia5cf14c62acda4d9c640440dc5b8e0796dc0b3fa
* | Merge "Camera2: reconfigure video snapshot size if needed" into lmp-devYin-Chia Yeh2014-09-083-2/+84
|\ \
| * | Camera2: reconfigure video snapshot size if neededYin-Chia Yeh2014-09-083-2/+84
| | | | | | | | | | | | | | | | | | | | | | | | When recording fails to start due to stream configuration failed, try configure stream again by setting jpeg stream to video size. Bug: 16162133 Change-Id: Ib20271e787ae07719ce419f0b15c7f86434f7ebb
* | | Merge "Camera API1: fix AE state check in precapture state" into lmp-devZhijun He2014-09-051-5/+12
|\ \ \ | |_|/ |/| |
| * | Camera API1: fix AE state check in precapture stateZhijun He2014-09-031-5/+12
| |/ | | | | | | | | | | | | It is legal to transit to CONVERGED or FLASH_REQUIRED after a AE precapture trigger. Bug: 17365185 Change-Id: Id041eff5eac564c32d09b547a0139d24807336f4
* | Merge "camera1: Ensure MemoryHeap buffers are mmapped before copying." into ↵Ruben Brunk2014-09-021-1/+14
|\ \ | |/ |/| | | lmp-dev
| * camera1: Ensure MemoryHeap buffers are mmapped before copying.Ruben Brunk2014-08-291-1/+14
| | | | | | | | | | Bug: 16986293 Change-Id: Icb68254d7ed1812fa9e60342749a2746d6fcfb17
* | Merge "cameraservice: decrease zsl metadata queue size by 1" into lmp-devYin-Chia Yeh2014-08-271-2/+6
|\ \
| * | cameraservice: decrease zsl metadata queue size by 1Yin-Chia Yeh2014-08-271-2/+6
| |/ | | | | | | | | | | | | | | | | | | | | Zsl buffer needs to be longer than metadata queue to ensure that oldest metadata can always find a match in buffer queue. Since we don't want to add memory overhead, decrease metadata queue size by one serves the same purpose. bug 17264283 Change-Id: Ic53441cc29c98e57d3345f5845d92839d0ce6faf
* | Camera API1: Fix ZSLProcessor3 deadlockZhijun He2014-08-271-1/+3
|/ | | | | | | | | | | ZSLProcessor3 shouldn't acquire mInputMutex in onBufferReleased call for output buffers, because the caller (Camera3Stream::returnBuffer) holds the camera3 stream lock already. This could cause deadlock for ZSL reprocess request as it holds the ZSLProcessor3 input lock and try to acquire camera3 stream lock to submit the request. Bug: 17299038 Change-Id: I6a7bf8ebd7c2064852358c655f3a3e9a67769213
* Merge "camera: zsl: remove AF check if no focser presents" into lmp-devYin-Chia Yeh2014-08-212-15/+26
|\
| * camera: zsl: remove AF check if no focser presentsYin-Chia Yeh2014-08-212-15/+26
| | | | | | | | | | | | | | | | | | If there is no focuser, don't check AF state while picking ZSL candidate frames. bug 17164077 Change-Id: Ib56e260249dcfb1b3bafea22abeb3abeae4e2c1a
* | camera: Allow shutter sounds to be disabled from camera2 apiIgor Murashkin2014-08-194-4/+26
|/ | | | | | | | | | | 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
* Merge "cameraservice: update supportedFocusModes for api1" into lmp-devYin-Chia Yeh2014-08-191-2/+11
|\
| * cameraservice: update supportedFocusModes for api1Yin-Chia Yeh2014-08-141-2/+11
| | | | | | | | | | | | | | | | Do not list infinity focus mode if the focuser is not calibrated. bug 13933979 Change-Id: I677ed22305703ac09eeaf986f5bc2a680cececd8
* | camera: Fix setParameters for Preview FPS single/range valuesIgor Murashkin2014-08-182-44/+121
|/ | | | | | | | | | | | | As a workaround, duplicate CameraParameters into CameraParameters2 to prevent ABI break for some camera HALs that directly link into CameraParameters. CameraParameters2 implements the real fixes needed in the framework, while CameraParameters is left in to satisfy older camera HALs. Bug: 12609188 Bug: 16654949 Change-Id: I82ea6f5de2183dd046d4bf5683600c97f37ab4da
* Merge "Camera API1: Ignore the video size change during recording" into lmp-devZhijun He2014-08-121-14/+19
|\
| * Camera API1: Ignore the video size change during recordingZhijun He2014-08-111-14/+19
| | | | | | | | | | | | | | Ignore the video size parameter change when recording is active. Bug: 16524513 Change-Id: I55b7c961c06199764486f48bc2187838c2279606
* | Merge "camera: Allow Camera#getParameters to be called by mediaserver ↵Igor Murashkin2014-08-112-2/+4
|\ \ | | | | | | | | | anytime" into lmp-dev
| * | camera: Allow Camera#getParameters to be called by mediaserver anytimeIgor Murashkin2014-08-072-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a crash if the camera was locked by the media recorder and another process tried to get the legacy parameters (for the camera characteristics). Bug: 16695955 Change-Id: I945a16a686a6987150c8754b5296353e76e5afa0
* | | Camera2/3: Cleanup the jpeg buffer size calcaulation logicZhijun He2014-08-114-15/+10
| |/ |/| | | | | | | | | | | | | | | - Only one place calculating the jpeg size-the device layer, Camera2Device and Camera3Device. - Remove size argument for CameraDeviceBase and cleanup related code. Bug: 14327010 Change-Id: I45d2ab4859ee0cc9273e579254f0569108c748f1
* | Camera: Need consider AF state for ZSL buffer selectionZhijun He2014-08-061-0/+16
|/ | | | | Bug: 16569983 Change-Id: I65e604e382ac0b98777155ad480ec3f6071e1a76
* cameraservice: disallow zsl/recording coexistentceYin-Chia Yeh2014-08-051-1/+33
| | | | | | | Make sure ZSL and recording stream does not exist at the same time. Change-Id: I19e28dedd9dd5cc5118449860b612a5c950fdaec
* Camera3: tear down Camera3 streams when they are deleted.Zhijun He2014-07-241-1/+0
| | | | | | | | | Also override the disconnectLocked method in Camera3ZslStream to make sure the Camera3ZslStream specific buffer queue is cleaned up properly. Also revert 0be123df1897fd3fe1b7ba30f24d8ae4c91b4dc7, as it was not the right fix. Change-Id: I89bdcb2e206379ae1f2602421e7fdbcde9a31399
* camera: clear ZSLQueue when switching modesRuchit Sharma2014-07-221-0/+1
| | | | | | | not clearing the queue here will eat up unnecessary memory every time we switch from video to still mode. Change-Id: I279ec709b485ca0dab672464e5b829be849bcaa5