• Home
  • History
  • Annotate
  • only in /frameworks/av/services/camera/libcameraservice/api1/
History log of /frameworks/av/services/camera/libcameraservice/api1/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2cec0dfa9f97b87733b8b250b49729fc6bb3a60a 20-Aug-2014 Ruchit Sharma <ruchits@nvidia.com> Camera2Client: flush requests in stopPreviewL

Requests queued in the pipeline have little meaning after the app
calls stopPreview(). Flushing will help improve the switch KPI.

bug 17340914

Change-Id: I899d69aa3b0fd41f028760290a81013297712fed
amera2Client.cpp
597ce69a77636eab073fc83ded01e8af51e887e2 05-Dec-2014 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Add support for SCENE_MODE_HDR for newer HALs" into lmp-mr1-dev
af2645a679a61c8e8199d43d29b8b5ead5723b25 05-Dec-2014 Eino-Ville Talvala <etalvala@google.com> Camera: Add support for SCENE_MODE_HDR for newer HALs

Bug: 18640480
Change-Id: I7b772d10b2bd136c78395fd2816114b27bb48d00
lient2/Parameters.cpp
9257000c453c1a6f6bf073ff0bf3ba7ef9baf183 04-Nov-2014 Ruchit Sharma <ruchits@nvidia.com> camera: fix logging in ZslProcessor to avoid spam

AF state mismatch while selecting ZSL candidate should not be treated
as a warning. This results into undesriable spam in the logs.

ALso, using ALOGVV is consistent with how AE state mismatch is handled
in ZslProcessor3.cpp

Bug: 18634318
Change-Id: Ia9d7f2bb98f784990b1a6f923983c35f622c3791
lient2/ZslProcessor3.cpp
03181012beab17e145ca8b9bedbcc08d117df1cb 19-Nov-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera2Client: remove recording stream if necessary" into lmp-mr1-dev
092d49c26d77fafad5170bf709c2a716ec335855 07-Nov-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2Client: remove recording stream if necessary

Bug: 17495165
Change-Id: I11b763fde8f9448f4bddec3fe6c81581e7699edb
amera2Client.cpp
lient2/Parameters.cpp
lient2/Parameters.h
5e15b80e801a0110bc1bad1190f02cb9c7d22e37 13-Nov-2014 Chien-Yu Chen <cychen@google.com> CameraService: normalize face rectangles properly

Use android.scaler.cropRegion reported in the capture result to
normalize face rectangles instead of using the one in current capture
request.

Bug: 11460393
Change-Id: Id21834bf6ae1f7cc106b4dffb98f9f249a75034b
lient2/FrameProcessor.cpp
lient2/Parameters.cpp
lient2/Parameters.h
1609e451cf6101efe6aeaaa2da61db2cb095c9e8 07-Nov-2014 Dan Stoza <stoza@google.com> Merge "Add a BufferItem parameter to onFrameAvailable" into lmp-mr1-dev
04f101c35eaa90b1f95939afac30674ec1611e6f 04-Nov-2014 Dan Stoza <stoza@google.com> Add a BufferItem parameter to onFrameAvailable

Passes the BufferItem for the queued buffer to the onFrameAvailable
callback so the consumer can track the BufferQueue's contents.

Bug: 18111837
Change-Id: If9d07229c9b586c668e5f99074e9b63b0468feb0
lient2/BurstCapture.cpp
lient2/BurstCapture.h
lient2/CallbackProcessor.cpp
lient2/CallbackProcessor.h
lient2/JpegProcessor.cpp
lient2/JpegProcessor.h
lient2/StreamingProcessor.cpp
lient2/StreamingProcessor.h
lient2/ZslProcessor.cpp
lient2/ZslProcessor.h
1bbc1c93b5db545e503dc27c262eef38685d0726 24-Oct-2014 Chien-Yu Chen <cychen@google.com> CameraService: API1: fix picture FOV

Fix the wrong assumption that active array size equals to pixel array
size.

bug 17918247

Change-Id: Ic308f281fb677332a74e95abb473c5b13063eeca
lient2/Parameters.cpp
661c21da5592ca48256747ec220efb2e599eeb72 22-Oct-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Disconnect: Release mutex while waiting for joins.

The threads shutting down may have callpaths that require taking the
binder interface mutex, so waiting to join them with that mutex held
can lead to deadlocks.

A specific instance is StreamingProcessor calling dataCallbackTimestamp,
which can immediately lead to a Camera2Client::releaseRecordingFrame call,
which requires the binder interface mutex. If this call happens right when
shutdown is occurring, and Camera2Client::disconnect is holding the mutex,
deadlock ensues.

Bug: 17997578
Change-Id: I71253cd5542b5920ad205976d315110ca0043d94
amera2Client.cpp
96ff5c48a81f3f45c384113480bf5e28620a72ae 14-Oct-2014 Zhijun He <zhijunhe@google.com> Camera2Client: avoid two consecutive sets of configure_streams calls

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
amera2Client.cpp
2d077d0acdbb26eeb1357489c999ec875f6ce297 29-Sep-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: API1: Reallocate JPEG ashmem heap if size changes

Bug: 17682603
Change-Id: I7cba3365d00c33cf4267b1b59a94bd7d0bba08df
lient2/JpegProcessor.cpp
dc2e6ddc933e40632e79a866d9ece870db1a975e 26-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Camera2Client: Revert HALv2 device behavior back to MR2

- 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
amera2Client.cpp
lient2/ZslProcessor.cpp
248f9ce1b6052889dd55e7701f908477d16d6ff4 27-Sep-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: API1: Fix flash mode

Sometimes it's useful to ensure variables are initialized in
all code paths.

Bug: 17680416
Change-Id: I9bed8a3bcb94417384bf0551fe1c0eee6cc49577
lient2/Parameters.cpp
b5bd1df2d6c78f8db5e7f6b416353ca8a93b7119 25-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Camera1 shim: If there's no flash, the keys need to be null.

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
lient2/Parameters.cpp
f79f8ca07f9130d67ba575748cf3481f32dcad9f 23-Sep-2014 Zhijun He <zhijunhe@google.com> Camera2Client: log an error when autoFocus is called in wrong state

Bug: 17555612
Change-Id: Ife33da712fbc8dc44d81e1e869fc75fb21026204
amera2Client.cpp
43e2418e30c360cdd43052fb3471433161cc161e 20-Sep-2014 Zhijun He <zhijunhe@google.com> API1: ZSL buffers should be skipped for manual AF mode

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
lient2/ZslProcessor3.cpp
d3c5b081863ad5930971d90aee2f3a61f8424d88 15-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2: handle one more videosnapshot failure

Handle one more corner case.
Also remove redundant re-try path.

Bug: 17484683
Change-Id: I0b3e1223f4f28022e7ec6abe028ca3c2623829de
amera2Client.cpp
83a23e1e1e45d9e2f5497e214796250f74aad1d4 15-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Merge "Camera1: Validate scene mode override AF mode" into lmp-dev
a1530f1b16f093a91edbbbaf7dac9f9809867817 14-Sep-2014 Zhijun He <zhijunhe@google.com> Camera3: Update ZSL post-processing tags

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
lient2/ZslProcessor3.cpp
lient2/ZslProcessor3.h
176e4c253a63d581af6b21f3182d71b3026ef516 13-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Camera1: Validate scene mode override AF mode

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
lient2/Parameters.cpp
f0b31e6333839972afb2e374f6d8824180d29fc2 13-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Allow larger preview resolutions in API1 for >= HALv2 devices" into lmp-dev
a4c95a6bc3b801bf41ca841440e9124f947e53fe 13-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Camera: Allow larger preview resolutions in API1 for >= HALv2 devices

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
lient2/Parameters.cpp
lient2/Parameters.h
0e40a83936d42a34788bbce1c113c404d727fe47 13-Sep-2014 Zhijun He <zhijunhe@google.com> Merge "Camera2: fix 4K recording" into lmp-dev
a53021f776d0c82271727e5817388936513feb92 12-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2: fix 4K recording

Bug: 17484683
Change-Id: I09bb12698057555329286c777102b9b310452fb3
amera2Client.cpp
amera2Client.h
lient2/StreamingProcessor.cpp
lient2/StreamingProcessor.h
e293c71cee0d00cda005baf5d0c2faa034812b7a 13-Sep-2014 Igor Murashkin <iam@google.com> Merge "camera: add latest parameters to dumpsys for api1 cameras" into lmp-dev
f2a74aad5efc01e5b9939c7cbbfde058ce64bfec 12-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera2: improve ZSL candidate selection logic" into lmp-dev
095da43dfe840f28d8c026710644a97d9b7805bf 12-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "camera2: skip capture result after clearZslQueue" into lmp-dev
6b7a2294b9e4da784cfe4b562ee1720ad606c852 09-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> camera2: skip capture result after clearZslQueue

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
lient2/ZslProcessor3.cpp
lient2/ZslProcessor3.h
fcf5fea2ac99e6359998078d09fd7e21269dca4a 11-Sep-2014 Igor Murashkin <iam@google.com> camera: add latest parameters to dumpsys for api1 cameras

Bug: 17290106
Change-Id: I08ac1659d0367613c37669d5bf6e6bf7b2b63bc2
ameraClient.cpp
ameraClient.h
dec84fb1c687509c3125acac76e0af80e4e0afbd 11-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2: improve ZSL candidate selection logic

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
amera2Client.cpp
lient2/ZslProcessor3.cpp
lient2/ZslProcessor3.h
4bcbb07be57947ea1421519094f73577b1e263e6 10-Sep-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Fix video snapshot for HAL 2.* devices." into lmp-dev
6551e1ede59f4a3043fb141159ca67bd2c85a911 10-Sep-2014 Ruben Brunk <rubenbrunk@google.com> camera2: Fix video snapshot for HAL 2.* devices.

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
amera2Client.cpp
lient2/ZslProcessor.cpp
lient2/ZslProcessor.h
lient2/ZslProcessorInterface.cpp
lient2/ZslProcessorInterface.h
6d61a4f8a2fd63a5b906572e586a3e1c6ebfa8af 08-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera2: reconfigure video snapshot size if needed" into lmp-dev
3ea3fcd0822b2f43d87f1d8f67d7bf145864b201 05-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2: reconfigure video snapshot size if needed

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
amera2Client.cpp
lient2/Parameters.cpp
lient2/Parameters.h
3c15d9b12394c62b58ab101c958e354f2c2bea19 05-Sep-2014 Zhijun He <zhijunhe@google.com> Merge "Camera API1: fix AE state check in precapture state" into lmp-dev
e8339fb87364469feb1f2cbda92889efecb79a7c 03-Sep-2014 Zhijun He <zhijunhe@google.com> Camera API1: fix AE state check in precapture state

It is legal to transit to CONVERGED or FLASH_REQUIRED after a AE precapture
trigger.

Bug: 17365185
Change-Id: Id041eff5eac564c32d09b547a0139d24807336f4
lient2/CaptureSequencer.cpp
b72726bad6c9253c26c82fea76bdf99e18b8ba6d 02-Sep-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera1: Ensure MemoryHeap buffers are mmapped before copying." into lmp-dev
65e01f763571b779fbc759e6f96d0a195b94c6da 30-Aug-2014 Ruben Brunk <rubenbrunk@google.com> camera1: Ensure MemoryHeap buffers are mmapped before copying.

Bug: 16986293
Change-Id: Icb68254d7ed1812fa9e60342749a2746d6fcfb17
ameraClient.cpp
01b9256a1358110ed718c1a83c2a1808d4afbb92 28-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "cameraservice: decrease zsl metadata queue size by 1" into lmp-dev
5487fd54f344c422be089217e62098545704bb03 28-Aug-2014 Zhijun He <zhijunhe@google.com> Camera API1: Fix ZSLProcessor3 deadlock

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
lient2/ZslProcessor3.cpp
690895cfe0f128ee3fc375a357ab99b0b98394b6 27-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> cameraservice: decrease zsl metadata queue size by 1

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
lient2/ZslProcessor3.cpp
0e522ed229053c7d0238425e407431fc08cd7c63 21-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "camera: zsl: remove AF check if no focser presents" into lmp-dev
754fb0225369123ef6e369fd91c48071dcf6057c 21-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> camera: zsl: remove AF check if no focser presents

If there is no focuser, don't check AF state while picking ZSL
candidate frames.

bug 17164077

Change-Id: Ib56e260249dcfb1b3bafea22abeb3abeae4e2c1a
lient2/ZslProcessor3.cpp
lient2/ZslProcessor3.h
97c7fa1b1596a062147f034a2b44781193c052cf 19-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "cameraservice: update supportedFocusModes for api1" into lmp-dev
0b88a62d4d5ac1e515721e587cdf9bcec191812b 19-Mar-2014 Igor Murashkin <iam@google.com> camera: Fix setParameters for Preview FPS single/range values

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
lient2/Parameters.cpp
lient2/Parameters.h
a858ea0495c887621a2fd9c0afc13780deccb597 19-Aug-2014 Igor Murashkin <iam@google.com> camera: Allow shutter sounds to be disabled from camera2 api

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
amera2Client.cpp
amera2Client.h
ameraClient.cpp
ameraClient.h
80ef94b5a7daa2d48ca72501e335a648dc67bc1d 14-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> cameraservice: update supportedFocusModes for api1

Do not list infinity focus mode if the focuser is not calibrated.

bug 13933979

Change-Id: I677ed22305703ac09eeaf986f5bc2a680cececd8
lient2/Parameters.cpp
ca05eb4b0194bb9b37a5261fa91f89add7a6df53 12-Aug-2014 Zhijun He <zhijunhe@google.com> Merge "Camera API1: Ignore the video size change during recording" into lmp-dev
c572362427cdfda53142ad0b44818c269c1d9db1 11-Aug-2014 Zhijun He <zhijunhe@google.com> Camera API1: Ignore the video size change during recording

Ignore the video size parameter change when recording is active.

Bug: 16524513
Change-Id: I55b7c961c06199764486f48bc2187838c2279606
lient2/Parameters.cpp
de975ca87c3dbdf9b7d92dae54b3446670b2a50e 11-Aug-2014 Igor Murashkin <iam@google.com> Merge "camera: Allow Camera#getParameters to be called by mediaserver anytime" into lmp-dev
28c9b6f298134624cb52b1af4ed8716dddb983d3 08-Aug-2014 Zhijun He <zhijunhe@google.com> Camera2/3: Cleanup the jpeg buffer size calcaulation logic

- 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
lient2/CallbackProcessor.cpp
lient2/JpegProcessor.cpp
lient2/StreamingProcessor.cpp
lient2/ZslProcessor.cpp
ebe865b175b3f1b2a9212cea7b008937c919d8f3 08-Aug-2014 Igor Murashkin <iam@google.com> camera: Allow Camera#getParameters to be called by mediaserver anytime

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
amera2Client.cpp
ameraClient.cpp
7e4c0033c5d2f9d5f53f520a9b0a2fcb8023c810 07-Aug-2014 Zhijun He <zhijunhe@google.com> Camera: Need consider AF state for ZSL buffer selection

Bug: 16569983
Change-Id: I65e604e382ac0b98777155ad480ec3f6071e1a76
lient2/ZslProcessor3.cpp
ca05ebd4c666322e754ac63236c8b329dbb53b00 05-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> cameraservice: disallow zsl/recording coexistentce

Make sure ZSL and recording stream does not exist at the same
time.

Change-Id: I19e28dedd9dd5cc5118449860b612a5c950fdaec
amera2Client.cpp
0a21051b91c2e07e49eb6fa568c505aee967ab9d 24-Jul-2014 Zhijun He <zhijunhe@google.com> Camera3: tear down Camera3 streams when they are deleted.

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
amera2Client.cpp
0be123df1897fd3fe1b7ba30f24d8ae4c91b4dc7 22-Jul-2014 Ruchit Sharma <ruchits@nvidia.com> camera: clear ZSLQueue when switching modes

not clearing the queue here will eat up unnecessary memory every time
we switch from video to still mode.

Change-Id: I279ec709b485ca0dab672464e5b829be849bcaa5
amera2Client.cpp
e80b229a80a992cb14647bcc7bfa8c926dc65fe6 22-Jul-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "cameraservice: remove record stream in stopPreview" into lmp-dev
28d0327bc80e1e424c3db34c62e8f73cd5ffab1e 18-Jul-2014 Yin-Chia Yeh <yinchiayeh@google.com> cameraservice: remove record stream in stopPreview

Remove recording stream every time stopPreview is called.

Change-Id: Iabb783a75418aa41ddc2693cfdfd5a2131109070
amera2Client.cpp
204e3295e2814052aef7e45ee9edd60128efbbd0 15-Jul-2014 Zhijun He <zhijunhe@google.com> Camera HAL3: migrate from partial quirks to partial result

- Enable the normal partial result path for HAL3.2, the quirk is only used
for the HAL version lower than HAL3.2. The partial quirks is no longer supported
for HAL3.2 or higher versions.
- Add CameraDeviceBase getDeviceVersion API.
- Fix some build warnings

Change-Id: I7a1b03d4d5fd5258d2addfba4368bee2ba691337
lient2/FrameProcessor.cpp
lient2/FrameProcessor.h
lient2/ZslProcessor3.cpp
0ea8fa4ccbf9b2b179370b983f3887d3daf2381f 08-Jul-2014 Zhijun He <zhijunhe@google.com> Camera3: Add capture intent for ZSL capture

Also fix the warning condition in input buffer return path.

Change-Id: I90e9edc1db9f1de87bc8936000b00c3306160c71
lient2/StreamingProcessor.cpp
lient2/ZslProcessor3.cpp
f0d962a6737eb8eec002d6804d9ffbe7bee672a0 30-Jun-2014 Zhijun He <zhijunhe@google.com> Camera3: fix ZSL processor3 issues

- Return input buffer in capture result. Per hal3.2 spec, we should return the
input buffer in process capture result rather than immediately after process
capture request.
- Make the depths of mZslQueue and mFrameList the same. It doesn't make sense
mFrameList depth is larger than mZslQueue depth.
- Set the depths of mZslQueue and mFrameList based on pipelineMaxDepth.
- Clear result queue while clearing zsl buffer queue.
- Hook up camera3 buffer listener with ZslProcessor3, make sure that adding the
same listener multiple times has no effect.
- Remove flush call in pushToReprocess, it is a guaranteed deadlock once
camera3 buffer listener is hooked up.

Change-Id: I285155ab4241e827145855d628f8e98b881c01d5
lient2/ZslProcessor3.cpp
lient2/ZslProcessor3.h
25a0aef19e170d2695f64b4c48296e7914155a88 25-Jun-2014 Zhijun He <zhijunhe@google.com> Camera1: Don't send partial results to ZSL clients

ZSL clients expect each received result as a complete result, and send back to
HAL as a reprocess capture request. CaptureSequencer client assumes results to
be non-partial too, it need look into some metadata that may not be present in
partial results.

Change-Id: Id716913fd6e1c914726abd6610fddf91141783c2
amera2Client.cpp
amera2Client.h
lient2/CaptureSequencer.cpp
lient2/ZslProcessor.cpp
lient2/ZslProcessor3.cpp
ff17990df24913df9267c9c8b938178716298114 25-Jun-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "cameraservice: Deprecate triggerId tags"
741ace8776f052245e33a47a0b99400f75996f45 23-Jun-2014 Yin-Chia Yeh <yinchiayeh@google.com> cameraservice: Deprecate triggerId tags

The following two tags are deprecated from HAL 3.2:
ANDROID_CONTROL_AF_TRIGGER_ID
ANDROID_CONTROL_AE_PRECAPTURE_ID

Trigger IDs are now internal to camera service.

Change-Id: Iaebd62ecb0905a811fa37fe7850e0221c38a0006
lient2/FrameProcessor.cpp
lient2/FrameProcessor.h
e2d83756cb088db15fda73616ca097b8d190e1a1 23-Jun-2014 Zhijun He <zhijunhe@google.com> Camera: Clear ZSL buffer queue when jpeg size is changed

Bug: 15284653
Change-Id: I4778e8443945d918801102ba600874568bde12dc
amera2Client.cpp
cd8fce8fbe0f515e53a0ea0f50b739cf42ee57a4 18-Jun-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2: get stream configs by device verison

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
amera2Client.cpp
amera2Client.h
lient2/Parameters.cpp
lient2/Parameters.h
fcd58351b6d7fcd62a0fe65b425723dd53d10e5e 20-Jun-2014 Zhijun He <zhijunhe@google.com> Merge "Camera2/3: Don't release recording buffer when stream is active"
b10cdadf0fb945e23ca77008d4af76584bd0e39a 17-Jun-2014 Zhijun He <zhijunhe@google.com> cameraservice: Implement HAL1 and higher HAL API coexistence

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
ameraClient.cpp
60800208d31bc5a0770c3acb4f7df53c6bb1ac39 18-Jun-2014 Zhijun He <zhijunhe@google.com> Camera2/3: Don't release recording buffer when stream is active

It is dangerous to release all recording buffers when recording stream is
actively sending buffer to encoder. This change only releases all buffers when
recording stream is idle and recording stream is about to start.

Bug: 15667833
Change-Id: Ia4a84cac84a2062c13333467c66698273ffb0e23
lient2/StreamingProcessor.cpp
0cbfbf3624c67cf40a18d5405a46d002aa12a048 28-May-2014 Zhijun He <zhijunhe@google.com> Camera3: Separate the video and preview size filtering

Supported video sizes were generated from supported preview sizes, which
effectively filtered out sizes larger than 1080p. This change filters the
supported video sizes based on the media profiles supported h.264 max video
frame width and height.

Bug: 15287656

Change-Id: Ifbd9d37fb775371e2a4ee5cf80abbf83a75ffd65
lient2/Parameters.cpp
lient2/Parameters.h
b2119af7f4ced0ecfefd4c7388f86b4e3a3ea7d8 10-May-2014 Ruben Brunk <rubenbrunk@google.com> camera2: Update CameraService for HAL1 shim.

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
lient2/Parameters.cpp
39c852640929d90ae5bcbf49842cbd64bffaa29e 12-May-2014 Eino-Ville Talvala <etalvala@google.com> am 7fd1af85: am c36fbcdf: am f02f06c4: Merge "camera: check Intent entry count before reading it"

* commit '7fd1af85f8fb40f7cb4fcdba98418aeea61fb4f0':
camera: check Intent entry count before reading it
c36fbcdf37ec02314e7b8134bb0de5f624fa70fd 12-May-2014 Eino-Ville Talvala <etalvala@google.com> am f02f06c4: Merge "camera: check Intent entry count before reading it"

* commit 'f02f06c422a58ddaca49d14f21a196eaa435d07b':
camera: check Intent entry count before reading it
c90f4c7c5838e4dee2f550c4d581e7205e666faa 15-Apr-2014 Yuvraj Pasi <ypasi@nvidia.com> camera: check Intent entry count before reading it

In case when find() returns empty entry, blindly
reading the entry will cause segfault

Change-Id: Ib5be7fd855c409ba3b45f0d43e15237367172817
lient2/Parameters.cpp
6056bdda5b17c62ba320c806489e4d1a3b7653c7 15-Apr-2014 Zhijun He <zhijunhe@google.com> Camera: don't dereference timestamp if it is missing

Bug: 14059542
Change-Id: I8b45a98ef4b296db314cab3819d11626ac7211be
lient2/CaptureSequencer.cpp
cb0652e5a850b2fcd919e977247e87239efaf70e 13-Mar-2014 Jianing Wei <jianingwei@google.com> CameraService: trigger appropriate callbacks for burst capture.

* 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
lient2/CaptureSequencer.cpp
lient2/CaptureSequencer.h
lient2/FrameProcessor.cpp
lient2/FrameProcessor.h
lient2/ZslProcessor.cpp
lient2/ZslProcessor.h
lient2/ZslProcessor3.cpp
lient2/ZslProcessor3.h
95dd5ba5bf83716f2eed5fe72366c4212464d710 27-Mar-2014 Zhijun He <zhijunhe@google.com> Camera3: fix HAL3.x version check issue

Camera service should support HAL3.x instead of only HAL3.0.

Bug: 13609405
Change-Id: If7e86f9abe019547fc0be2e11337551cd7c57870
amera2Client.cpp
1cebdb77323e4554a316b9c34bf36957b7dad5ae 26-Mar-2014 Eino-Ville Talvala <etalvala@google.com> Revert "camera: Fix setParameters for Preview FPS single/range values"

Causes a regression on some devices, so reverting until we're in a position to fix those devices.

This reverts commit 9078a1b3b9f9c0c48046ade0e8e18b0d79a659db.

Bug: 13563098
Change-Id: I7aedd01fde8b8fdee77e972ec395f0ecadbf8ccb
lient2/Parameters.cpp
91820d46b5f3065c2fded3cdf65d305715b33bb1 25-Mar-2014 Igor Murashkin <iam@google.com> am 0370be96: DO NOT MERGE: camera: Fix setParameters for Preview FPS single/range values

* commit '0370be96e33ea0c8fb4069e704deccce43b7403c':
DO NOT MERGE: camera: Fix setParameters for Preview FPS single/range values
0370be96e33ea0c8fb4069e704deccce43b7403c 19-Mar-2014 Igor Murashkin <iam@google.com> DO NOT MERGE: camera: Fix setParameters for Preview FPS single/range values

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
Change-Id: I82ea6f5de2183dd046d4bf5683600c97f37ab4da
lient2/Parameters.cpp
lient2/Parameters.h
32ce52b01dab863f2b4749e1c69f619cf820486f 24-Mar-2014 Colin Cross <ccross@android.com> am 5c679d41: resolved conflicts for merge of 3d7c5002 to klp-modular-dev-plus-aosp

* commit '5c679d41714e42f153f6aeb492df54510a195bc1':
libcameraservice: build 64-bit
libcameraservice: fix 64-bit print format warnings
5c679d41714e42f153f6aeb492df54510a195bc1 22-Mar-2014 Colin Cross <ccross@android.com> resolved conflicts for merge of 3d7c5002 to klp-modular-dev-plus-aosp

Change-Id: Ia6d87d56174d1388c1148fb55b6e4bc57d8666db
7b1524d4e866b53ab0d02a59cc6ccb133bd98f77 22-Mar-2014 Colin Cross <ccross@android.com> resolved conflicts for merge of 3d7c5002 to klp-dev-plus-aosp

Change-Id: I19e1a26bd0226119c4fe2920bf6a09aaeff315d9
e5729fac81c8a984e984fefc90afc64135817d4f 21-Mar-2014 Colin Cross <ccross@android.com> libcameraservice: fix 64-bit print format warnings

Use PRId64 from inttypes.h to print nsecs_t (int64_t)
Use %zu to print size_t

Change-Id: I135620e0388db33587a8a7da393b48a45cb7275a
lient2/CaptureSequencer.cpp
lient2/FrameProcessor.cpp
lient2/JpegCompressor.cpp
lient2/JpegProcessor.cpp
lient2/Parameters.cpp
lient2/StreamingProcessor.cpp
lient2/ZslProcessor.cpp
lient2/ZslProcessor3.cpp
9078a1b3b9f9c0c48046ade0e8e18b0d79a659db 19-Mar-2014 Igor Murashkin <iam@google.com> camera: Fix setParameters for Preview FPS single/range values

Bug: 12609188
Change-Id: I82ea6f5de2183dd046d4bf5683600c97f37ab4db
lient2/Parameters.cpp
8aa0f0619ea867e8fb240cf27913d4f8ae767385 12-Mar-2014 Dan Stoza <stoza@google.com> Remove deprecated BufferQueue constructor

Bug: 13415624
Change-Id: Ifc8f778b70102a38a9f7a086632e6884714e6b58
lient2/CallbackProcessor.cpp
lient2/JpegProcessor.cpp
lient2/StreamingProcessor.cpp
lient2/ZslProcessor.cpp
708601d042ae2a927da2181f33da47d9b01ad411 12-Mar-2014 Zhijun He <zhijunhe@google.com> am f0fb921c: am bc69c8ba: DO NOT MERGE: Camera: delete preview callback when preview size is changed

* commit 'f0fb921c0170fe3b8ebce8fbe3c133a99c6def9f':
DO NOT MERGE: Camera: delete preview callback when preview size is changed
b120f897ad41c0a386081f74f47fd560c6e86f34 11-Mar-2014 Zhijun He <zhijunhe@google.com> am bc69c8ba: DO NOT MERGE: Camera: delete preview callback when preview size is changed

* commit 'bc69c8ba9a8fc881603669205a56d0ca1b572a95':
DO NOT MERGE: Camera: delete preview callback when preview size is changed
bc69c8ba9a8fc881603669205a56d0ca1b572a95 21-Jan-2014 Zhijun He <zhijunhe@google.com> DO NOT MERGE: Camera: delete preview callback when preview size is changed

Preview callback stream is left configured even the preview size is changed.
This makes the callback stream unnecessarily configured even in recording mode,
which could cause distorted preview for some devices.

Bug: 12210027
Bug: 12591410
Change-Id: If50cddfe5562e91aec1feb1760eccb82ddb21730
amera2Client.cpp
6a7b53008ac0831431f42c620d2988c65b21d859 07-Mar-2014 Eino-Ville Talvala <etalvala@google.com> am a11111f9: Merge changes Id28b35fd,Ie4e64977,I2950f31e into klp-dev

* commit 'a11111f9135c98cf4247bbd1a61d7df3053e549e':
DO NOT MERGE: Camera: fix focusArea wrong indexing issue
DO NOT MERGE: camera2: Fix race with stream deletion during disconnect.
DO NOT MERGE: camera2/3: Add protection for still capture path
40659dea8eefaa9d7f5b742e3333d68b6f0dd89c 07-Mar-2014 Eino-Ville Talvala <etalvala@google.com> am 47ef192f: am a11111f9: Merge changes Id28b35fd,Ie4e64977,I2950f31e into klp-dev

* commit '47ef192f0296642b901e82d0c72c5a1a0d08f4df':
DO NOT MERGE: Camera: fix focusArea wrong indexing issue
DO NOT MERGE: camera2: Fix race with stream deletion during disconnect.
DO NOT MERGE: camera2/3: Add protection for still capture path
a413dd621966044753a8fa1f57c76d847b6f4bec 29-Jan-2014 Zhijun He <zhijunhe@google.com> DO NOT MERGE: Camera: fix focusArea wrong indexing issue

Bug: 12304559
Change-Id: Id28b35fdd9697c1ec3365f617996801965de8bd0
lient2/Parameters.cpp
6706009fa8294c8cdab1cdab4585f00d42df483e 05-Dec-2013 Ruben Brunk <rubenbrunk@google.com> DO NOT MERGE: camera2: Fix race with stream deletion during disconnect.

Bug: 11856804

- Shutdown order in Camera2Client allows a stream to be
deleted before the corresponding processing thread has
quit. This can result in updates being called on the
processor thread without a valid stream.

Change-Id: Ie4e649771f4321498659211f2a37ed89a6d956c4
amera2Client.cpp
81d754306ecd4a587459015da5168270c2a5c167 27-Nov-2013 Zhijun He <zhijunhe@google.com> DO NOT MERGE: camera2/3: Add protection for still capture path

Jpeg stream in JpegProcessor could be deleted while process new capture is
ongoing, which unsafe to access a dead consumer endpoint.
Bug: 9316454
Change-Id: I2950f31ea28d0ba01f08502e2e3ba452bf8bb818
lient2/JpegProcessor.cpp
3f73448090d99612c6d8f579e4164507d8848cc1 24-Feb-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Fix race with stream deletion during disconnect."
1d6fa7af1288b550faabe4ec2cf98684236723db 11-Feb-2014 Narayan Kamath <narayan@google.com> resolved conflicts for merge of 566be7c3 to master

Change-Id: I7b1cc71057b2bd4f771e7bcf508a8c3abd6017ce
377b2ec9a2885f9b6405b07ba900a9e3f4349c38 03-Feb-2014 Kévin PETIT <kevin.petit@arm.com> Make frameworks/av 64-bit compatible

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
amera2Client.cpp
ameraClient.cpp
lient2/ZslProcessor.cpp
lient2/ZslProcessor3.cpp
ce6249980434dd04e0eac397083d917cdc4452e9 24-Jan-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Update maxRegions tag.

Change-Id: I22501cbf7f941d9626b88182e2dda8a13a620d01
lient2/Parameters.cpp
lient2/Parameters.h
894fb7bc41dc8c3b8fb7d21ba24a5777c4347a5b 29-Jan-2014 Zhijun He <zhijunhe@google.com> Camera: fix focusArea wrong indexing issue

Bug: 12304559
Change-Id: Id28b35fdd9697c1ec3365f617996801965de8bd0
lient2/Parameters.cpp
4bbf8ea1f17e85123abd2b037d357e2a89664511 27-Jan-2014 Zhijun He <zhijunhe@google.com> Merge "Camera: delete preview callback when preview size is changed"
ad1763b4ae3c60eb11182d2fd4c5a79f15275a52 27-Jan-2014 Zhijun He <zhijunhe@google.com> Merge "Camera3: Flush device before ZSL reprocess"
1862a008db748fd55834345dffe298078455d5c3 24-Jan-2014 Zhijun He <zhijunhe@google.com> Merge "Camera: delete zsl stream for video mode"
c1b7cc4d3eeb55fd03ff77b099b827e7568480e4 21-Jan-2014 Zhijun He <zhijunhe@google.com> Camera: delete preview callback when preview size is changed

Preview callback stream is left configured even the preview size is changed.
This makes the callback stream unnecessarily configured even in recording mode,
which could cause distorted preview for some devices.

Bug: 12210027
Bug: 12591410
Change-Id: If50cddfe5562e91aec1feb1760eccb82ddb21730
amera2Client.cpp
491e341211b4772c75f719158f6b397e1c40497d 27-Dec-2013 Zhijun He <zhijunhe@google.com> Camera3: Flush device before ZSL reprocess

Call flush before sending ZSL reprocess request. This not only ensures no
in-flight requests pending in the HAL before ZSL reprocess request, but also
makes reprocess request to be processed by the HAL sooner.

Bug: 12230973
Change-Id: I4c9e5a0fb75ccdc1e8861262c08d599d04170b7f
lient2/ZslProcessor3.cpp
c69b91ceae6255e41c5413796fb0ed4f7af45b15 18-Jan-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Update sceneMode tag spec.

Change-Id: I495435397086a295280c556d94fe8efd442a12c3
amera2Client.cpp
lient2/Parameters.cpp
dfe715582943b3fc9bab91f88257a3bba6c6deef 05-Dec-2013 Ruben Brunk <rubenbrunk@google.com> camera2: Fix race with stream deletion during disconnect.

Bug: 11856804

- Shutdown order in Camera2Client allows a stream to be
deleted before the corresponding processing thread has
quit. This can result in updates being called on the
processor thread without a valid stream.
amera2Client.cpp
138851bd3cadfb60238f87567e24808925731837 27-Nov-2013 Zhijun He <zhijunhe@google.com> camera2/3: Add protection for still capture path

Jpeg stream in JpegProcessor could be deleted while process new capture is
ongoing, which unsafe to access a dead consumer endpoint.
Bug: 9316454
Change-Id: I2950f31ea28d0ba01f08502e2e3ba452bf8bb818
lient2/JpegProcessor.cpp
d8a62e25ba6520c2531c7a3d32cc8066e1dab776 14-Nov-2013 Eino-Ville Talvala <etalvala@google.com> Camera2: Rework the FPS range vs. FPS single setting detection

Give up on current approach of writing out consistent FPS values
into parameters that will be read back by the app.

- Preserve app's latest set parameters exactly, and compare against
them when detecting if a new FPS range or single FPS value has been
selected.

- Since get() returns exactly what was set(), it doesn't matter if the
app calls getParameters() before its next setParameters(), in terms
of retriggering FPS selection logic. Before, the behavior varied
depending on whether the app re-read the parameters.

- As before, if app changes both range and single FPS in a single set
call, the range set wins. Otherwise, the value that has changed more
recently is used.

Bug: 11570973
Change-Id: I72b5e60c3f60e88d55127dd1bda87e26eaf929c6
lient2/Parameters.cpp
lient2/Parameters.h
fd6ecdd39bd83ea020f78b425e96310380d66c35 11-Oct-2013 Eino-Ville Talvala <etalvala@google.com> Camera HAL3/API1: Add support for the partial result quirk.

- Camera2Client:
- Detect partial result quirk
- Camera3Device:
- Accumulate all partial results together
- Fire off 3A-only result once all 3A states are available
- FrameProcessorBase:
- Filter out partials, don't send to listeners
- FrameProcessor:
- Skip face detect on partials
- Make sure to only handle a 3A update for a given frame once
- Trigger AF notifications when AF mode or trigger changes, to
properly detect all AF transitions.

Bug: 11115603
Change-Id: Iea8aa73c568701562a46071f7ea100624251d10b
amera2Client.cpp
lient2/FrameProcessor.cpp
lient2/FrameProcessor.h
lient2/Parameters.cpp
lient2/Parameters.h
661076292093f82aec488baf8460cdf204a5efd2 01-Nov-2013 Zhijun He <zhijunhe@google.com> Camera: delete zsl stream for video mode

Change-Id: I9ebfe0cb7376092c6ecd71e5c1c5058947282a5f
amera2Client.cpp
afada1e56cf0f91be5e44678850fcead2a70cca2 17-Oct-2013 Zhijun He <zhijunhe@google.com> Camera: don't do hw support check for ZSL

Only use camera.disable_zsl_mode to control disable/enable ZSL.

Bug: 11258054
Change-Id: Ibf10b959d0913f7dedb59d89b571e9bf66fe978a
lient2/Parameters.cpp
d5ed2263a485d6e633fe08f033d04fad75daec6f 11-Oct-2013 Zhijun He <zhijunhe@google.com> Merge "Camera: Skip AE precapture when possible" into klp-dev
1dd08b30e2366cabc50d883885d6229dab8218f2 11-Oct-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2/3: Add more tracing for API1" into klp-dev
b790abf4d17f1c6865af7eb1595ec94dc0306447 11-Oct-2013 Zhijun He <zhijunhe@google.com> Camera: Skip AE precapture when possible

Skip AE precapture when AE is already converged for still capture use case. This
could save still capture latency 6-7 frame time for AE already converged case.

Bug: 10712902
Change-Id: Ie5512618b76e5d87c62c57c3d96d2004c604e29e
lient2/CaptureSequencer.cpp
2b07e0207da44d7b3cc63c369fd10c9f12a5e2cd 11-Oct-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Add more tracing for API1

- AF state
- Async autofocus completion
- Async takePicture completion
- Stages of takePicture

Bug: 10570497
Change-Id: Ida9fedd81aa4ee3ae3fb8dfada858a3bc3c213a3
amera2Client.cpp
amera2Client.h
lient2/CaptureSequencer.cpp
lient2/CaptureSequencer.h
lient2/Parameters.cpp
lient2/Parameters.h
cc27e117ed01c9a2b4def5a9c7a3103af83ee47e 04-Oct-2013 Zhijun He <zhijunhe@google.com> Camera: Save 1 frame time for takePicture call

Move the latest request signal call right before submitting request to HAL,
which avoids unnecessary 1 frame time wait.

Also fix request status constructor issue, and the log tag for Camera2Client.

Bug: 10570497
Change-Id: I0b1818658bee9983b117e49a5a00f1aab515c567
amera2Client.cpp
f1e98d857ec377f2c9b916073d40732e6ebb7ced 06-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Camera API 2, Device 2/3: Implement idle and shutter callbacks

- Update callback Binder interface
- Rename frameId to be requestId to be consistent and disambiguate
from frameNumber.
- Implement shutter callback from HAL2/3 notify()
- Add in-flight tracking to HAL2
- Add requestId to in-flight tracking
- Report requestId from shutter callback
- Implement idle callback from HAL3 process_capture_result
- Add new idle tracker thread
- Update all idle waiting to use the tracker
- Add reporting from request thread, all streams to tracker
- Remove existing idle waiting infrastructure

Bug: 10549462
Change-Id: I867bfc248e3848c50e71527e3561fe92dc037958
lient2/CaptureSequencer.cpp
lient2/CaptureSequencer.h
lient2/ZslProcessor.cpp
lient2/ZslProcessor.h
lient2/ZslProcessor3.cpp
lient2/ZslProcessor3.h
893068ad0ca0cce8428f5a358c86b81139399c07 01-Oct-2013 Zhijun He <zhijunhe@google.com> Camera: drop stale callback buffer

Sometimes, when preview size is changed and preview callback is enabled, stale
callback buffer from previous size could be delivered to callback processor
because stop preview doesn't guarantee consumer side buffers are properly
cleaned up. We need drop these buffers to avoid sending wrong data to app side.

Bug: 11009183
Change-Id: If9281e8c02481f883872ce58dfd8660a06d56a47
lient2/CallbackProcessor.cpp
9fc79c6fccc41255bb4f3538e2a21b01db8dc2dc 30-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: Set default thumbnail size with matched aspect ratio

Make default thumbnail size match the default still capture size aspect ratio.

Bug: 10885012
Change-Id: If46da9508d3b71992f0e14a35c600b7e8d347f4e
lient2/Parameters.cpp
lient2/Parameters.h
2b890936e978de0a8d4450ee1aaeda53d22b5f4e 25-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2/3: Support new PASSIVE_UNFOCUSED AF state" into klp-dev
4ad28ea0a76c7ecdfcc5b96af2b0afcb0c3e5120 21-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Support new PASSIVE_UNFOCUSED AF state

Bug: 10860639
Change-Id: I39be64abaf79b49b2d1f74e1c2ab2adf718ae701
amera2Client.cpp
70b054021a3a22622c2710267362c5e235ed73bd 21-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Properly disambiguate FPS range vs. single FPS setting

The camera1 API allows for either setPreviewFrameRate or
setPreviewFPSRange, so both values may or may not change in a single
setParameter call.

The disambiguation of which setting has been changed since the last
setParameter() call was not fully correct, so a sequence of changes
that only changed setPreviewFPSRange or didn't change either could be
interpreted as as a change to setPreviewFrameRate.

Bug: 10842868
Change-Id: I40baeced80a58f09f8a1742ece8dd5e141e9c1e3
lient2/Parameters.cpp
lient2/Parameters.h
0181fde7bd20238cb13ae2665f0e5bfe7c2d9ac8 20-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: For still captures, use widest FPS range available.

Instead of using the application-selected preview FPS range for still
captures, select the widest FPS range advertised by the device and use
it for still captures instead, to give the HAL the widest range of exposure
values to choose from possible.

Bug: 10842868
Change-Id: I0e24f5eb713a4f8df116cd5979a84390cc0974d7
amera2Client.cpp
lient2/Parameters.cpp
lient2/Parameters.h
527748abf04c0060894fd7aace54959a2c343435 16-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: setCallBackWindow only if callback surface is used

Calling setCallBackWindow without checking the previewCallbackSurface could make
the stream to be deleted during callback stream operation, which is bad because
the preview is still active and the delete fails.

Bug: 10730496
Change-Id: I8addac25e5aa7901bf200d730c749bee2c088090
amera2Client.cpp
3ef464e095da6c5d1acb5723dbc4b9f7cfd4ecf8 12-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: Limit supported preview sizes

The ANDROID_SCALER_AVAILABLE_PROCESSED_SIZES can provide sizes as large
as jpeg sizes, which could cause potential issues when trying to do
full size still capture and full size preview. This is not supported
by many devices due to hardware limitation. This change limits the
preview (as well video) size to no more than 1080p.

Bug: 10625115
Change-Id: I9467ab843553ec06e8249b4a17c0ecf4c6d6f04e
lient2/Parameters.cpp
lient2/Parameters.h
d1d6467d3bcbc1305eeba0176a2edf04925c368e 07-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: Correct stream id types

Bug: 10604704
Change-Id: I223ac5d200eb6439c08955fb7ad586592099fbae
amera2Client.cpp
lient2/CaptureSequencer.cpp
lient2/StreamingProcessor.cpp
lient2/StreamingProcessor.h
lient2/ZslProcessor.cpp
lient2/ZslProcessor3.cpp
84b7fb0c88ddd05ed7c148c82fe1691040a9404d 06-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: Send VIDEO_SNAPSHOT intent for video snapshot case

Bug: 9924539
Change-Id: Ief39eff79c31f2c2aa5df2fe1a0f04c4afc74690
lient2/CaptureSequencer.cpp
a27c4aa222c8dd1712617dad954c5f3aa68d5427 05-Sep-2013 Ruben Brunk <rubenbrunk@google.com> camera: Fix race condition between setParameters() and stopPreview().

Bug: 10414772
Change-Id: I928cb3935afb101da8a7931f88c27dccdb03b4a9
amera2Client.cpp
0a4df03542e7d7aab716a60e206dceaf5da178f3 03-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Increase precapture start timeout

Currently, we only wait 200 ms for the HAL to switch to the precapture
state. This is insufficient at low preview frame rates (dark
conditions, ~10 fps), where a 3-request-deep HAL pipeline will take
300 ms to produce a precapture trigger output. In those cases, we
would prematurely skip the precapture sequence, causing bad quality
pictures.

Since this is a fallback timeout to prevent deadlock in case of a bad
HAL or framework implementation, increase the timeout to 1 second. Has
no impact on correctly-working implementations

Bug: 10430191
Change-Id: I08e99f8e7f3beb8f15dcee32632cdebfe3dca8b3
lient2/CaptureSequencer.h
1ce7c34e67c2cf58dd88c31f36f4bd62e375f7f0 21-Aug-2013 Eino-Ville Talvala <etalvala@google.com> Camera1: Set preview to be asynchronous, and remove dead code

- 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
amera2Client.cpp
amera2Client.h
ameraClient.cpp
ameraClient.h
deeef54487a34034dc0cfaab20b20d557224c07c 02-Aug-2013 Mathias Agopian <mathias@google.com> separte producer and consumer interfaces

Bug: 9265647
Change-Id: Iefabc11e4bd2e2e8ffd31160476c450affe6629c
lient2/CallbackProcessor.cpp
lient2/JpegProcessor.cpp
lient2/StreamingProcessor.cpp
lient2/ZslProcessor.cpp
7b82efe7a376c882f8f938e1c41b8311a8cdda4a 26-Jul-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Rename new API to camera2, rearrange camera service

- 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
amera2Client.cpp
amera2Client.h
ameraClient.cpp
ameraClient.h
lient2/BurstCapture.cpp
lient2/BurstCapture.h
lient2/CallbackProcessor.cpp
lient2/CallbackProcessor.h
lient2/Camera2Heap.h
lient2/CaptureSequencer.cpp
lient2/CaptureSequencer.h
lient2/FrameProcessor.cpp
lient2/FrameProcessor.h
lient2/JpegCompressor.cpp
lient2/JpegCompressor.h
lient2/JpegProcessor.cpp
lient2/JpegProcessor.h
lient2/Parameters.cpp
lient2/Parameters.h
lient2/StreamingProcessor.cpp
lient2/StreamingProcessor.h
lient2/ZslProcessor.cpp
lient2/ZslProcessor.h
lient2/ZslProcessor3.cpp
lient2/ZslProcessor3.h
lient2/ZslProcessorInterface.h