• 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 >>>)
855c20283de5eab6798c76ffd4ea86bd6754a7fb 10-May-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix recording stream update logic

Bug: 28695248
Change-Id: I43d2d456cab84b378507979bad89c8c1f5b86b58
lient2/StreamingProcessor.cpp
2d13b1d3eeaba31d8c15acc6037fd68b150a9a66 28-Apr-2016 Chien-Yu Chen <cychen@google.com> Camera: Fix passing video native handle for 64-bit app

Add new binder calls to pass video native handle so the video native
handle can be passed between 32-bit and 64-bit processes.

Remove problematic code that used IMemory to pass video native
handle because the sizes of VideoNativeMetadata are different in
32-bit and 64-bit processes.

Bug: 28403412
Change-Id: I3341b1812ecc41d61846bb72ca926ecb1674c9ec
amera2Client.cpp
amera2Client.h
ameraClient.cpp
ameraClient.h
6192b89257c5ae8834faa25b801d561043675d3b 04-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Ensure correct error message for disconnected devices

After a device has been disconnected, should return consistent errors
to the caller if they invoke further device methods.

For API1, that's INVALID_OPERATION, and for API2, that's
ERROR_DISCONNECTED.

Change-Id: I0f3d889906a9818c0e03852702b146fd33c9e42a
Fixes: 27591189
ameraClient.cpp
b0fdc1ed2182fe851ef7ca98a1b4a552b53b3033 21-Mar-2016 Shuzhen Wang <shuzhenwang@google.com> Camera: Retry JPEG capture if buffer is dropped.

Camera api1 doesn't have error notification if JPEG buffer is dropped.
Add retry logic to try again if such error happens.

Bug: 27074407
Change-Id: I646566c6ee5a064896b5a433d8e1797140f0d257
lient2/CaptureSequencer.cpp
lient2/CaptureSequencer.h
lient2/JpegProcessor.cpp
lient2/JpegProcessor.h
c40fcb01669240e9c1a6af74bcb0fcd85147fa87 18-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: validate input in releaseRecordingFrame" into nyc-dev
42f2707bb2d9698765d1180787ffc890c41ddb3a 12-Jan-2016 Chien-Yu Chen <cychen@google.com> Camera: validate input in releaseRecordingFrame

Check mem isn't null before using it in releaseRecordingFrame.

Bug: 26164272
Change-Id: I384d4aa2798b6121ae548a6bb618fc0189f96633
ameraClient.cpp
2cbf6cea23539bfe99e36d1d221de62255452e86 14-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Update dataspace to new spec, convert for older HALs

- Switch clients of camera devices to use new dataspace values
- For older HALs, map to legacy dataspace values

Bug: 27344373
Change-Id: Icabc345025383f987ef4472cd26182a580dc8b3c
lient2/CallbackProcessor.cpp
lient2/JpegProcessor.cpp
lient2/Parameters.cpp
5cd8d64b36e0bc87115a5221b06e2fe3c5f9879b 08-Mar-2016 Chien-Yu Chen <cychen@google.com> Camera3Device: Send partial results seperately

Change Camera3Device to send partial results as soon as a
partial result is received from HAL so that 3A partial results
are not bundled.

Change FrameProcess to wait until all 3A states are received before
notify the client about 3A changes.

Bug: 17320166
Change-Id: I31a3e42081430ff4f7a482c4b2f1db272b8b2e4a
lient2/FrameProcessor.cpp
lient2/FrameProcessor.h
02bf03287652923b5bb5316667b065423565d6b4 18-Feb-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Clean up warnings and set -Werror

- Also fix error logging template inconsistency
- Also add a few error handling cases into camera2 NDK
to deal with previously-ignored error codes

Bug: 27149500
Change-Id: I8f1f4c72252dd48d652f24b595b642199f20c327
lient2/JpegCompressor.h
d56db1d2bee182d1851097a9c712712fc094d117 18-Dec-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Switch camera2 to auto-gen C++ binder interfaces

- Move camera service AIDL files to frameworks/av
- Build C++ interface stubs with AIDL tools
- Add necessary native-side parcelables and update existing ones
- Remove manually-written stubs, rearrange remaining manual stubs
- Adjust implementations to work with auto-generated stubs
- Adjust method signatures for auto-gen differences
- Add rich error messages using binder::Status

Bug: 25091611
Change-Id: I6f69f34b9d1a3f8d1fb7db87357363f8fa8483ff
amera2Client.cpp
amera2Client.h
ameraClient.cpp
ameraClient.h
lient2/Parameters.cpp
f73511756147a685267f208784921fea40decc64 09-Feb-2016 Eino-Ville Talvala <etalvala@google.com> CameraHardwareInterface: Reconnect preview in HAL set_buffer_count

Workaround for b/27039775

Some camera device HAL v1 implementations expect that calling
preview_stream_ops->set_buffer_count resets the preview stream's flag
for whether any buffers have been queued up by the camera HAL, allowing
the HAL to dequeue all buffers in the stream again (instead of just its
own buffer count limit, which is lower).

The underlying buffer queue behavior has now changed, and that flag is
no longer reset on a change of buffer count, to support dynamic buffer
queue buffer count features.

To maintain backwards compatibility with HALv1 implementations that rely
on this implicit HAL interface behavior, add a disconnect/connect pair
to the set_buffer_count call, which will reset the dequeue flag, along
with all other preview stream parameters.

To maintain other parameters, cache them when they are originall
set (either by the HAL or by the higher-level camera client), and apply
them again after reconnecting.

Bug: 27039775
Change-Id: I9fa220b356715e7f8e48adc7acdffbfa598c329c
ameraClient.cpp
98a668f6ea51e4d894d2ebb61a0e18287fb14008 18-Dec-2015 Chien-Yu Chen <cychen@google.com> Camera: Fix client permission check

Modify StageFright's CameraSource to forward calling PID as
client PID when connecting to CameraService so CameraService
can check if the client PID has permission to use camera.

Change CameraService to check calling UID is trusted before
using the passed in client PID and client UID to verify permission.

Bug: 24511454
Change-Id: I4906ab73510e2c75714690bed675e3c13aca3ccf
amera2Client.cpp
ameraClient.cpp
c73e0410c6b931fe598061b2f348834da0a21707 15-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly am: c400396525 am: 795243686f am: fb5043a703 am: 3a0d1df37d am: f0b0a7c7bb
am: 715e5cdec7

* commit '715e5cdec771abb372d46813a8b0ab57d47afd99':
Camera: Disallow dumping clients directly
715e5cdec771abb372d46813a8b0ab57d47afd99 14-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly am: c400396525 am: 795243686f am: fb5043a703 am: 3a0d1df37d
am: f0b0a7c7bb

* commit 'f0b0a7c7bb61d6ea9f8f89c55368529711d18e1a':
Camera: Disallow dumping clients directly
795243686fe2e1c352732b47bcdb6ea9e9e7e39e 14-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly
am: c400396525

* commit 'c4003965258404a19b99280ac0f475e2f290bf27':
Camera: Disallow dumping clients directly
c4003965258404a19b99280ac0f475e2f290bf27 13-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly

Camera service dumps should only be initiated through
ICameraService::dump.

Bug: 26265403
Change-Id: If3ca4718ed74bf33ad8a416192689203029e2803
amera2Client.cpp
amera2Client.h
ameraClient.cpp
ameraClient.h
d55d0bee625d4bb02d72fcd91d40fc30e1f87b86 13-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Merge "libcameraservice: Allow media server to disconnect camera even unlocked" am: a68b10a49b
am: f615179ee4

* commit 'f615179ee48bb11a27426d60f76845764cf00f75':
libcameraservice: Allow media server to disconnect camera even unlocked
418f4d1350da8931853a616d4da180978c6bb971 27-May-2014 Wang, Jianfeng XA <jianfeng.xa.wang@sonymobile.com> libcameraservice: Allow media server to disconnect camera even unlocked

The camera service may fail to release the camera hardware instance
in some use cases.
When an application unlocked the camera before disconnect, disconnect
from the application will not be accepted. And disconnect from media
server will not be accepted also. Then, the camera hardware instance
will not be released and a resource leak will be caused.

Allow media server to disconnect the camera at all times even if
the camera is unlocked.

Change-Id: Icd5ed81bed242fa5947aa40ca85e4ca7fa7286e7
ameraClient.cpp
8cca0750a84c2d97224c0cfef7cf255308ee80b3 14-Nov-2015 Chien-Yu Chen <cychen@google.com> Camera: Support BufferQueue between Camera and StageFright

Use a BufferQueue between Camera and StageFright to pass video
buffers for Camera HALv3 devices.

CameraSource in StageFright will try to use "buffer queue" mode
if it is supported by the camera device. In "buffer queue" mode,
CameraSource creates a buffer queue and a listener thread to recieve
video buffers from camera device. CameraSource then wraps the
ANWBuffer in MediaBuffer. If the camera device doesn't support
"buffer queue" mode, it falls back to "metadata in video buffer"
mode or "real YUV data" mode.

"Metadata in video buffer" mode is removed from Camera2Client and
only "buffer queue" mode is supported.

Bug: 24511454

Change-Id: Ice833b57bcd8d91852d6415402013f56f3e3970a
amera2Client.cpp
amera2Client.h
ameraClient.cpp
ameraClient.h
lient2/Parameters.cpp
lient2/Parameters.h
lient2/StreamingProcessor.cpp
lient2/StreamingProcessor.h
d309fb9c8a2c4564d88fffba19c4e3688e4b862b 25-Nov-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Remove device HALv2 support, other cleanup

HALv2 only ever shipped with Nexus 10, and has been fully superceded by
HALv3. Remove it to allow for various code simplifications and cleanup.

- Remove Camera2Device
- Remove various special-case codepaths for supporting Camera2Device
- Remove CameraDeviceFactory, since it only creates Camera3Devices now
- Remove BurstCapture and associated CaptureSequence/Parameters code
- Remove old ZslProcessor and simplify ZslProcessor hierarchy to be
just ZslProcessor3, which is renamed to just ZslProcessor
- Add service-init-time check for unsupported device versions
- Fix assorted compiler warnings, some old, some new
- Remove references to HALv2 when possible

Bug: 25866588
Change-Id: Ia1063264d315f9b742ec5cdd0483539310894f5e
amera2Client.cpp
amera2Client.h
lient2/BurstCapture.cpp
lient2/BurstCapture.h
lient2/CallbackProcessor.h
lient2/CaptureSequencer.cpp
lient2/CaptureSequencer.h
lient2/FrameProcessor.cpp
lient2/JpegProcessor.cpp
lient2/JpegProcessor.h
lient2/Parameters.cpp
lient2/Parameters.h
lient2/StreamingProcessor.h
lient2/ZslProcessor.cpp
lient2/ZslProcessor.h
lient2/ZslProcessor3.cpp
lient2/ZslProcessor3.h
lient2/ZslProcessorInterface.cpp
lient2/ZslProcessorInterface.h
ce497dabca19d34d46a87598315be885e906871e 17-Oct-2015 Eino-Ville Talvala <etalvala@google.com> am 176a017f: am 25add6d4: am 43c39be5: Merge "ALOGE does not match triggering condition."

* commit '176a017fabaf753db36ffe4a3069447d9df4cf3b':
ALOGE does not match triggering condition.
176a017fabaf753db36ffe4a3069447d9df4cf3b 17-Oct-2015 Eino-Ville Talvala <etalvala@google.com> am 25add6d4: am 43c39be5: Merge "ALOGE does not match triggering condition."

* commit '25add6d481bba37552f0f8b6ed225bed98594034':
ALOGE does not match triggering condition.
25add6d481bba37552f0f8b6ed225bed98594034 17-Oct-2015 Eino-Ville Talvala <etalvala@google.com> am 43c39be5: Merge "ALOGE does not match triggering condition."

* commit '43c39be58651745a55e5d66568f92c03d695b461':
ALOGE does not match triggering condition.
454b6785c759a9bcfa33fce1ed27b04a381f9799 15-Oct-2015 Chien-Yu Chen <cychen@google.com> am 2aeef2fd: am 50652c7e: am 5f54de48: Merge "Camera: Add video recording stop sound" into mnc-dr-dev

* commit '2aeef2fdb34575d7981f62bd06936e6e9cee628a':
Camera: Add video recording stop sound
82104ebbb2cc04277ab07b355f38f73045a11770 14-Oct-2015 Chien-Yu Chen <cychen@google.com> Camera: Add video recording stop sound

Add video recording stop sound to match MediaActionSound.

Bug: 24745252
Change-Id: I84b69757c7e0a98abfaafcce5f41dd45fd41cf74
amera2Client.cpp
ameraClient.cpp
19fdbfcf8af3ca689c3c62b88059ac5d3c6907d1 13-Oct-2015 Hubert Rzezniczak <hubert.rzezniczak@gmail.com> ALOGE does not match triggering condition.

Meeting the condition
if (sceneModeOverrides.count !=
availableSceneModes.count * kModesPerSceneMode) {
results with ALOGE which describes the missmatch.
The description does not match the condition.

Signed-off-by: Hubert Rzezniczak <hubert.rzezniczak@gmail.com>
lient2/Parameters.cpp
3145ccfef7adc84a99eb88b8ac6840fd38756e31 15-Sep-2015 Yin-Chia Yeh <yinchiayeh@google.com> am 686008a0: am 08879050: am 3818c696: Merge "Camera: API1 shim: select better default FPS range" into mnc-dr-dev

* commit '686008a0b91242314abfc5c861c74249f6328d90':
Camera: API1 shim: select better default FPS range
69c24d3c6e42472f3e4e155559be100dd6f7121a 14-Sep-2015 Pablo Ceballos <pceballos@google.com> Merge changes from topic 'Bug 19769719'

* changes:
stagefright: Rename mBuf to mSlot
camera: Rename mBuf to mSlot
652f7d7ebd9a8cec067588c2a232e49710d5cd83 11-Sep-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: API1 shim: select better default FPS range

Bug: 23992350
Change-Id: Ie86b24d9e5ea753c6dfc2e5526d371b339be96a1
lient2/Parameters.cpp
412fe56cd7cf7d73bc5d2bcc3f635bc650d18de9 21-Aug-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Notify camera service proxy of device status

Send the camera proxy service in system server updates to
camera device state: opened/closed/active/idle.

Bug: 23393557
Change-Id: Id7c70f134821efa34af8f6e7b4caa4c2ab128ebc
amera2Client.cpp
ameraClient.cpp
e361bc024ee7e34b7d53223aa2b209ef120ee78a 08-Aug-2015 Pablo Ceballos <pceballos@google.com> camera: Rename mBuf to mSlot

Bug: 19769719
Change-Id: I9eef512f2a2185b7e0298113d2503b62ec2e5942
lient2/StreamingProcessor.cpp
355d9c6b74cd22a88fc7d1c9ba2e928ba566c69e 25-Feb-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera2Client: handle slower jpeg stream sensor

If largest jpeg stream cannot sustain 30 FPS, don't
create jpeg stream until takePicture is called and remove
it after still capture is done.
Also, disable video snapshot for such sensors so video snapshot
won't slow down video recording.

Bug: 22231605
Change-Id: I2b34d2537c224694ae10f2006b5a46be45a1b1a6
amera2Client.cpp
amera2Client.h
lient2/CaptureSequencer.cpp
lient2/Parameters.cpp
lient2/Parameters.h
727d172137b4f32681c098de8e2623c0b65a6406 09-Jun-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Add consumer name to output stream dumpsys

Also switch use of ANativeWindow to Surface, to get to the
getConsumerName() method where necessary.

Surface can always be cast to ANativeWindow, but not the other way
around, so it's a better option anyway.

Change-Id: Ie5c2d30821c1a754f9e382699ff50b4b328288b3
amera2Client.cpp
amera2Client.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
d46a6b9fd8b2a4f9098757384711e2cd03a91651 15-May-2015 Eino-Ville Talvala <etalvala@google.com> Camera1 API: Support SW encoders for new camera HALs

- Support new set video format/dataspace command in camera service
- HALv3: Select gralloc usage flags based on format
- HALv1: Pass format command directly to HAL layer
- Use format/dataspace command in CameraSource
- Switch all API1 recording to use metadata mode
- Switch all >= HALv2 API1 recording to use kMetadataBufferTypeANWBuffer

Bug: 13222807
Change-Id: I2e609b92c65792611bb1dab09e0c41c363ebbc42
amera2Client.cpp
amera2Client.h
lient2/CallbackProcessor.cpp
lient2/JpegProcessor.cpp
lient2/StreamingProcessor.cpp
lient2/StreamingProcessor.h
lient2/ZslProcessor.cpp
lient2/ZslProcessor3.cpp
216db7455a19a2f1a5b29e3a9610231365b6c778 19-May-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: API1 shim: notify shutter correctly

Previous implementation only notifies the callback when we receive
full capture result. This implementation notifies the callback
once HAL sends capture start callback.

Bug: 12530628
Change-Id: Ibf71d532b5cf649514b316e35683c217021698b4
amera2Client.cpp
amera2Client.h
lient2/CaptureSequencer.cpp
lient2/CaptureSequencer.h
d48521fc2f7c34623a745728a07dad728da49254 30-Apr-2015 Eino-Ville Talvala <etalvala@google.com> Camera: API1 shim: Don't tightly apply crop region

Due to older HAL compatibility, we have been setting a tight crop region
that just bounds the current output streams. However, this did not take
into account any possible ZSL output stream, so correct application of
our stream cropping rules to ZSL results in double-crop scenarios, if
the ZSL stream aspect ratio does not match the aspect ratio of the other
output streams.

Since all current HALs follow the correct stream cropping rules (or
at least sufficiently ignore them for ZSL), simplify the cropping
substantially - now either calculate the crop region based purely
off the active array dimensions and zoom factor, or purely off
the preview stream and zoom factor. The former is used for setting
the request crop, and the latter is used for converting coordinates
for metering regions.

Bug: 20316691

Change-Id: I5a0bc2e7c09cf60fbae4220566540ca9e674d652
lient2/Parameters.cpp
lient2/Parameters.h
27b0159fa29b85b63f7bcad83bd13c70355a7bcd 22-Apr-2015 daisuke jinno <daisuke.x.jinno@sonymobile.com> DO NOT MERGE: The preview frame data is broken when sending via Binder

[Cause]
CallbackProcessor uses always same buffer to send preview data.
A buffer is written before it is read by user process.

[Solution]
Increment buffer index correctly.

Change-Id: I87a7e3dc6546448a419c96aa58ace3b7d086bf70
lient2/CallbackProcessor.cpp
d6b01f26a826d10912be4b34bbd2438e97c871e4 15-Apr-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera: Actually pass device errors to client for Camera2Device."
a485dfec4ad98283b911cf983566b0ce947343b6 14-Apr-2015 Ruben Brunk <rubenbrunk@google.com> camera: Actually pass device errors to client for Camera2Device.

Bug: 19186859
Change-Id: Ib58588dfd99956b719c34e62c596ea604d97edcb
amera2Client.cpp
amera2Client.h
f2d1e4dfc14fd90e1256b3f6e96e69560f5d3b5e 07-Apr-2015 Zhijun He <zhijunhe@google.com> Camera2Client: support HAL version 3.3

Change-Id: Id018e3ce21b4344d09a877395eb355adba9e8fa2
amera2Client.cpp
44d842a762e463f0a29e95036e97fef2def4b8ea 27-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: iterate through all encoders for finding max video size

Bug: 19712132
Change-Id: I5c1fc748fcc756f6665c31951f8af8a37ff4254d
lient2/Parameters.cpp
ae21e335e392125168601dba4731c85b5c25f33f 19-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: plumbing rotation field through"
d58b2ac7244a964caa3f4e386b8280ae2f5d2125 19-Mar-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Add camera client eviction enforcement."
cc776718c0be7c31fe5ab4fc1446d377be60369f 18-Feb-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Add camera client eviction enforcement.

- This updates the CameraService to implement client
eviction behavior based on process priority.

Bug: 19186859

Change-Id: I646939b1cdf1a2237c4e5044164d55a2542cf36e
amera2Client.cpp
ameraClient.cpp
b97babb8c08969b55af3b6456d15f764c8873d3f 12-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: plumbing rotation field through

Change-Id: I0f4343a0bfa7bf09ba887c78a1da1c08daa35333
lient2/CallbackProcessor.cpp
lient2/JpegProcessor.cpp
lient2/StreamingProcessor.cpp
lient2/ZslProcessor.cpp
549e735c2ca22d16eea32fda418ba80da32a8558 12-Mar-2015 Dan Stoza <stoza@google.com> libcameraservice: Stop using IGBC::BufferItem

Switches all uses of IGraphicBufferConsumer::BufferItem (and
BufferQueue::BufferItem) to the BufferItem in libgui. Depends on
frameworks/native I699ed0a6837076867ca756b28d1ffb2238f7a0d9.

Change-Id: I187b3a7d05196b6289596afac8fb9a9d4aebff76
lient2/StreamingProcessor.cpp
lient2/StreamingProcessor.h
lient2/ZslProcessor.cpp
lient2/ZslProcessor.h
lient2/ZslProcessor3.h
3d82c0d9ed2b3e956ad699a9ca2c8a70c9d24678 24-Feb-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Wire up dataSpace, clean up ICameraDeviceUser

- Remove unused arguments from ICameraDeviceUser::createStream
- Add dataSpace as a stream parameter, plumb it through everything

Change-Id: I608cafe694785d1c512276e71b2016f8ac3b0ccb
lient2/CallbackProcessor.cpp
lient2/JpegProcessor.cpp
lient2/StreamingProcessor.cpp
lient2/ZslProcessor.cpp
a97dfeb91aae9569ff11a5a40634e2960c03915e 20-Feb-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Remove RAW_SENSOR in favor of RAW16

Change-Id: I69ca24c69f58be958efdef300b127401d2b2e880
amera2Client.cpp
lient2/Parameters.cpp
e074a93046ebe5cea0b55c3a479e082a426e1e07 30-Jan-2015 Yin-Chia Yeh <yinchiayeh@google.com> CameraService: intercept Camera module

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
amera2Client.cpp
amera2Client.h
ameraClient.cpp
ameraClient.h
045513fc55cd500225071c11b06e1f4bb133681f 16-Dec-2014 Chien-Yu Chen <cychen@google.com> am 0fd52ac2: am 6eac9e2f: Merge "Camera2Client: flush requests in stopPreviewL" into lmp-mr1-dev

* commit '0fd52ac2929f6ded984cc3a063645d65b5e2006f':
Camera2Client: flush requests in stopPreviewL
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
f3376bdbcb48daad6889d28ee2c98b174f12028e 08-Dec-2014 Eino-Ville Talvala <etalvala@google.com> am 668b0550: am 597ce69a: Merge "Camera: Add support for SCENE_MODE_HDR for newer HALs" into lmp-mr1-dev

* commit '668b055081bb9d0d61775acf67bb27ce66b214f6':
Camera: Add support for SCENE_MODE_HDR for newer HALs
e9011c22e000cc0c1e8080b687893fbbe3c17278 08-Dec-2014 Ruchit Sharma <ruchits@nvidia.com> am 07e19019: am 9257000c: camera: fix logging in ZslProcessor to avoid spam

* commit '07e190190ffddfbc32ecbf0bd9a9679817da232b':
camera: fix logging in ZslProcessor to avoid spam
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
d0e12a161471823d1ab269cb608be3f3b0a71ed1 21-Nov-2014 Dan Albert <danalbert@google.com> am 902dc42d: am 07715ac3: Merge "C++11 compatibility."

* commit '902dc42d79b075395d484ce1c71f215b199aaa2a':
C++11 compatibility.
36802bd18b7b4e8c87fa019c7e3068bee330d174 20-Nov-2014 Dan Albert <danalbert@google.com> C++11 compatibility.

* 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
lient2/Parameters.h
a848844f5451d8e01c00b613daccbb901372779d 19-Nov-2014 Yin-Chia Yeh <yinchiayeh@google.com> am cb79b3db: am 03181012: Merge "Camera2Client: remove recording stream if necessary" into lmp-mr1-dev

* commit 'cb79b3dbd377b1a3b6da2f58dfa49050400815ae':
Camera2Client: remove recording stream if necessary
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
bf1e36e8b7a6e08e2f20dd0b2900dda259c23459 17-Nov-2014 Chien-Yu Chen <cychen@google.com> am 771a362d: am 3171f4e1: Merge "CameraService: normalize face rectangles properly" into lmp-mr1-dev

* commit '771a362de24be025e8283a91be4201d4d1d4b5d8':
CameraService: normalize face rectangles properly
77e79a509d19ab50b1867fe3903b5a8fae450591 17-Nov-2014 Marco Nelissen <marcone@google.com> resolved conflicts for merge of e78a27ca to lmp-mr1-dev-plus-aosp

Change-Id: If10a9cc17245f95d5e10b1507445abbb4020670e
f888020c6e2735624f2b2a30e72aca24e17b8b4d 14-Nov-2014 Marco Nelissen <marcone@google.com> Update calls to IInterface::asBinder()

to use the new static version.

Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a

Conflicts:
media/libmedia/IAudioFlinger.cpp
media/libmedia/IMediaPlayer.cpp
media/libstagefright/CameraSource.cpp
amera2Client.cpp
ameraClient.cpp
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
6e48af3d909568ed2f07b79369d52f9415100208 11-Nov-2014 Eino-Ville Talvala <etalvala@google.com> am 7b28e4e7: am 9527a598: Merge "Camera: Guard against asBinder() calls on NULL interfaces"

* commit '7b28e4e709fcc90f9ca5ca987e2d4e8c05d1a731':
Camera: Guard against asBinder() calls on NULL interfaces
e992e75053e98e3699af6e344c11b787e30411ad 08-Nov-2014 Eino-Ville Talvala <etalvala@google.com> Camera: Guard against asBinder() calls on NULL interfaces

Bug: 18207548
Change-Id: I9879c9b4c0282a6b96b77398f62beedc47f7f0a0
amera2Client.cpp
ameraClient.cpp
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