• Home
  • History
  • Annotate
  • only in /frameworks/av/services/camera/libcameraservice/
History log of /frameworks/av/services/camera/libcameraservice/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
6c2f7aeb10fb2050c27afa0212a1e167ca2809ec 21-Jun-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Add debug messages for camera latency

Log latency histogram of:
- processCaptureRequest call,
- dequeueBuffer call, and
- waiting time for handout count fall below max_buffers

Test: Camera CTS
Bug: 62651109
Change-Id: I5ee1cdb4139fa359f0887d6f6871884e28739340
(cherry picked from commit 686f644f981badd481d8781bf80b221544df7b1f)
ndroid.mk
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3IOStreamBase.cpp
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
tils/LatencyHistogram.cpp
tils/LatencyHistogram.h
c19fe8db4adb1ad2ea2743de4ee68d45dc8b8cd0 15-Jun-2017 Eino-Ville Talvala <etalvala@google.com> CameraService: ZslProcessor: Don't call back into BQ from callback

This causes a deadlock.

Test: Camera1 CTS passes
Bug: 62648829
Change-Id: I88aed08fe952fead2b356861ba0a9e24c0535e92
(cherry picked from commit 9eef26c39af2f69b921e9d2e85d830bddcc31829)
pi1/client2/ZslProcessor.cpp
pi1/client2/ZslProcessor.h
89954d931d7b952597dc8e29e7a87da31a4ae0b1 22-May-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: Free buffers more aggressively

This change attempts to free buffers managerd by
BufferManager more aggresively to reduce memory pressure.

Also fix a small buffer accounting issue: check detachBuffer
actually returns a non-null buffer.

Test: keep taking single shot in GCA, CTS
Bug: 38483630
Change-Id: I6c64d1dc2244cec4f1300bbf3992f66f2167eed2
evice3/Camera3BufferManager.cpp
evice3/Camera3BufferManager.h
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
4d351037a53438ca0355efe6a845d29e3ef11bec 26-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: fix new device register logic" into oc-dev
92e3321e41e10f2e07a71f9512a6cadef7f40b64 25-May-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix new device register logic

Test: smoking test GCA, CTS
Bug: 38452093
Change-Id: I984cfbb61a7c4983e27f250f9825f9418cf940e9
ameraService.cpp
ommon/CameraProviderManager.cpp
fd76cf5246c714a1c1ef10b2b974cacf0077f216 15-May-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Handle consumer side detach in BufferManager

- BufferQueue consumer may detach buffers, and BufferManager isn't
aware. Hook up onBufferRemoved callback so that BufferManager's internal
handoutBuffer and attachedBuffer counts can be updated when a buffer
is detached.
- Deleted some code that's not exercised any more.

Test: Camera CTS and burst capture.
Bug: 38238747
Change-Id: I6861da6e013fe5609907f807639c5d691c0c3af9
evice3/Camera3BufferManager.cpp
evice3/Camera3BufferManager.h
evice3/Camera3OutputStream.cpp
c03b7307eba75fab7e617be5ad1f3f5a36f3f629 15-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Advertise only unique API1 compatible devices" into oc-dev
9ec59fc5d016a609adffdb7e68236b9d5d05254d 12-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Close acquire fences on failed buffers" into oc-dev
cdb74a6840fc4ae594afadf5eedc1d27106989ea 11-May-2017 Emilian Peev <epeev@google.com> Camera: Advertise only unique API1 compatible devices

Providers could have devices with same id but different
API versions. The total number of API1 compatible devices
needs to consider only the unique ids in this case.

Bug: 38237265
Test: Manual using application
Change-Id: I5a31c3cd28f00e8af3029213711505e4075a61b2
ommon/CameraProviderManager.cpp
ommon/CameraProviderManager.h
c58cf4c4104b001425f9d4a36f3e5441874efd3d 11-May-2017 Emilian Peev <epeev@google.com> Camera: Close acquire fences on failed buffers

Buffers that didn't get a chance to be processed
might still hold valid acquire fences. Check and
close those if necessary.

Bug: 38229510
Test: Manual using application
Change-Id: I8e823a655cc30ed966e277ace090e96c64ba1c8c
evice3/Camera3Device.cpp
aee727dd2f16bf299f738542b5e72fc72671f770 04-May-2017 Emilian Peev <epeev@google.com> Camera: Re-enumarate new providers

Camera service should enumarate newly added
camera providers.

Bug: 37592461
Test: Manual using camera application
Change-Id: I4c886b99127d23148c70ce1e1e773cb8393d91b4
ameraFlashlight.cpp
ameraService.cpp
ameraService.h
ommon/CameraProviderManager.cpp
ommon/CameraProviderManager.h
63eb7e79cf94662a5412fd6e473cf12f5f48eef0 04-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Cleanup 'CameraModule' dependend code" into oc-dev
c5cbb87d00ead068a7088db4060bce1c0e699b8c 27-Apr-2017 Eino-Ville Talvala <etalvala@google.com> Camera service: Don't crash if the camera HAL dies mid-use.

Check for transaction errors in all calls to the HIDL interface;
return DEAD_OBJECT consistently if a transaction error occurs.

Test: Camera CTS does not regress; killing camera HAL does not kill camera service.
Bug: 37748853
Change-Id: Iab3ad08376e164db340f8f29c3cfc7fdf261cc00
evice3/Camera3Device.cpp
f53f66edb3b06d1df5caf1fa806f7ed95305a4cf 11-Apr-2017 Emilian Peev <epeev@google.com> Camera: Cleanup 'CameraModule' dependend code

CameraModule is already part of the HIDL wrapper and
is no longer needed in the service code.
Add extra logic in camera provder manager for identifying
camera API1 compatible devices.

Bug: 34392075
Test: Complete Camera CTS
Change-Id: I64a49e9091557c88859872d0c599c5be378db8b5
ndroid.mk
ameraFlashlight.cpp
ameraFlashlight.h
ameraService.cpp
ameraService.h
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/CameraClient.cpp
pi1/CameraClient.h
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.h
ommon/CameraDeviceBase.h
ommon/CameraModule.cpp
ommon/CameraModule.h
ommon/CameraProviderManager.cpp
ommon/CameraProviderManager.h
evice1/CameraHardwareInterface.cpp
evice1/CameraHardwareInterface.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
7e8d4590f75afc2b271e7d2e5762ac43d56728db 10-Apr-2017 Emilian Peev <epeev@google.com> Camera: Cleanup 'Camera2Client' device dependend code

Bug: 34392075
Test: Manual using application.
Change-Id: I365b83c9cfbfe3ddbd9d41f2aa9788490b87b5cf
pi1/client2/FrameProcessor.cpp
pi1/client2/Parameters.cpp
pi1/client2/StreamingProcessor.cpp
2a53da4379f1a5624203673cce8c1773b0cffa50 10-Apr-2017 Emilian Peev <epeev@google.com> Camera: Remove RAW boost value override logic

RAW boost value will be inserted by HIDL wrapper. The logic
needs to move there.

Bug: 34392075
Test: runtest -x
cts/tests/camera/src/android/hardware/camera2/cts/DngCreatorTest.java
Change-Id: I7d4321d728eba11b5ec1345536bb669d70f3cffc
evice3/Camera3Device.cpp
evice3/Camera3Device.h
7e25e5e2195823b4b9cbe61c072b9267297cab34 07-Apr-2017 Emilian Peev <epeev@google.com> Camera: Remove AE pre-capture trigger cancel override

Bug: 34392075
Test: runtest -x
cts/tests/camera/src/android/hardware/camera2/cts/StillCaptureTest.java
-m testAePrecaptureTriggerCancelJpegCapture
Change-Id: I0e632c83fb3ae0e4df26fe35bf1ef8441c1f20fa
evice3/Camera3Device.cpp
evice3/Camera3Device.h
08dd245c7c30900637197065213fbaa2b2a5c1ee 06-Apr-2017 Emilian Peev <epeev@google.com> Camera: Make device related code version agnostic

Camera device related code should be agnostic w.r.t.
device version as much as possible. Specifically the
following requirements must hold true:
- Since support for devices 3.0&3.1 is deprecated
"ANDROID_QUIRKS_USE_PARTIAL_RESULT" is no longer considered.
- "ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS" is always
used instead of the deprecated "ANDROID_SCALER_AVAILABLE_JPEG_SIZES".
- Buffer manager for camera streams is used for dynamic buffer
allocation.
- "flush" is always used instead of waiting for buffers to drain.
- Similar to "flush" stream "tearDown" is always available.
- Dead code handling buffer registration is removed.

Bug: 34392075
Test: Manual using camera application
Change-Id: If1b215f785ba61c6991fdf163d4eb18733690471
ommon/CameraDeviceBase.h
ommon/FrameProcessorBase.cpp
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
698f0a75c3740ac100b0b3ab89a6ab2453a3dadc 05-Apr-2017 Emilian Peev <epeev@google.com> Camera: Clear available callback buffers during recording stop

Make sure we don't keep any stale available callback buffer
references after recording stops. This can lead to resource
leaks.

Bug: 36478361
Test: Complete Camera/Camera2 CTS tests
Change-Id: I9f72b784ba3ae1cf9f9b16064a13b7ba8a1d0394
pi1/CameraClient.cpp
2a6a4689d39b4b4ad1f5d690ac54cce0fd6aae6c 20-Apr-2017 Emilian Peev <epeev@google.com> Camera: Ignore buffer handle 'int' section

Bufer handle hashing and comparison currently uses the buffer
'Int' section along with the Fd section. However the values there
can dynamically change after the buffer gets allocated which will
introduce side-effects in the buffer id map.

Bug: 37257356
Test: Complete Camera/Camera2 CTS
Change-Id: I2cf09ced69f155285dae67b3a2502e6b87f7d9cc
evice3/Camera3Device.h
e9e78196f9e1b4f7cb787b089710e0e8c6c32432 19-Apr-2017 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: allow shifted camera metadata for some interface" into oc-dev
1b1e248f69f3933cef4aab97ee8388151145bbc9 19-Apr-2017 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: use framework VideoNativeHandleMetadata header" into oc-dev
238ef5f352a59e97a90e2f9af88a27ad705442e5 19-Apr-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: allow shifted camera metadata for some interface

Allow shifted metadata when the buffer is allocated by
hwbinder (which might allocate buffers to 4 bytes boundary
on 32-bits CPU)

Test: compile, GCA working
Bug: 37095012
Change-Id: I404b73ac3b460f5ff03cb64001c24f7a05b91396
ommon/CameraProviderManager.cpp
evice3/Camera3Device.cpp
a81ce34cf26bc344474380885ec1c9af2c6543ef 14-Apr-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Make finalizeOutputConfigurations more resilient

There could be race in application where finalizeOutputconfigurations
doesn't include any new surface. Do not fail in this case.

Test: CameraStressTest#testBackCameraSwitchPreview
Bug: 36811459
Bug: 35137641
Change-Id: Ic185e6d8bfcb8af5b81a33fbbd2fd4e49cc647ce
pi2/CameraDeviceClient.cpp
067606686b9f8bf78580f07dbde78989b755dcbc 18-Apr-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: use framework VideoNativeHandleMetadata header

Test: build
Bug: 35625849
Change-Id: I8e95677267646f897abdf94881ef335635461c0a
evice1/CameraHardwareInterface.cpp
evice1/CameraHardwareInterface.h
2efd6be69a00b55bd2c20f27a99039b5ac2c5ff3 31-Mar-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Use slowJpeg if JPEG minimum duration is less than preview fps

If the minimum duration of JPEG is less than the frame duration derived
from maximum fps, enable slowJpeg mode so that JPEG doesn't slow down
preview.

Cap the default max fps to 30 so that the switch between different
sensor modes can be minimized while still allowing the app to go higher
than 30fps.

Test: Camera1 CTS
Bug: 36692074
Change-Id: If4d367ac587c0f4d3620ca2d25063c5a12ebfceb
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
a640c5a8731adb001b955192ce032c69c7322849 13-Apr-2017 Yifan Hong <elsk@google.com> Use fmq for camera capture result.

Test: camera works.

Bug: 35788245 [Treble] Pass camera metadata using shared memory

Change-Id: I344212cfd80f6df4e5aec01ec3f12f1ee9bb71c8
evice3/Camera3Device.cpp
evice3/Camera3Device.h
f79b55484121b70652411272cf286a3bebd4fdb6 11-Apr-2017 Yifan Hong <elsk@google.com> Use fmq for camera capture request.

Test: camera works.
Bug: 35788245 [Treble] Pass camera metadata using shared memory

Change-Id: I58d7f6ef91ff45680840bf61a431a0c071ebbdfb
ndroid.mk
evice3/Camera3Device.cpp
evice3/Camera3Device.h
68dbd4ea14b11b2da16cadbce0edc574e05b5f5d 11-Apr-2017 Emilian Peev <epeev@google.com> Camera: Update service test for multiple vendor providers

Appending to a source with valid vendor id from a metadata without
vendor id should be supported.

Bug: 37198452
Test: CameraProviderManagerTest.MultipleVendorTagTest
Change-Id: Ic0b160216386fcfe1aa57b7e4a363b405459b3d0
ests/CameraProviderManagerTest.cpp
8d8ebcaa7d13f163abee5bbf23b4e5a21fbfb44c 11-Apr-2017 Chia-I Wu <olv@google.com> Merge "libcameraservice: update for revised HIDL gralloc" into oc-dev
0ba7cd85016caac178ee8e52f067ca9c42511dc3 10-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Don't advertize zoom in case max digital zoom is 1" into oc-dev
04ecef31886cdcd41eff19f80a905c95abe57177 10-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Advertise AE/AWB locks in case they are supported" into oc-dev
67a0c0e77dce4dccc9155f4bfce490d167457c8a 06-Apr-2017 Chia-I Wu <olv@google.com> libcameraservice: update for revised HIDL gralloc

There is only BufferUsage instead of ProducerUsage/ConsumerUsage
now.

Test: make
Change-Id: I265ca4c27e284fb1f704659efd74355f82d3c192
evice1/CameraHardwareInterface.cpp
evice1/CameraHardwareInterface.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
71c73a2985a7ac65ee597be3441ab300fa56e22e 21-Mar-2017 Emilian Peev <epeev@google.com> Camera: Support vendor tags from multiple providers

Different vendors could have different vendor tags.
A global vendor tag cache will store all available
vendor tag descriptors from different providers.
The cache will then be shared with each camera client.
Camera metadata will use specific vendor ids stored
in the metadata buffer to identify the correct vendor
tag provider.

Bug: 34275821
Test: adb shell /data/nativetest/cameraservice_test/cameraservice_test
--gtest_filter=CameraProviderManagerTest.MultipleVendorTagTest
Complete Camera/Camera2 CTS tests
Change-Id: I2262128f21a0167504f018230624e2a89786c467
ameraService.cpp
ameraService.h
pi1/client2/FrameProcessor.cpp
pi1/client2/Parameters.cpp
ommon/CameraProviderManager.cpp
ommon/CameraProviderManager.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
ests/Android.mk
ests/CameraProviderManagerTest.cpp
tils/TagMonitor.cpp
tils/TagMonitor.h
47cf8e62b81770c0896aac444ef22a840b3a2c5e 04-Apr-2017 Yin-Chia Yeh <yinchiayeh@google.com> Revert "Camera: Map between bufferqueue gralloc0 usage, and HIDL gralloc1 usages"

This reverts commit 1a2f15daf13552e86324025cf6d31d887cd8fa02.

Test: fix b/36876770
Bug: b/36876770
Change-Id: Ie7b8c9ee444e3e8667154b396e3e6a556b54739a
ndroid.mk
pi1/client2/ZslProcessor.cpp
evice1/CameraHardwareInterface.cpp
evice1/CameraHardwareInterface.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3OutputStream.cpp
5b3570dcede02e7427b0bf3350499974ec8c75c7 04-Apr-2017 Emilian Peev <epeev@google.com> Camera: Don't advertize zoom in case max digital zoom is 1

Mark immediate zoom as not supported in case the camera has
maximum digial zoom close to 1. This will avoid corner
cases wehere we can have 'NUM_ZOOM_STEPS' all equal to 1.

Bug: 33093106
Test: Complete CameraTest CTS package
runtest -x cts/tests/camera/src/android/hardware/cts/

Change-Id: I039276385de74192375f36b1504dd89cb8ae0c52
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
2638f7216de92f254a50dd55be1539f1c6b23552 04-Apr-2017 Emilian Peev <epeev@google.com> Camera: Advertise AE/AWB locks in case they are supported

AE/AWB lock availability is present in the camera static metadata.
Check whether they are supported before advertising them in Camera
Parameters.

Bug: 33091727
Test: Complete CameraTest CTS
runtest -x cts/tests/camera/src/android/hardware/cts/
Change-Id: I9a8cc8ffcc28b6b476904c3c011ab0ec65b162c9
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
ac3e2cce871b7cdbb0526d4af9d0bc477e795b2e 04-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Try to remove inflight requests during error notifications" into oc-dev
03857c4b5a029a588b647532e907a875026e593a 04-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: add buffer freed notification for output streams" into oc-dev
654be2e6354e4685393c8c1bc8408ae6579ce7dd 04-Apr-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: add buffer freed notification interface" into oc-dev
017d49c409af17a2e0ef3ca48fadb1b5a5ec3fe4 01-Apr-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: add buffer freed notification for output streams

Test: ReprocessCaptureTest fixed
Bug: 34461678
Change-Id: Icd5af79a8f7fc35b0a040c57a639ae6777e71024
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
ff4e56e96d3d84ad6431c57bc473d8d028890d77 04-Apr-2017 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Map between bufferqueue gralloc0 usage, and HIDL gralloc1 usages" into oc-dev
be83fa713da45b1c751d33ad69ce0017ebe9f707 30-Mar-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: add buffer freed notification interface

To cleanup caches of obsolete buffers.
This CL addressed the input stream bit, the output
stream hook will be a followup CL.
Also cleanup some dead API in CameraDeviceBase.h

Test: fix CTS ReprocessCaptureTest
Bug: 34461678
Change-Id: I801cd81c29becaa45630ed0a5c2dab8df1278a6a
ommon/CameraDeviceBase.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3InputStream.cpp
evice3/Camera3InputStream.h
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
evice3/Camera3StreamBufferFreedListener.h
evice3/Camera3StreamInterface.h
ba0fac313cc2451681f62a398253c2c01c1c61e7 30-Mar-2017 Emilian Peev <epeev@google.com> Camera: Try to remove inflight requests during error notifications

Make it possible for clients to clear the internal inflight queue
as part of error result notifications. For this to work all pending
buffers must be returned previously with the exception of the
result metadata.

Bug: 35652756
Test: Complete Camera/Camera2 CTS without any regressions.
Change-Id: I9d8a6b63364fd254311cda2f8c836b99ee05cacb
evice3/Camera3Device.cpp
b5df547bce900fa5764d735bee304e79c001d60d 21-Mar-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: HAL1 recording batching support

Test: Angler HAL1 + batching normal recording mode
Bug: 35997432
Change-Id: If088715ccdb40163f44150c16deed62432692c07
ameraFlashlight.cpp
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/CameraClient.cpp
pi1/CameraClient.h
evice1/CameraHardwareInterface.cpp
evice1/CameraHardwareInterface.h
1a2f15daf13552e86324025cf6d31d887cd8fa02 23-Mar-2017 Eino-Ville Talvala <etalvala@google.com> Camera: Map between bufferqueue gralloc0 usage, and HIDL gralloc1 usages

Otherwise some bits aren't where they're supposed to be.

Also stop using HW_CAMERA_ZSL; we need to only set HW_CAMERA_READ, and it's
confusing to set a producer flag on the consumer usage side.

Test: Camera CTS passes
Bug: 35215313
Change-Id: I23e6e60bf875fe9d8f2d7a1f805d2ef854c16b97
ndroid.mk
pi1/client2/ZslProcessor.cpp
evice1/CameraHardwareInterface.cpp
evice1/CameraHardwareInterface.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3OutputStream.cpp
be3d40cadb8490291512a6d7882791dda9104316 27-Mar-2017 Emilian Peev <epeev@google.com> Camera: Update 'indexOfKey' return check

Method 'indexOfKey' will return 'NAME_NOT_FOUND' error
status in case it doesn't find any values matching the
given key. Checking for anything other than this error
code could lead to instabilities.

Bug: 35925482
Test: Manual using application
Change-Id: Ie72eb29776b27a6d485f6e42ee7e62c62795ca9e
(cherry picked from commit 4219c290e526c6cb1767038776fff4f9b5d74cc7)
evice3/Camera3Device.cpp
abd441afaa247044a6849c66a41fb025dcb5c811 25-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: fix FlashLightTest"
dc3134e3f612050ae2c8a0d847bf091c53ed2f4c 23-Mar-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix FlashLightTest

Fix issues related Treble HAL1 path.

Test: FlashLightTest pass on Angler HAL1/module 1.0
Bug: 35674539
Change-Id: I6bd749464c0e6e437a4743d2d66a0a5f54cdba38
ameraFlashlight.cpp
ameraFlashlight.h
ommon/CameraProviderManager.cpp
ommon/CameraProviderManager.h
afa8a910f065246c8c59386b8b0d9d96669ac85c 15-Mar-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Do not crash if detachNextBuffer fails

Test: Camera CTS
Bug: 33777818
Change-Id: I965d741df6ce6bdb701dbe1d721cf42ea53c7a40
evice3/Camera3StreamSplitter.cpp
e8ecda97764c45c86f71b50f7eff3e30ee9f540c 21-Feb-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Allow different kinds of IMPLEMENTATION_DEFINED surfaces to share

Do not guard against mismatching usage flag and data space for
IMPLEMENTATION_DEFINED formats, so that different formats can share
the same stream if HAL support is available.

Test: Camera CTS
Bug: 33777818
Change-Id: I62a1f458c06ae417c9a2c407d433319a1158fdcc
pi2/CameraDeviceClient.cpp
e8e9e191502ce306a04221e10ea2fe06ee40cacb 16-Mar-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix number of cameras logic

Test: no Camera CTS regression
Bug: 36289841
Change-Id: I7218347a0f2e8184dd43a9f35acc0554b761e15e
ommon/CameraProviderManager.cpp
ommon/CameraProviderManager.h
94c68e09c9a9f30a68ce46b5efb5795fccb34616 06-Mar-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: add batching support for HFR

Test: GCA slow motion recording workin
Bug: 34899394
Change-Id: Icf56458d3fa6f0b4a6b8cfffe6a61da0626e81ec
evice3/Camera3Device.cpp
evice3/Camera3Device.h
403044af4352f6d56aef0fb9548d2bfce56d3127 27-Feb-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Fix error check for HFR timestamp

With Camera HAL sending empty metadata for HFR batching, service
shouldn't check matching timestamp for empty metadata.

Test: Manually test high speed recording
Bug: 35775704
Change-Id: I68f3c16ea9a91f15c70e406540764b02cb6951e1
evice3/Camera3Device.cpp
8ce2339cb7dc61e5fac5af90ce73716dc9e3ba52 17-Mar-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Send shutter and result once per batch"
b96b515ac582b05c4be87956d4f4a55f943ed7ae 14-Mar-2017 Eino-Ville Talvala <etalvala@google.com> Merge "CameraProviderManager: Handle transaction errors, HAL process death"
8d942f9a5c5affcdc6f1138d4ce3bac4b7ee53d5 13-Mar-2017 Eino-Ville Talvala <etalvala@google.com> CameraProviderManager: Handle transaction errors, HAL process death

- Register and handle camera provider deaths
- Check for transport errors on all provider calls
- Clean up provider callback locking

Test: No camera CTS regressions
Bug: 35096594
Bug: 35441122
Change-Id: I08117f38f5201368a28093debdbcae67a68a4e7
ameraService.cpp
ommon/CameraProviderManager.cpp
ommon/CameraProviderManager.h
5ff9c91a90d7d5fad49de38bc314910251b25774 10-Mar-2017 Steven Moreland <smoreland@google.com> cameraservice: remove String\d+::std_string

Part of removing libc++ from libutils.

Bug: 35363681
Test: pass
Change-Id: Iae07bb7a5e3ce4794e0b999249c2e101e860e64a
ameraService.cpp
evice1/CameraHardwareInterface.cpp
evice3/Camera3Device.cpp
2752e5b66ac80b5d6bcba1db186f29f86722956b 28-Feb-2017 Mathias Agopian <mathias@google.com> fallout of getting rid of IGraphicBufferAlloc

Test: compile & run
Bug: cleanup
Change-Id: Ifba0668d798c523c556ca7dae2c172711a256b05
evice3/Camera3BufferManager.cpp
evice3/Camera3BufferManager.h
4a472663e85585403ad0d15e1bf5b37c10628dd0 27-Feb-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Send shutter and result once per batch

For High Speed Recording, only send the shutter and result for the last
request in the batch, and count on the application process to derive
other results in the batch.

This reduces the binder transaction between the two processes, and saves
power.

Test: Manually test high speed recording with GCA, and CTS
Bug: 35775704
Change-Id: I3e1b4c1db3d1d1044400d825e2affa4461362b39
evice3/Camera3Device.cpp
evice3/Camera3Device.h
e7091aa805f44bc030235b4f5de12c151a35312a 08-Mar-2017 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Fix regression to old camera API operation.

When Camera2Client uses Camera3Device, it operates with lazy stream
configuration (in which streams are configured only once a capture
request is going to actually be sent). In this path, the operating
mode may never get set to a valid mode, and thus always fail
stream configuration.

Ensure that all paths calling into configureStreamsLocked set the
appropriate operating mode.

Test: Actually no camera CTS regressions this time, honest!
Bug: 34853980
Change-Id: I6e1855206f6d76cca5ff8348555b26bd7b868843
evice3/Camera3Device.cpp
evice3/Camera3Device.h
bbbbe84b3a7296c9c3266bb16e0dc98b11cb5939 01-Mar-2017 Eino-Ville Talvala <etalvala@google.com> Camera: Allow direct selection of operating mode

Instead of a true/false switch for high-speed mode, use an integer
enum instead and define the two existing modes, plus the start
of a vendor mode space.

For all non-high-speed modes, use the normal configuration path,
but pass the operating mode to the HAL.

Test: New CTS test passes
Bug: 34853980
Change-Id: I9dc2b2a2164e9779f079a30e936c4117bcf96efe
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/CameraDeviceBase.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
05d19b08f3affa6fa8407e779f67e7ad1c1ca84f 01-Mar-2017 Mathias Agopian <mathias@google.com> fallout of cleaning-up libutils includes

Test: run & compile
Bug: n/a
Change-Id: I63585ed5a764b9ce7af2187b79ca0c83e683fd7f
pi1/CameraClient.cpp
evice3/Camera3StreamSplitter.cpp
14b3b1200341103081ede8a4ce7f09eae29ac99a 03-Mar-2017 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: camera service HAL1 HIDL path"
4717c470bf989e02f798857358471f8feb77660f 13-Feb-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: camera service HAL1 HIDL path

Bug: 32991422
Test: Camera CTS pass (except FlashLightTest)
Change-Id: If6668540d9b24696031c893f3fa257cd294d773c
ndroid.mk
evice1/CameraHardwareInterface.cpp
evice1/CameraHardwareInterface.h
fc9c52f773827a08d37af018b7368bda91a5e791 28-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Rework StreamSplitter for camera use cases"
6566536c89a9e8646404bd2e671e3e081c181b4a 24-Feb-2017 Eino-Ville Talvala <etalvala@google.com> Cameraserver: Use multiple hwbinder threads

Some interactions between camera service and hwservicemanager require
multiple threads to execute without deadlocks, such as calling
getService() from within an onRegistered() callback.

Increase thread count to 3 to accomodate.

Also switch the order of listener registration and legacy provider
addition back to what it was originally.

Test: No deadlock when camera service is restarted
Bug: 35096594
Change-Id: I6def961d5765958fef284c0a1820e903abc851ef
ommon/CameraProviderManager.cpp
bee0f0a5e7aa19aa7c59de03b508985b68bc6b5e 24-Jan-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Rework StreamSplitter for camera use cases

- Merge notifyRequestedSurfaces into getBufferLocked, so that during
getBufferLocked, the stream splitter gets to know which outputs the
current request is on.

- Reserve buffer slot in the output queue during getBufferLocked instead
of during onFrameAvailable. So if there is no slot/buffer available, no
new request is sent to HAL. This aligns with current cameraservice logic.
Do not hold the lock while calling attachBuffer to output queue because
it could block for a slow consumer.

- Instead of setting the consumer buffer count of input buffer queue to
maximum of all shared outputs, set it to sum of them. By doing this,
In the case of a slow consumer, other consumers sharing the same stream
won't be impacted.

- Handle the case where onBufferReleased not being fired for buffer
replaced by attachBuffer/queueBuffer.

- Add function to check the return value of onFrameAvailable so that
when output is abandoned, the error code is propagated back to
queueBuffer.

Test: Camera CTS, and CTS with StreamSplitter enabled for all
implementation defined use cases.
Bug: 33777818
Change-Id: I863f501d5283bbe70c71e66b4d37d690484b90fa
pi2/CameraDeviceClient.cpp
evice3/Camera3Device.cpp
evice3/Camera3DummyStream.cpp
evice3/Camera3DummyStream.h
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
evice3/Camera3OutputStreamInterface.h
evice3/Camera3SharedOutputStream.cpp
evice3/Camera3SharedOutputStream.h
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
evice3/Camera3StreamInterface.h
evice3/Camera3StreamSplitter.cpp
evice3/Camera3StreamSplitter.h
5d7e5151e2572413fa7e30a8f65beadd89f45416 22-Feb-2017 Emilian Peev <epeev@google.com> Camera: Avoid possible race condition during provider init

The current sequence of registering for provider notifications
and trying to add a legacy provider could introduce a race
condition leading to a deadlock. The "onRegistration" callback
will try to acquire "mInterfaceMutex" which is still held during
the execution of "addProvider" for legacy. However "addProvider"
could get suspended waiting on the HIDL provider interface. If this
happens and the same thread that unblocks the service query tries
to notify the provider manager, then we will end up in a deadlock.
To avoid this, the initialization sequence can be modified a bit.
First add the legacy provider and then register for notifications.

Bug: 35096594
Test: Manual using stop/start of cameraserver
Change-Id: Ia381ae6bf567525cabd3f51246a192ddac37b7f8
ommon/CameraProviderManager.cpp
20bd4b508cddd60818822ff2f71d1082bb0de477 21-Feb-2017 Steven Moreland <smoreland@google.com> Remove unused includes.

Found while debugging 35096594.

Test: pass
Change-Id: I9d637ea4fc2cdb57afebdb299e4c890a9d814333
ameraService.cpp
ommon/CameraProviderManager.cpp
bc1713d3b85d7ce656e032da6e4b6b342f14db03 14-Feb-2017 Mathias Agopian <mathias@google.com> fallout of splitting rect.h out of libandroid.

A lot of media makefiles didn’t specify libui or
libgui but included headers from these libraries
directly.

It works because these headers are on the global
include path. With this change, though, rect.h
is not anymore (albeit exported from libui).

Test: built and booted device
Bug: 35164655
Change-Id: I72e8f0b7bd25c6a67eedc17afe52c4c484a147fe
ui/RingBufferConsumer.h
88fd00509164dc46a98ff2921c956e2d37919117 10-Feb-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Allow finalizeOutputConfiguration not adding new surface

If the application calls finalizeOutputConfiguration without adding new
surface, as long as there is at least one surface in the
OutputConfiguration, do not throw exception.

Add logic to not allow finalizeOutputConfigurations twice on a
particular stream.

Test: testDeferredSurfaces cts and GoogleCameraApp manual test.
Bug: 35137641
Change-Id: I96061231e9b884e73c92520e7f2c021db32fa731
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
2d6140b8dce137f89029b12468e25d5911f23420 13-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge changes from topic 'api1_zsl_rework'

* changes:
Camera2: Add native test for framework-backed ZSL
Camera: Rework ZSL path when using API1 with HAL3
d1adbd51e6450a8ee1770921e3b99e91ecc1be4f 10-Feb-2017 Mikhail Naganov <mnaganov@google.com> Merge "audioflinger: Adjust priority of hal threads"
83f042776b131b149f803fff6ab184ae2c4d98cd 07-Feb-2017 Mikhail Naganov <mnaganov@google.com> audioflinger: Adjust priority of hal threads

HALs are prohibited from using framework binder, and there is
no equivalent scheduling policy service in hwbinder. Thus, in order
to match priorities of FastCapture / Mixer threads with their
counterparts in the HAL, it is needed to request the priority boost
from audioflinger on behalf of the HAL.

Test done to verify the priority was correctly set.

Bug: 34131400
Change-Id: If8b6b031c0fcba771fae901a5b8e7da89b3a1570
Test: check priority match between audioflinger's and hal's threads
evice3/Camera3Device.cpp
e2ce9366d1b138326035c643b7fec68cd2dc83c5 09-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: Check for invalid camera during API version calls"
9aa1dcbccba23378312e63bb0dd2cbe4ef4cb1f9 08-Feb-2017 Mathias Agopian <mathias@google.com> Merge "Add missing includes"
2f140ed90057ca0df3f9da8318241ecfb6dda9eb 08-Feb-2017 Zhijun He <zhijunhe@google.com> CameraService: don't skip device dump when there is no client

We shouldn't skip the device metadata dump when the camera is not
in use.

Test: adb shell dumpsys media.camera works
Bug: 35125905
Change-Id: I26e2a612efa55b3289adb160c90d3fbc95bb4085
ameraService.cpp
28ad2eae9ac86df397b27d27fcc92d2c893138af 07-Feb-2017 Emilian Peev <epeev@google.com> Camera: Check for invalid camera during API version calls

CTS test case 'testCameraManagerInvalidDevice' will try
to query the static characteristics of invalid devices.
The supported camera API will also get checked as
part of the current call flow. A camera device access
exception will be thrown which is not expected. The
correct exception should be "IllegalArgumentException".

BUG: 35095452
Test: run cts -m Camera -t
android.hardware.camera2.cts.CameraManagerTest#testCameraManagerInvalidDevice
-d -o --abi armeabi-v7a --disable-reboot
Change-Id:I055deea116d5f3a69ed1a47b00d820be88a87232
ameraService.cpp
01d56fe3fcad97dbed15093e03d6f50eca9fbef9 08-Feb-2017 Mathias Agopian <mathias@google.com> Add missing includes

Test: compiled
Bug: not applicable
Change-Id: Ie4007970f83e5d08b2d35e78a49d93d696809d7b
evice3/Camera3BufferManager.cpp
evice3/Camera3BufferManager.h
8131a26957de26f15c6b41a64eb299ff61888e88 01-Feb-2017 Emilian Peev <epeev@google.com> Camera service: Update client eviction priorities

Use both oom score and process state for client eviction.
The score will have higher priority over the process state.
This should resolve the state ambiguity when PiP clients
try to connect to exclusive camera resources while
foreground clients are running.

BUG: 34701266
Test: Manual testing, complete CTS Camera package
Change-Id: Ic775b011a20e50f9c0c1c0a4bc1cf7ca75410740
ameraService.cpp
ameraService.h
tils/ClientManager.h
2d16ffaae63051b5faf7c39a455c6d5af0226377 24-Jan-2017 Emilian Peev <epeev@google.com> Camera: Rework ZSL path when using API1 with HAL3

Currently this path relies entirely on the deprecated bi-directional
streams. This needs to be re-worked and the functionality should
only use input&ouput streams. In this case the dedicated
'Camera3ZslStream' module becomes mostly obsolete. Some of the logic
for buffer comparison will still be needed and can be moved to ZSL
processor entirely.
The processor module will now use two streams, one input stream and
one ZSL output stream, which will produce the queue data. Both of
them will be configured to use the supported sensor array size and
private format. Scaling from the sensor resolution to the final user
requested size will happen during the re-process pass once image
capture gets triggered.

BUG: 34131351
Test: Manual via TestingCamera, 'CameraTest' API1 test cases
Change-Id: I7c87b7e7f89815e01a7cb5ce39d9c561c58562df
ndroid.mk
pi1/client2/Parameters.cpp
pi1/client2/ZslProcessor.cpp
pi1/client2/ZslProcessor.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3ZslStream.cpp
evice3/Camera3ZslStream.h
03904c44cdf8ce30333d7e96e3eda959e5a8c208 02-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: StreamSplitter: Return overwritten buffer to input"
ec0a5ac45728bc610e0266ec1a21d65ac340562a 02-Feb-2017 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3Device: Update frame counters/timestamps for dumpsys info"
2987b83c782667dd3740f731268fe3372c343fce 01-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera service: Fix dump() for treble path and rearrange it"
aadc336983e503f1b86533eb910f693383711b6a 01-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera service: Clean up dump() command indenting."
c31dc7e61eb37214ad186f6a2bc43d7b92bd236e 01-Feb-2017 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Update frame counters/timestamps for dumpsys info

For output streams, increment frame count and update timestamp when a
filled buffer is queued to the output buffer queue.

For input streams, increment frame count and update timestamp when a
buffer is acquired from the input buffer queue.

Test: Manual inspection of adb shell dumpsys media.camera while
running DevCamera
Change-Id: I8dc1d134baf5ad467e169f3ba6ffe0d1486df9dc
evice3/Camera3InputStream.cpp
evice3/Camera3OutputStream.cpp
d00111e3b0c2ee59736fda992dd9ea24b23ef46a 31-Jan-2017 Eino-Ville Talvala <etalvala@google.com> Camera service: Fix dump() for treble path and rearrange it

Get camera service dump working again in the Treble path, and clean
up the formatting a bit

- Switch to dprintf instead of write() for most dump calls
- Add clearer headers for each section
- Add static metadata details to CameraProviderManager dump

Test: adb shell dumpsys media.camera with Treble both enabled and disabled
Bug: 32991422
Change-Id: Ie1d431b68649777bfe84fbb1be0687dd02e671af
ameraService.cpp
pi2/CameraDeviceClient.cpp
ommon/CameraProviderManager.cpp
evice3/Camera3Device.cpp
tils/CameraTraces.cpp
8131418cf06d38431aff416f1d38ec011d4259ee 31-Jan-2017 Eino-Ville Talvala <etalvala@google.com> Camera service: Clean up dump() command indenting.

In preparation for fixing dump() for Treble codepath.

Test: Compiles
Bug: 32991422
Change-Id: I1d889361e4836b75483e066b97de4015a2ef84cf
ameraService.cpp
a1ee4c28facd2e4ae0eb288178c8988bf1806148 01-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera: remove wait for remote HIDL interface"
4c5b1c777680df26af1d28624b99f8388fb9df4c 31-Jan-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: remove wait for remote HIDL interface

The new getService implementation does it.

Test: fixing Marlin flashlight control
Bug: 34821019
Change-Id: Ifd21f41313b85ef0abbd306d2862524e19b94e7d
ommon/CameraProviderManager.cpp
ommon/CameraProviderManager.h
6963d0ad7b621dcdaa74cbfed17c776121635146 31-Jan-2017 Eino-Ville Talvala <etalvala@google.com> CameraService: Fill in missing facing information in Treble path

getDeviceVersion(), for whatever reason, also optionally returns the
facing of the specified camera device. The latter part was left
out of the Treble path implementation, resulting in incorrect
display orientation calculations higher up the chain.

Also add checks for invalid facings returned by getDeviceVersion so
that error logs will point this out next time.

Test: Manual inspection: API1-based applications do not have upside-
down preview. API1 CTS passes.
Bug: 34816614
Change-Id: Ice4c644e504f59e7df9be6636d9e6a3b38c52d4b
ameraService.cpp
78b3ee27f696980c999c9ac5db87e626ff6f717f 28-Jan-2017 Eino-Ville Talvala <etalvala@google.com> Merge "Camera service: Switch to HIDL by default, add prop to disable"
9cbbc837625cced18adabc57d71479044999155d 24-Jan-2017 Eino-Ville Talvala <etalvala@google.com> Camera service: Switch to HIDL by default, add prop to disable

On camera service startup, use the HIDL provider codepath unless the
system property "camera.disable_treble" is set to true.

The system property is needed until the HALv1 implementation is
complete and the emulator can switch over, as well as for devices not
yet tested in passthrough mode.

Whether passthrough or separate-process HAL is used depends on the
services and libraries available on each device.

Test: Camera CTS on angler, bullhead, sailfish, ryu. HFR performance
test on sailfish. Basic operation of camera app.
Bug: 32991422

Change-Id: I3dd580cbcddd0df2e6b1e422920aa84270286e0a
ndroid.mk
ameraService.cpp
a141c5f3cc2214a96f250999edacc3bd4d454601 24-Jan-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: StreamSplitter: Return overwritten buffer to input

For Async buffer queue, if a pending buffer is overwritten by an
incoming buffer, onBufferReleased callback isn't called. But the stream
splitter depends on the onBufferReleased to return buffer to input.

Fix the problem by checking the bufferReplaced flag in
QueueBufferOutput.

Test: Camera CTS
Bug: 33777818
Change-Id: I270c7bae7873797ae9b050782828b5a124d3eff9
evice3/Camera3StreamSplitter.cpp
evice3/Camera3StreamSplitter.h
758c215374dba397dabe17b8e96dd38593c09dd7 11-Jan-2017 Shuzhen Wang <shuzhenwang@google.com> Camera: Combine handling of deferred surface and shared surface

- Refactor the OutputConfiguration to contain isDeferred and isShared
flag, and not contain NULL surface.
- Unify the handling of deferred surface and shared surface.

Test: Camera CTS, and manual testing of GoogleCamera use cases
Bug: 33777818
Change-Id: I5dd3472f0f2133699b0e9fbdd8ba456956222746
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/CameraDeviceBase.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3DummyStream.cpp
evice3/Camera3DummyStream.h
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
evice3/Camera3OutputStreamInterface.h
evice3/Camera3SharedOutputStream.cpp
evice3/Camera3SharedOutputStream.h
evice3/Camera3StreamSplitter.cpp
evice3/Camera3StreamSplitter.h
f3a8a2392e5dadee8afa51d384da008ae22b4091 18-Jan-2017 Yin-Chia Yeh <yinchiayeh@google.com> Merge changes from topics 'cam-hidl-fence', 'camera-hidl-bufId'

* changes:
Camera: wait for remote camera provider
Camera: setup vendor tag in binderized mode
Camera: treble: close acquire_fence
Camera: pass bufferId to HIDL interface
addae1cfa92c3bae2b59917160da5520d2a25865 18-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "camera2: Add support for secondary surface for stream"
6540509f9180bbaf9b0a76bc061ea3c0d7f8dbb8 14-Jan-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: wait for remote camera provider

Before we attempt to get passthrough implementation.

Test: run binderized camera HAL mode with Camera2 CTS.
Bug: 34250977
Change-Id: I5ef81429c85e7761e60541d1a8764b4e6d58b24a
ommon/CameraProviderManager.cpp
ommon/CameraProviderManager.h
067428c5a8429d711f94bf008debde29ac118849 14-Jan-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: setup vendor tag in binderized mode

Bug: 34275821
Change-Id: I0472ab3d68279129a8713d4862de8e4608e7a5f7
ameraService.cpp
ommon/CameraProviderManager.cpp
ommon/CameraProviderManager.h
f4650601b4615f6a28727c1ad6bc956fd5ea532c 10-Jan-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: treble: close acquire_fence

This is to make the behavior agnostic to passthrough/binderized
mode.

Test: running API2 CTS
Bug: 30985004
Change-Id: I48ce307f8566ff0a2a5b35763e1a37733e6ed9a0
evice3/Camera3Device.cpp
evice3/Camera3Device.h
773270525f68bdb706b85c3cd6e3750f27ca6d11 10-Jan-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: pass bufferId to HIDL interface

This gives each buffer a unique ID and save some time sending
buffer_handle_t to HAL process.

Bug: 30985004
Change-Id: Idf0d3edde94e1331cadb271dce3e4bed8bfb8c14
evice3/Camera3Device.cpp
evice3/Camera3Device.h
0129d52df9794d6fdf06be304722b5cb51a2eab5 31-Oct-2016 Shuzhen Wang <shuzhenwang@google.com> camera2: Add support for secondary surface for stream

- Enhance OutputConfiguration to contain multiple surfaces for one
underlying stream.
- Create Camera3SharedOutputStream to handle streams with multiple
surfaces.
- Create Camera3StreamSplitter to handle buffer flows between camera and
multiple consumers.

Test: cts, and manually test camera preview/snapshot/recording
Bug: 33777818
Change-Id: Ia010c3cc9d9b4bd5b9ea03cc42fe4e0a0d8033f1
ndroid.mk
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/CameraDeviceBase.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3DummyStream.cpp
evice3/Camera3DummyStream.h
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
evice3/Camera3OutputStreamInterface.h
evice3/Camera3SharedOutputStream.cpp
evice3/Camera3SharedOutputStream.h
evice3/Camera3StreamSplitter.cpp
evice3/Camera3StreamSplitter.h
dce65c8103a8e8c3267590e90c5141d6bf842872 07-Jan-2017 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix API1 HAL3 path

1. Disable the ZSL path for now
2. Add the missing provider version of initialize()

Test: All API1 CTS passing
Bug: 32991422
Bug: 34131351
Change-Id: I437a00db44c4fbb836875040fd4a91e1abbab734
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/client2/Parameters.cpp
52778d448123c185fd30cd77e84659fab966d740 23-Dec-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: patching camera service for treble

Bug: 30985004
Change-Id: Idf3ec26abb6b10a0e3839e301e84c8b05ac165c5
ameraService.cpp
ommon/CameraProviderManager.cpp
ommon/CameraProviderManager.h
evice3/Camera3Device.cpp
0b1cb14c804d7d4343fe91c78578da8db9a678d5 20-Dec-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Update camera service to use new HIDL HALs, part 2

- Use string for device ID in Camera3Device
- Remove camera3_device_t parameter from Camera3Stream::finishConfiguration
- Disables ability for the stream to register buffers
- This means device HALv3.0 and v3.1 are no longer supported
- Add HIDL support to Camera3Device:
- Add HalInterface class to abstract whether legacy or HIDL HAL is in use
- TODO
- CameraHardwareInterface
- Switch to using HIDL definitions instead of camera3.h definitions in
main body of code

Test: Compiles
Bug: 30985004
Bug: 32991422
Change-Id: I9c3c0f7b7ea5d1d74e14b1d882779e3b9445da69
ommon/CameraDeviceBase.h
ommon/CameraProviderManager.cpp
ommon/CameraProviderManager.h
ommon/FrameProcessorBase.cpp
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
evice3/Camera3StreamInterface.h
2f09bac6632a5ee27ee14baa2aa1367f16b5b013 13-Dec-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Update camera service to use new HIDL HALs, part 1

- Add CameraProviderManager
- Enumerates individual camera provider HAL instances, as well
as the devices they provide
- Handles dynamic provider and device appearance/disappearance
- Maps device names to public API namespace
- Add unit tests for CameraProviderManager
- Add logic to enable new HIDL path
- Switch various bits of service internals to use string camera IDs,
though leaving most camera1-facing bits using int IDs, since that's
what the old API uses.
- Update CameraService to use CameraProviderManager instead of
the legacy camera HAL
- Update clients to pass through provider manager to devices instead
of just camera module
- Still TODO:
- Update Camera3Device to use new HIDL interface
- Update CameraHardwareInterface to use new HIDL interface
- Update dump()
- Update vendor tag handling

Test: New unit tests pass, camera CTS passes with Treble disabled
Bug: 30985004
Bug: 32991422
Change-Id: I7ac41f13b9501d5e53256e28c0465ec70aa3980e
ndroid.mk
ameraFlashlight.cpp
ameraFlashlight.h
ameraService.cpp
ameraService.h
pi1/Camera2Client.cpp
pi1/CameraClient.cpp
pi1/CameraClient.h
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.h
ommon/CameraDeviceBase.h
ommon/CameraProviderManager.cpp
ommon/CameraProviderManager.h
evice1/CameraHardwareInterface.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
ests/Android.mk
ests/CameraProviderManagerTest.cpp
f51fca277eb5b86bd0b2e3fc90ecb2b63089de29 13-Dec-2016 Eino-Ville Talvala <etalvala@google.com> Camera service: Updates in preparation for HIDL

- For all camera2 paths, and anything shared between the legacy API and
camera2, switch to using strings for camera IDs
- Update ICameraService.addListener to return current set of known
devices and their status, to allow for immediate return of camera
devices when first connecting to camera service
- Remove unused code path for getCameraCharacteristics with HALv1
- Add namespace qualifiers to Binder objects that are also used by
hardware binder.
- Switch to using new HIDL DeviceStatus and TorchStatus enumerations
for better type safety in the service; map more clearly between
the HAL, service-internal, and Binder enums.

Test: cts-tradefed run cts -m Camera --skip-connectivity-check -d -o --abi armeabi-v7a --disable-reboot
Bug: 32991422
Change-Id: I765951d9a21000a8432bed9aa0e3604709daa4b1
ndroid.mk
ameraService.cpp
ameraService.h
f4db13db84c40299de4f9997f08d05259bdb8716 08-Dec-2016 Eino-Ville Talvala <etalvala@google.com> Camera service: Speed up camera service startup on boot

In the common case, cameraserver starts before system server, which
contains the proxy camera service. This means that
getCameraServiceProxy() will wait for the proxy to be up (or time out
after 5 seconds). Since the proxy will call the camera service once it
is up and running, there's no reason to block.

Switch to checkService() instead of getService() to remove this timeout
and fail immediately.

Test: Manual: Build and boot phone; confirm that camera functions normally
Change-Id: I03596c18b13c68b5bcb15ee71de465cd14fba4de
ameraService.cpp
96626b7f9a4e5c9e1e04f7f710383631d1470364 01-Dec-2016 Marco Nelissen <marcone@google.com> Use property_get_bool where possible

Make handling of boolean properties more readable and consistent by
using property_get_bool instead of parsing the result of property_get

Change-Id: I8490d0f0b41a92eab5131e0aac0ecdf704a63381
pi1/client2/Parameters.cpp
0bdd9ffd24b266b3b8c79a82db871bf22436ceba 30-Nov-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix camera facing override logic am: 13cd59a7ea
am: e67f6da367

Change-Id: Ie356c8cf4f0b15cce677ecc5e5954b97bea775c0
e67f6da3673a6596a1058598c6cd4a9ed9cfdf15 30-Nov-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix camera facing override logic
am: 13cd59a7ea

Change-Id: Id2f4f8a02843ad90cd4a61d1223346361e88e18a
13cd59a7ea9110546088e76f9c844503fa638850 29-Nov-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix camera facing override logic

Test: hack existing HAL to report EXTERNAL and run cts
Bug: 33091893
Change-Id: Idae8742fb4b18b2ef4842ec66284268fc650df22
ameraService.cpp
7fd5bdb5fa9db81f0293793b7b6d45dd833d05b2 23-Nov-2016 Yunlian Jiang <yunlian@google.com> fix warning The left operand of '!=' is a garbage value

The 'res' is uninitialized if params.state == Parameters::PREVIEW.
This sets the default value to 'OK' to silence this warning.

Bug: None
Test: Run clang-tidy on this code and the warning is gone.
Change-Id: I9d1b5e09c7957813f3c66d052c6a9f7d4b074b84
pi1/Camera2Client.cpp
81d472ef3635bcf5cf05e4567f715c52f2cf3b22 17-Nov-2016 Jinguang Dong <dongjinguang@huawei.com> Merge "Camera3: Add missing mTriggerMutex lock" am: ad4663c5a5 am: fa43b5468f am: 51c4a65f5c
am: ce85a6975b

Change-Id: I0b2995ef33ae80eebb32085fd42a81d868aeb8aa
ce85a6975b2b416c8c267265f47ad32f924c0556 17-Nov-2016 Jinguang Dong <dongjinguang@huawei.com> Merge "Camera3: Add missing mTriggerMutex lock" am: ad4663c5a5 am: fa43b5468f
am: 51c4a65f5c

Change-Id: I0fbb1098a246db4dd2b0a6b9720dea275be23a42
fa43b5468f93af356297b5e2f381274d4b484ece 17-Nov-2016 Jinguang Dong <dongjinguang@huawei.com> Merge "Camera3: Add missing mTriggerMutex lock"
am: ad4663c5a5

Change-Id: I59b7de9cdd9f608afa503293947a19d3f11d533b
b26e7a07894882f8cef2c6b0127106e649f22d42 14-Nov-2016 Jinguang Dong <dongjinguang@huawei.com> Camera3: Add missing mTriggerMutex lock

There is thread safety problem for mTriggerMap in
Camera3Device::RequestThread::clear(). For correctness,
acquire mTriggerMutex before mTriggermap.clear().

Test: 1. Configure power saving mode to 2 seconds by
modification software;
2. using pyhon or monkey to turn on the screen every 4
second;
3. device doesn't crash any more on loop test.

Change-Id: I2f04e21dae3a9879d6cebfefb9d9c191ef3f4df4
evice3/Camera3Device.cpp
4b2f81808a3d6600ead4d51d0f5a0eba4a7ee6fe 26-Oct-2016 Craig Donner <cdonner@google.com> Use layered version of graphic buffer allocation calls.

Allocators now require a layer count, but in these cases we can
assume that a single layer is sufficient, since that's what they
effectively do now.

Bug: 31686534
Test: manual
Change-Id: Ic22f56f8dbbf5bca01ad21421d12faac95783de7
evice3/Camera3BufferManager.cpp
c0fff7e64a3205ec7e91eae4cbd7926813ae70f8 08-Nov-2016 Shuzhen Wang <shuzhenwang@google.com> Camera: Clear not-yet-submitted request in cleanupFailedRequest am: cadb330fd8
am: cc621decd5

Change-Id: Ic14af20f08280a4196388230040f8762b149bb7e
cc621decd54f2d469925de20f33812f2464fc313 08-Nov-2016 Shuzhen Wang <shuzhenwang@google.com> Camera: Clear not-yet-submitted request in cleanupFailedRequest
am: cadb330fd8

Change-Id: I655bdce42c508734a671c0f6f9ae8b668b8b2593
cadb330fd8b51d17b548e913651d13376ac2e3a5 04-Nov-2016 Shuzhen Wang <shuzhenwang@google.com> Camera: Clear not-yet-submitted request in cleanupFailedRequest

In case request fails for a burst, previous not-yet-submitted
requests that are put into mInFlightMap are never taken out.
This causes waitUntilDrained error.

Bug: 32466355
Change-Id: Icd28d465dca3f850938c13058c916efc477b0d2b
evice3/Camera3Device.cpp
evice3/Camera3Device.h
66ded7d95b9a2885b9750966f0ebdaa5082bf83d 04-Nov-2016 Marco Nelissen <marcone@google.com> Merge "Remove unneeded links with dynamic libraries" am: 46d0a5b493 am: 4f197ec220
am: b3250b0b8a

Change-Id: Ic1e29e8d1e91ab34c3b7d5f7ad3e25c48a150888
4f197ec220d2c9634429692dd37896233273111d 04-Nov-2016 Marco Nelissen <marcone@google.com> Merge "Remove unneeded links with dynamic libraries"
am: 46d0a5b493

Change-Id: Ica6dd538c30b9aeccddad229cb24ade4d82d2e4c
263506542fbe480ddb247597bdcef16c437b48dd 25-Oct-2016 Marco Nelissen <marcone@google.com> Remove unneeded links with dynamic libraries

Various media components were linking against dynamic libraries that weren't needed.

Test: built and booted

Change-Id: I7379506fd06d4e28e0eff0001fd073a2d3860f8e
ndroid.mk
59e450f2f51601259b787d202b7438f50c76bc0d 02-Nov-2016 Zhijun He <zhijunhe@google.com> Camera API1: don't pick wrong preview fps value am: 49aac43b4a am: 73952713b5 am: 341d2236fa
am: 3b5fa81889

Change-Id: I2d6d9a128623ebab42b023d45a57f48ad9d38fd2
3b5fa81889299181f3463504ddff9e091846e1ba 02-Nov-2016 Zhijun He <zhijunhe@google.com> Camera API1: don't pick wrong preview fps value am: 49aac43b4a am: 73952713b5
am: 341d2236fa

Change-Id: I504588f8f97a44c00725685a3808a312b98ca899
49aac43b4a323a8702d93b7cf878252905dc3987 01-Nov-2016 Zhijun He <zhijunhe@google.com> Camera API1: don't pick wrong preview fps value

Bug: 32556975
Change-Id: I69eb18abe191ae0f1e76f8b62daaf5717cce9669
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
51db74d1ab1366205e39c52ba3273a6cadab830a 01-Nov-2016 Zhijun He <zhijunhe@google.com> Camera API1: relax the fps check with some margin am: 84eb96049c am: b6d50049c7 am: aebb26a330
am: 36edfc5a6c

Change-Id: I3fe8e31d3a10833c8e40951ca1b3408002642586
36edfc5a6ce2257b8e6c50ea697319bdaccad1f5 01-Nov-2016 Zhijun He <zhijunhe@google.com> Camera API1: relax the fps check with some margin am: 84eb96049c am: b6d50049c7
am: aebb26a330

Change-Id: I1724e2690a8fe3b12887333cf5f3da84db7ac6fa
84eb96049ce0690334530ad916e22d6933c0223b 31-Oct-2016 Zhijun He <zhijunhe@google.com> Camera API1: relax the fps check with some margin

Some HALs may advertise slightly larger min frame durations, which
makes the supported fps check fail. Then, some supported fps range
may be missing in the supported preview fps range list.

Bug: 32544699
Change-Id: I1ed62b97d3d39e5d7f0e7c407c6cc482b8968373
pi1/client2/Parameters.cpp
7a987ecdab7e87f916fef28bf991a6183020f1b4 27-Oct-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Remove unneeded links with dynamic libraries"
7405dc62bbec9eed2384325db40ed95277217fa3 27-Oct-2016 Zhijun He <zhijunhe@google.com> Camera API1: filter out the unsupported preview fps range am: 4f5dc7799f am: c4bea30beb am: 34b27bc05f
am: 2e6d8d607f

Change-Id: I589c96f88b30dd062e922f3f086dd7dc6e8214a5
2e6d8d607fb3bd38d87fb7c1274680bbc4424398 27-Oct-2016 Zhijun He <zhijunhe@google.com> Camera API1: filter out the unsupported preview fps range am: 4f5dc7799f am: c4bea30beb
am: 34b27bc05f

Change-Id: I0593a3e694e6f8fa41b396cfbaaf4c7a4893ce7a
4f5dc7799f082d77e399d8beee7b017a02755cf6 26-Oct-2016 Zhijun He <zhijunhe@google.com> Camera API1: filter out the unsupported preview fps range

The advertised supported preview fps ranges need to be supported
by all preview sizes. This change does the check to make sure the
API1 doesn't over-advertise its capability.

Bug: 32360340
Change-Id: Iccd13967305f1d0a62b89da87070591bfb973bbf
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
c661ae6165338fd5f0bca50a63058b4bcd6def4b 25-Oct-2016 Marco Nelissen <marcone@google.com> Remove unneeded links with dynamic libraries

Various media components were linking against dynamic libraries that weren't needed.

Test: built and booted

Change-Id: I7379506fd06d4e28e0eff0001fd073a2d3860f8e
ndroid.mk
9d06601e54848f076b7472a376c672215cd70c46 30-Sep-2016 Shuzhen Wang <shuzhenwang@google.com> Camera2: Add onCaptureQueueEmpty callback

onCaptureQueueEmpty is called when the non-repeating request queue in
cameraservice becomes empty. Application can use this callback as a
trigger for a new request.

Test: testMultipleCapture in PerformanceTest.java

Bug: 29006447
Change-Id: Id21afd74381e0b70f924c6026025c91a8ffd5ee0
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.h
ommon/CameraDeviceBase.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
2f919a49511af0b8736f6edb43d7ce579470b259 12-Sep-2016 Chih-hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in camera." am: f9ee5183c8 am: beff1fb18b
am: 019e54142c

Change-Id: I1278af9e5244995c7fdbc4ee7a54314571b3df3f
019e54142c85031e5320ba9103e3558835dda04c 12-Sep-2016 Chih-hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings in camera." am: f9ee5183c8
am: beff1fb18b

Change-Id: I0f337390c99af8b300b28f8dfe60635290fc20b0
d19d994770a04f02c204affd29985c5aeaa58baa 29-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings in camera.

* Add explicit keyword to conversion constructors.
Bug: 28341362
Test: build with WITH_TIDY=1

Change-Id: I61f9b5b2b6e13e0c6561327bc8dfe69c9cfc5ba5
evice3/Camera3BufferManager.h
evice3/Camera3OutputStream.h
56b0c92009e76851ed3a161804117971b4defa4b 26-Aug-2016 Alex Deymo <deymo@google.com> Merge "Mark unused parameters as UNUSED in BRILLO." am: 1567662f5a am: 002a0ffe14
am: 744c307046

Change-Id: I3c43605f4a67c24c4651fdefc0c4319cec3da76b
744c3070464e9e32de8b60c425c722be4251d2aa 25-Aug-2016 Alex Deymo <deymo@google.com> Merge "Mark unused parameters as UNUSED in BRILLO." am: 1567662f5a
am: 002a0ffe14

Change-Id: I597292095289b14e1b2e4652e78344aa193bf26e
1567662f5a709398004cf509fb3f382f0c76f5b1 25-Aug-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Mark unused parameters as UNUSED in BRILLO."
83c1a98f774cc4e4e1546aaaba2fa13820f05b40 25-Aug-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: don't let dequeueBuffer block indefinitely" am: bbf70c5122
am: 3c2423173d

Change-Id: I0f813700d620b164e3347e14427d21df322826f7
9c2a2c26c0d70de97f51063b06a5efc79b327eed 25-Aug-2016 Alex Deymo <deymo@google.com> Mark unused parameters as UNUSED in BRILLO.

Bug: 31068444
Test: `make dist` in Brillo.

Change-Id: Ib0229ad78894fc703e9c5ad7bda4ab2466641f77
ameraService.cpp
f81b009d77466c5b3901d2c49b0fcc618e3d1592 02-Aug-2016 Zhijun He <zhijunhe@google.com> Camera3: don't let dequeueBuffer block indefinitely

The synchronous consumers (e.g. ImageReader) may be very slow when the
clients have computational intensive image processings. When system
load is high, these processing will be even much slower. This could
starve the producer side and then cause dequeue/attach buffer block
indefinitely. If clients intends to close the capture session, right
after a capture request is submitted, the waitUntil drain could be
blocked indefinitely if the capture request dequeue buffer call is
blocked indefinitely, as the request thread will never become idle until
the last dequeue buffer is done and the request is sent.This indefinite
getBuffer() blocking could easily trigger the waitUntilDrained 5s timeout
thus put the camera device into error state although there is nothing
bad happening in the HAL.

Introducing the timeout will avoid such bad situation. When consumer is
slow, there will be no new request being sent to HAL, as there is really
no new buffer available.

Bug:30404840
Change-Id: Ibf08d2745911203bce6f31130800707f36d7f985
evice3/Camera3Device.cpp
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
f5e60b1e798d15fc466f5f15a4db6920e4d0c2d1 25-Aug-2016 Alex Deymo <deymo@google.com> Merge "Silence warning about unused variables in BRILLO." am: bcd87f5969 am: ca59abe191
am: 205a224eee

Change-Id: Id4e0626842a3d9f170e29a364f4d31020172f233
205a224eeee3cb41395af783755c347bb6ce7a02 25-Aug-2016 Alex Deymo <deymo@google.com> Merge "Silence warning about unused variables in BRILLO." am: bcd87f5969
am: ca59abe191

Change-Id: Ic2e37c41dad8579cdcd28e6698fce991854c7962
eb4c32d20d43bb6a36dcbef9b995cd7871c1fa4d 25-Aug-2016 Alex Deymo <deymo@google.com> Silence warning about unused variables in BRILLO.

This patch moves the call to validateClientPermissionsLocked() outside
the #if so it is executed in Brillo builds anyway, but the result is
ignored. This fixes the warning about unused parameters which was
causing the build to fail.

Bug: 31068444
Test: `make dist` in Brillo

Change-Id: I8a6648bf2221406068c9f5a1850a59ae0bde03ca
ameraService.cpp
0878ecfc07712e0caa83642fba55af928b173363 19-Aug-2016 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Wait for empty in-flight map when waiting for idle am: e4df8abe28
am: e890fa14d6

Change-Id: I9ed6eb856a29a512b0ae1ca04011e122108ab999
e890fa14d6ba103132b2faac60726fb0dd217962 19-Aug-2016 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Wait for empty in-flight map when waiting for idle
am: e4df8abe28

Change-Id: Ia0095a20f128fff93f1adda905f2a8d71369915d
d17567dcae35bef4635766c408c23e6fa4abf33a 19-Aug-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3Device: Wait for empty in-flight map when waiting for idle" into nyc-mr1-dev
e3fd0d0c51d81fdc3f7b6892f8f3f2f821065009 17-Aug-2016 Zhijun He <zhijunhe@google.com> Camera3Device: add prop to disable sched fifo am: 90f7c37361
am: 601f677b6d

Change-Id: I86b6da77822a5c2b71ea9c2b75349c3c1e4a5482
90f7c37361c22f86bd3d63d22c27fbea34c188e1 17-Aug-2016 Zhijun He <zhijunhe@google.com> Camera3Device: add prop to disable sched fifo

to disable sched fifo:
adb root
adb shell setprop camera.fifo.disable 1

Bug: 30898724

Change-Id: Ic3d1d15f9deb36b49e7d710d60fac969a98a1730
evice3/Camera3Device.cpp
7bc559a13c14acb3e74ffc08fd0d898b4d494d4d 12-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 70066d9 to stage-aosp-master am: 311f99eade
am: f671d5bbf8

Change-Id: I80d1494c33d33a5ebe784dd894148d90747ae726
f671d5bbf8bdba4076be34b254e9e5f7d3f4b874 12-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 70066d9 to stage-aosp-master
am: 311f99eade

Change-Id: I8264ed7436d6ffce3106085efad14a58da2f50b5
311f99eade1222575bc65a2fcbd9f9a5a40d2024 12-Aug-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 70066d9 to stage-aosp-master

Change-Id: I9af1ace904388c91e6ce885e8a6d3540eb57bb4a
5404ee174dd6b5e312d3a97bc63c2bc8d142012b 09-Aug-2016 Chih-Hung Hsieh <chh@google.com> Fix clang-tidy warnings in camera.

* Add explicit keyword to conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
* Use const reference type to avoid unnecessary copy.
Bug: 30413862
Test: build with WITH_TIDY=1

Change-Id: I71d3008da843ba5f1df1a73a320fb2af6ceffa16
Merged-In: I71d3008da843ba5f1df1a73a320fb2af6ceffa16
ameraDeviceFactory.cpp
ameraDeviceFactory.h
ameraFlashlight.cpp
ameraFlashlight.h
ameraService.cpp
ameraService.h
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/client2/CallbackProcessor.cpp
pi1/client2/CallbackProcessor.h
pi1/client2/Camera2Heap.h
pi1/client2/CaptureSequencer.cpp
pi1/client2/CaptureSequencer.h
pi1/client2/FrameProcessor.cpp
pi1/client2/FrameProcessor.h
pi1/client2/JpegCompressor.cpp
pi1/client2/JpegCompressor.h
pi1/client2/Parameters.h
pi1/client2/StreamingProcessor.cpp
pi1/client2/StreamingProcessor.h
ommon/Camera2ClientBase.h
ommon/CameraModule.h
ommon/FrameProcessorBase.cpp
ommon/FrameProcessorBase.h
evice1/CameraHardwareInterface.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3DummyStream.h
evice3/StatusTracker.h
tils/AutoConditionLock.h
tils/ClientManager.h
04a0551e4488c267422e87faa416e37e28c61c73 09-Aug-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: use wp for NotificationListener am: e1c8063521
am: ece9e36367

Change-Id: Ib04667dd002186aa5b4f401f58209a48b436cc81
e1c8063521b0645b091b080d896106b2e6fd8670 08-Aug-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: use wp for NotificationListener

Bug: 30737827
Change-Id: I01b8bee39fe329bf250b9179a84a8928d209a357
ommon/Camera2ClientBase.cpp
ommon/CameraDeviceBase.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
203d7b2d37828dfa2a34f1848170e1022f27d7de 05-Aug-2016 Chien-Yu Chen <cychen@google.com> CameraService: Notify flashlight about device close am: e4fe21bb7c
am: 0406286002

Change-Id: Ie4d5274f0847e4bfd2a8a1d26fede1a3827fe1bc
e4fe21bb7cef893cd38bd194ea880333389aea38 04-Aug-2016 Chien-Yu Chen <cychen@google.com> CameraService: Notify flashlight about device close

Always notify flashlight about device close when device is
disconnected.

Bug: 30485086
Change-Id: Id537c32413f4df9d12c405538ceab2974d3ab319
ameraService.cpp
4f370c878cd8e21f5926d089b7a3cd73045f8433 02-Aug-2016 Zhijun He <zhijunhe@google.com> Camera3: don't let dequeueBuffer block indefinitely am: f0645c19a8
am: 1e8e893f8e

Change-Id: If07a6286dc670e03be6ac2a65d7db650c8d2f8f5
f0645c19a8c8433766f4cb6edff7fca5db8017bf 02-Aug-2016 Zhijun He <zhijunhe@google.com> Camera3: don't let dequeueBuffer block indefinitely

The synchronous consumers (e.g. ImageReader) may be very slow when the
clients have computational intensive image processings. When system
load is high, these processing will be even much slower. This could
starve the producer side and then cause dequeue/attach buffer block
indefinitely. If clients intends to close the capture session, right
after a capture request is submitted, the waitUntil drain could be
blocked indefinitely if the capture request dequeue buffer call is
blocked indefinitely, as the request thread will never become idle until
the last dequeue buffer is done and the request is sent.This indefinite
getBuffer() blocking could easily trigger the waitUntilDrained 5s timeout
thus put the camera device into error state although there is nothing
bad happening in the HAL.

Introducing the timeout will avoid such bad situation. When consumer is
slow, there will be no new request being sent to HAL, as there is really
no new buffer available.

Bug:30404840
Change-Id: Ibf08d2745911203bce6f31130800707f36d7f985
evice3/Camera3Device.cpp
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
d22e96cc1250d74b2c869ccd0baf788976caa305 27-Jul-2016 Zhijun He <zhijunhe@google.com> Camera3Device: make request thread SCHED_FIFO for all cases
am: 7ee4c0778c

Change-Id: Ib4b1fd28e74b88c94b6727112e2a9397f015d812
7ee4c0778c75a54cccf5ce82bd296e0dadcccb24 25-Jul-2016 Zhijun He <zhijunhe@google.com> Camera3Device: make request thread SCHED_FIFO for all cases

To mitigate the request thread CPU starvation for system highly loaded
situation.

Bug: 30357698
Bug: 28313712
Change-Id: Ied30103ce7245e139580219cce99d743b657307e
evice3/Camera3Device.cpp
evice3/Camera3Device.h
e4df8abe28ca2da39dcacc4f3396ba9aea7cfdb3 21-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Wait for empty in-flight map when waiting for idle

Currently we only wait for the request queue to be idle, and for
all outstanding buffers to be returned to their queues and their
fences triggered.

But we also need to wait for result metadata to arrive for all
in-flight requests. This is simplest to check for by monitoring
entries in the in-flight map and signaling idle/active to the
status tracker when the map becomes empty/nonempty.

Bug: 30282459
Change-Id: I34275b0fdb4f279783291d300707ac21a6aa5249
evice3/Camera3Device.cpp
evice3/Camera3Device.h
b4115063f468216510cb9265962b7fb942212e28 18-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Add dumpsys monitoring of request/result metadata
am: 4d453830b6

Change-Id: Iefb0f526d0d6d8d667fd1c3c3e4637db6624c276
4d453830b6a8fb7571a88a9a241eabd50a483c44 15-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Add dumpsys monitoring of request/result metadata

Add new -m dumpsys option to cameraservice dump for monitoring
changes in selected metadata values in requests and results.

This option takes a comma-separated list of metadata keys, or the
shortcut value "3a", which expands to all the "android.control" tags.

In subsequent dumpsys calls, the last 100 changes to the tags being
monitored are listed.

The monitoring must be turned on once the camera device is running.

Bug:
Change-Id: If8938b30611ccafa86c2c4a06e57fc72680f827b
ndroid.mk
evice3/Camera3Device.cpp
evice3/Camera3Device.h
tils/TagMonitor.cpp
tils/TagMonitor.h
55943ae68e72b362ba701f9e39e3dd50167a9e9c 08-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Merge \"Camera service: Trust telephony service to forward client UIDs.\" into nyc-mr1-dev
am: 24edc3b919

Change-Id: Iabe7af8fc708ee10a4aa36b5bf9fa13903601777
24edc3b919777167c7f5c2a356c972d0ecbfd9b7 08-Jul-2016 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Camera service: Trust telephony service to forward client UIDs." into nyc-mr1-dev
af9d030e075e659e9f50fdd143aa83459a7795e2 29-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Camera service: Trust telephony service to forward client UIDs.

For video telephony use cases, trust callers from the telephony
service to forward the true client UID in the connect calls, so
that it can be verified for access.

Bug: 27616192
Change-Id: Icd3ff4f7c8686f74a0677f54d49579b95c69037e
ameraService.cpp
54a4d67ae524eee37c1a2b2220d8e3d36b0c87e4 08-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Merge \"Camera1: JpegProcessor: Do not lock until we have to\" into nyc-mr1-dev
am: a1cad728da

Change-Id: I20fda033f58fdfeeebf983bb7b2f60d7533d8df3
8e73af9bcea96bc90afa7451c6014333fc51b655 08-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Camera1: JpegProcessor: Do not lock until we have to

JpegProcessor::onBufferReleased is fired for both successful and failed
Jpeg captures, but only cares about the failures.

In success cases, onBufferReleased is always fired some time after
onFrameAvailable, and sometimes the thread scheduling pushes
onBufferReleased to be so late that preview restart has started, which
can cause a deadlock with onBufferReleased acquiring locks in the
opposite order that preview startup will.

To fix, move the JpegProcessor mutex acquire to only happen in the error
cases, in which case onFrameAVailable will not have fired, and the
camera state will still be STILL_CAPTURE, not STOPPED or mid-preview
startup.

Bug: 29524651
Change-Id: I3f103e070c3b39c38117b91824cd79c5dfc757ac
pi1/client2/JpegProcessor.cpp
c4c56c41cf0962ccbf70dbbedf5130e1e98d5218 02-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Merge \"Camera: API1: Improve ZSL mode activation heuristics\" into nyc-mr1-dev
am: 879234b240

Change-Id: I26efe76186d552ea92f0d98d1f2ae7ddf3e03822
c451d0f8098c9efd21d796e32f739af1915f9aba 01-Jul-2016 Eino-Ville Talvala <etalvala@google.com> Camera: API1: Improve ZSL mode activation heuristics

- Don't engage ZSL if picture size is too small
- Don't engage ZSL if picture size matches preview size
- Include ZSL choice in dumpsys

Bug: 29620318
Change-Id: Ie8e0c5a9e1ed9f177d701f22996c4c1f4b81a71e
pi1/Camera2Client.cpp
pi1/client2/CaptureSequencer.cpp
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
pi1/client2/StreamingProcessor.cpp
acd69cc45687d283f0f47c68485eacbe5d774de7 29-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge \\"Camera3Device: Correctly shut down abandoned streams\\" into nyc-dev am: b889242aff
am: fe82275a06

Change-Id: Id93546464b95e04c5024525e66544f2bb5cb9e35
b461a998a5e5f69790748e50d8e75d25301dd32a 29-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge \"Camera3Device: Correctly shut down abandoned streams\" into nyc-dev
am: b889242aff

Change-Id: I18f7dc2b363856e7709782da4ec2fdd431bde52e
fe82275a06f0ace675482b23ee2cb685d2628af1 29-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge \"Camera3Device: Correctly shut down abandoned streams\" into nyc-dev
am: b889242aff

Change-Id: I50fd0619dec5488dbeadb903b95e5bd4e5980f61
ff51b47dae1c236291a0508b29e8f4e7d0780761 29-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Correctly shut down abandoned streams

If a stream was abandoned (consumer died), the stream teardown would
terminate early. Update teardown conditions to complete even for the
abandoned state.

One consequence of this is that the buffer manager never received an
unregister call for the stream, leading it to error out when trying to
remove buffers from it.

Also switch to STATE_ABANDONED in case of an error detaching a buffer,
instead of the error state.

Bug: 29778464
Change-Id: I44de69773e8bbf9ebe83207498d6ee0674ed91bf
evice3/Camera3IOStreamBase.cpp
evice3/Camera3OutputStream.cpp
4abfb3ba062fdb402e6b04c26a79ecd8f0e8ac25 25-Jun-2016 Zhijun He <zhijunhe@google.com> Camera3: log a warning when frame drop occurs
am: 7b171a9e7b

Change-Id: I96c84451ce70eff2d2aeeea03e9a3ede6b90d178
7b171a9e7be64e9881ed03baad1422d75ca768a4 25-Jun-2016 Zhijun He <zhijunhe@google.com> Camera3: log a warning when frame drop occurs

Bug: 28311997
Change-Id: I7253fb040c1f08c18fc7a01042503e9457163a1e
evice3/Camera3OutputStream.cpp
650dc2a72d80ab57c42172bc423614686d22e89d 21-Jun-2016 Eman Copty <eman.copty@intel.com> Merge \\\"Add support for streams with vendor specific formats\\\" am: cfbaedf009 am: d1a38eb18b
am: 5e74f61213

Change-Id: Id0839ae6988e38f5785c097eebb6646d1b06dd40
5e74f612137995bcbd65c0eab169179ca609aba1 21-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Merge \\"Add support for streams with vendor specific formats\\" am: cfbaedf009
am: d1a38eb18b

Change-Id: Ia8aa3064b66cc0d8817d39b1031dcc1c28296b14
d1a38eb18ba523ba9e4b149f4d1a3f9626164ff7 21-Jun-2016 Eman Copty <eman.copty@intel.com> Merge \"Add support for streams with vendor specific formats\"
am: cfbaedf009

Change-Id: Iab6e0c2a0220d8614e1aa64845beb1a01026f423
6d7af0e93c8442f98b3f3683a3e03d9b4b9856db 18-Jun-2016 Eman Copty <eman.copty@intel.com> Add support for streams with vendor specific formats

The function createStream() validates the format of
the created stream is published by the HAL in the
StreamConfigurationMap, however the vendor formats
cannot be added to StreamConfigurationMap and hence
shouldn't be checked.

Change-Id: Ie93422aa8813a313db6d2d3b4fdfc457fede0a0d
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
d58445d917538a71f1519be7a3e7b9101fd9c0ca 18-Jun-2016 Eino-Ville Talvala <etalvala@google.com> resolve merge conflicts of 3fce3ef to nyc-mr1-dev-plus-aosp

Change-Id: If319afe3976bedd64226e128164457f461eb7042
e8a984e43504890e0f676256a0445b9917a2af91 18-Jun-2016 Eino-Ville Talvala <etalvala@google.com> resolve merge conflicts of 77c1a35 to nyc-mr1-dev

Change-Id: I18c301c55904c06b3f6f5d8eaa2df47ff87ddb4f
3fce3ef7df0393bdbca33cfb05f084a510155cd2 18-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Camera: BufferManager: Don\'t attach/detach on every frame
am: 77c1a35542

Change-Id: I5d3a7ebd557e6330cfb9ba6b4f2a54fb211ddbcb
77c1a3554275a51ac8eb9fbe86f476afc8983192 13-Jun-2016 Eino-Ville Talvala <etalvala@google.com> Camera: BufferManager: Don't attach/detach on every frame

- Maintain separate count of attached buffers
- Only attach when new buffers need to be allocated
- Only detach when a buffer needs to be freed
- Fix missing notification initializations
- Remove warning that's always logged

Bug: 28695173
Change-Id: I38e997fa1e69c2b8743e43eed31a6a08a6f9cd7a
evice3/Camera3BufferManager.cpp
evice3/Camera3BufferManager.h
evice3/Camera3Device.cpp
evice3/Camera3DummyStream.cpp
evice3/Camera3DummyStream.h
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
evice3/Camera3OutputStreamInterface.h
134b747f85a434cb0a35ee87207981f1dfaa0b6a 14-Jun-2016 Chien-Yu Chen <cychen@google.com> Merge \\"CameraDevice3: Fail stream configuration more gracefully\\" into nyc-dev am: 642c0275dc
am: dbcce36298

Change-Id: If5c88ac699556873b547ee59b3e3414876778cbe
dbcce36298345b3e40034e44f2ba706e3c544f1e 14-Jun-2016 Chien-Yu Chen <cychen@google.com> Merge \"CameraDevice3: Fail stream configuration more gracefully\" into nyc-dev
am: 642c0275dc

Change-Id: I703452bc4fc9172bddda93b1e71706065def3053
2591f8308729b8f7b5d669d774cdac5636731535 14-Jun-2016 Chien-Yu Chen <cychen@google.com> Merge \"CameraDevice3: Fail stream configuration more gracefully\" into nyc-dev
am: 642c0275dc

Change-Id: I5a6eee36000d2f4f0666abb0189369ba20d8e44d
9b5860bd84adb5c7d497f188b5e6ade7f066ba3c 10-Jun-2016 Chien-Yu Chen <cychen@google.com> CameraDevice3: Fail stream configuration more gracefully

If stream configuration fails, do not set the device status to
STATUS_ERROR except when HAL returns a fatal error. This allows
the application to try another configuration after one fails.

Bug: 29248970
Change-Id: Iffa4b734c13b79a7da95be994a6317002627d771
evice3/Camera3Device.cpp
evice3/Camera3Device.h
863ec0e3dcf5f09406e2b1f789fd7333a7ce652a 03-Jun-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Prepare video stream for high speed" into nyc-dev am: 86823e4d1f
am: aedd66764b

* commit 'aedd66764b713c5e56e911f45a43a1a44d3dee70':
Camera3Device: Prepare video stream for high speed

Change-Id: Ib65b905a7179c47569013c15b37c21eae14df555
e71fb5f89915aab9a5f288d48b27786c8a35a903 03-Jun-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Prepare video stream for high speed" into nyc-dev
am: 86823e4d1f

* commit '86823e4d1fc81fabdf4baf95d7635768bb9677ba':
Camera3Device: Prepare video stream for high speed

Change-Id: I4072fc088da23c3bd6ff2a952f2303e596f319e0
aedd66764b713c5e56e911f45a43a1a44d3dee70 03-Jun-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Prepare video stream for high speed" into nyc-dev
am: 86823e4d1f

* commit '86823e4d1fc81fabdf4baf95d7635768bb9677ba':
Camera3Device: Prepare video stream for high speed

Change-Id: Ia81057ad033d89a3e705c1d9ee661bd365853f19
405debd8aa344c4f8ab5fe45c525ed400851f877 03-Jun-2016 Zhijun He <zhijunhe@google.com> Merge "Camera3: add deferred surface support" into nyc-mr1-dev
am: d2958597bc

* commit 'd2958597bc86d7eab85f007997d8986e1542f7a4':
Camera3: add deferred surface support

Change-Id: I6d37d0ad9bcb25b13a45f3af3f4adeb7cb00dcf7
c66969beb346b878701c4adccf83a1475c3a0687 20-May-2016 Chien-Yu Chen <cychen@google.com> Camera3Device: Prepare video stream for high speed

Prepare video stream for high speed recording on the first video
request to avoid buffer allocation after video recording starts.

Bug: 28246165
Change-Id: Iaf41c6b779e5b689f568453d99a9058c8aec3881
evice3/Camera3Device.cpp
evice3/Camera3Device.h
5d677d1f0879d5101e38df480a38228a64d63959 30-May-2016 Zhijun He <zhijunhe@google.com> Camera3: add deferred surface support

Initial native implementation and aidl changes for surfaceless support.

Bug: 28323863
Change-Id: Id6634c3ef2ecc84422a88f63de0a19a0cb496e96
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/CameraDeviceBase.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3DummyStream.cpp
evice3/Camera3DummyStream.h
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
evice3/Camera3OutputStreamInterface.h
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
4d1522bdc7efaa9677ac92b620cea9e9110ec2a4 24-May-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 53529cf to nyc-dev-plus-aosp

Change-Id: Iae19c31b9ce2d9c604040e54d6fbf125a3d3d362
53529cf975f5247bfa8dfd8bcbaaeb8ceebda3f0 24-May-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix misc-macro-parentheses warnings."
am: 7c05a8e156

* commit '7c05a8e1561b36585cb6a97c1d0d7adbd3cd5520':
Fix misc-macro-parentheses warnings.

Change-Id: I383a744a932fa74f5169584456f8354102e7be44
92a692a4aaae03797b2e85915a144a0b724f6229 24-May-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: fix deadlock" into nyc-dev
am: 7dd4ae63fe

* commit '7dd4ae63fe163287f06d00cc7756a9b7dd34bc25':
Camera: fix deadlock

Change-Id: I932cc6566c6305716fdb3dc2d3f6119f35fa8774
473fad9a5767e86ee9dbbffe0dfee10c7ad45a45 24-May-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix deadlock

Do not hold request lock while executing client callback.

Bug: 28821274
Change-Id: Ibbdae7f892a54abd0b6d87d2295e9863983e1cf7
evice3/Camera3Device.cpp
bf29173d6d63536ae9f8cfd1d02153237ee23612 18-May-2016 Chih-Hung Hsieh <chh@google.com> Fix misc-macro-parentheses warnings.

Bug: 28705665
Change-Id: I97d1dec9a4397fd7a3cab5180a833066b8abe0ab
evice1/CameraHardwareInterface.h
1740e42df83a4a063a1044a2fe39f2305a325921 11-May-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix recording stream update logic
am: 855c20283d

* commit '855c20283de5eab6798c76ffd4ea86bd6754a7fb':
Camera: fix recording stream update logic

Change-Id: I25a037f3c4e763717b23fd3412ce8d65ed6a4379
7fed0d95953a195c38b94e043f8e4418f90b846e 10-May-2016 Yin-Chia Yeh <yinchiayeh@google.com> DO NOT MERGE:Camera: fix recording stream update logic

Will be merged internally.

Bug: 28695248
Change-Id: I3008a0cb76fe1c43b305d635519d60d92a3adedb
pi1/client2/StreamingProcessor.cpp
855c20283de5eab6798c76ffd4ea86bd6754a7fb 10-May-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix recording stream update logic

Bug: 28695248
Change-Id: I43d2d456cab84b378507979bad89c8c1f5b86b58
pi1/client2/StreamingProcessor.cpp
1ac5a450420767378c44476eeff735402f017c48 05-May-2016 Zhijun He <zhijunhe@google.com> Merge "Camera: update service to support HAL3.4" into nyc-dev
am: f15d88daa7

* commit 'f15d88daa721d53921bfb7798dd12f7c74b44ac1':
Camera: update service to support HAL3.4

Change-Id: I2e29f46977befaf13478d3132bb2a68bb39ea003
4afbdecf8c6dc5ad04f6fa6c8712ce2c56a00c47 05-May-2016 Zhijun He <zhijunhe@google.com> Camera: update service to support HAL3.4

We need support HAL3.4 device in cameraservice.

Bug:28599474
Change-Id: Ibad0249349335d78557820429439e71eceba259e
ameraService.cpp
47734c9509ecb472c2844cae46e2d916b9358321 02-May-2016 Chih-Hung Hsieh <chh@google.com> resolve merge conflicts of 98a9b2a to nyc-dev-plus-aosp

Change-Id: Iae0a5cb698807d74ba28878d7ce1f69b6ba5219a
98a9b2a491360c762e2ed46a9126f576693645a5 02-May-2016 Chih-Hung Hsieh <chh@google.com> Merge "Fix google-explicit-constructor warnings."
am: e7d3c72f23

* commit 'e7d3c72f23384774407248edcbfc9c9d78bfe304':
Fix google-explicit-constructor warnings.

Change-Id: I7ff1a09d757b71252db243b6527f6c131d11c4a6
20be7bf5ba6f3d4db36686d5af4316006cf9bb27 02-May-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: Fix passing video native handle for 64-bit app" into nyc-dev
am: 9e23567ed0

* commit '9e23567ed02c30bb390ffe56b25f59b626cd9eab':
Camera: Fix passing video native handle for 64-bit app

Change-Id: I1bc16ac12f98f969ab9d54b43fdda90fc462c300
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
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/CameraClient.cpp
pi1/CameraClient.h
090ef604f81447eab4aa0a5b45d6307482573560 27-Apr-2016 Chih-Hung Hsieh <chh@google.com> Fix google-explicit-constructor warnings.

Bug: 28341362
Change-Id: I625fbab25f16282c2ea929cd16283d9d146fa17b
evice3/Camera3ZslStream.cpp
ad17c39aef184144299aeb3662d07d23f191e46b 27-Apr-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera: Use separate lock for mStreamingRequestId" into nyc-dev
am: c1e0154

* commit 'c1e0154940f84014967f9f611d22ad85a01be7cb':
Camera: Use separate lock for mStreamingRequestId

Change-Id: If4ccee3141c8e0927c796b06962b5f5219f3d00f
c1e0154940f84014967f9f611d22ad85a01be7cb 27-Apr-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera: Use separate lock for mStreamingRequestId" into nyc-dev
f8e8389fba55bee961ec8a3e872f9af1dc28d704 27-Apr-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera: Do not signal AutoConditionLock if acquisition times out" into nyc-dev
am: bb6ac18

* commit 'bb6ac1823f7a3d74fbfac841dc74da556f05d2e7':
Camera: Do not signal AutoConditionLock if acquisition times out

Change-Id: I7941baad7d9af0f77bd1a68b87d787f986b80d71
bb6ac1823f7a3d74fbfac841dc74da556f05d2e7 27-Apr-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera: Do not signal AutoConditionLock if acquisition times out" into nyc-dev
33cd2560498bcf2ac77901b853235dbb0aeca1c7 26-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: For HFR, make priority elevation request synchronous" into nyc-dev
am: 89b3068

* commit '89b3068ff2819c37db5a3af280f927183fe56849':
Camera3: For HFR, make priority elevation request synchronous

Change-Id: I609a02706e8707247b1392295e276c77f1c82e8c
89b3068ff2819c37db5a3af280f927183fe56849 26-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: For HFR, make priority elevation request synchronous" into nyc-dev
c9ca6788c65ed3f578d1a1ed0ba7c268254dcb4b 26-Apr-2016 Shuzhen Wang <shuzhenwang@google.com> Camera: Use separate lock for mStreamingRequestId

There are cases where evictClientIdByRemote holds
mBinderSerializationLock and waits for mRequestLock, and at the same
time checkAndStopRepeatingRequest holds mRequestLock and waits for
mBinderSerializationLock, causing deadlock.

Solution is to use separate lock to protect mStreamingRequestId.

Bug: 28295136
Change-Id: I40f8e1ded29abde86bc12b20dd119f9f3371ebb2
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
34713c04b5e1a897b0fd905a89622059a787f7a7 26-Apr-2016 Shuzhen Wang <shuzhenwang@google.com> Camera: Do not signal AutoConditionLock if acquisition times out

It's possible for AutoConditionLock to time out in waitAndAcquire
while waiting for the condition. In this case, we don't want to
reset the state because others may be holding the condition without
lock.

Bug: 28295136
Change-Id: Ife90232daef8fd0d31acf9e52cfbcf542987e3fa
tils/AutoConditionLock.cpp
tils/AutoConditionLock.h
0f695ebaefdafb10f30e612db017e64a2bcd8d90 26-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: override external facing for API1 client" into nyc-dev
am: c3c06c4

* commit 'c3c06c4fe329d07bd7d442206bc9eb63e92bf5bd':
Camera: override external facing for API1 client

Change-Id: Ia4a4f84bb712392a7f63e3470a87028dfb7d3fea
c3c06c4fe329d07bd7d442206bc9eb63e92bf5bd 26-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: override external facing for API1 client" into nyc-dev
0f6778e333a0ee3750135e02c259f49382a6896a 26-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Camera3: For HFR, make priority elevation request synchronous

Since we only do this once per session, it has trivial overhead,
and it's important that any permission denials are actually properly
detected.

Bug: 28246165
Change-Id: Id4c23db6e3b7ab5f7755b3f55ddd589cbdbde8af
evice3/Camera3Device.cpp
26492c0e67ef3f79ea98eddf128658383aecfdd2 26-Apr-2016 Jim Kaye <jameskaye@google.com> Merge changes I4588e7da,Ic4a70a1b into nyc-dev
am: 56f949b

* commit '56f949b44a4c8d287c7f3028695eceb07ae41f54':
Fix Emulator CTS tests for Camera, Location, Sensors, Telephony
Camera: Disconnect camera after checking flash unit

Change-Id: I2487e119869ad5b513a2d29891e8db48e2336232
56f949b44a4c8d287c7f3028695eceb07ae41f54 25-Apr-2016 Chien-Yu Chen <cychen@google.com> Merge changes I4588e7da,Ic4a70a1b into nyc-dev

* changes:
Fix Emulator CTS tests for Camera, Location, Sensors, Telephony
Camera: Disconnect camera after checking flash unit
3d1c478fc34824db4e68d50c12f283d6b55c272e 13-Apr-2016 Jim Kaye <jameskaye@google.com> Fix Emulator CTS tests for Camera, Location, Sensors, Telephony

This gets all the android.app.cts.SystemFeaturesTest tests to pass.

In addition to these changes, the AVD's config.ini must indicate
an emulated front camera and no back camera.

https://code.google.com/p/android/issues/detail?id=205072

Bug: 28170202

Change-Id: I4588e7daeea034847912e9044c44edf629336c35
ameraFlashlight.cpp
0b094277076286d100cf1da6860b7038be662ce9 22-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> DO NOT MERGE: Camera: override external facing for API1 client

Bug: 28322515
Change-Id: I6ecb4f27c98b2c5d509756e27259fa8afdd27631
ameraService.cpp
9b5a6e9a667f85adeddea787a9f609d9cde84ef4 22-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: override external facing for API1 client

Bug: 28322515
Change-Id: I6ecb4f27c98b2c5d509756e27259fa8afdd27631
ameraService.cpp
6dcc706b3b06eedcc8d24a3001543c3f49999d94 18-Apr-2016 Chien-Yu Chen <cychen@google.com> Camera: Disconnect camera after checking flash unit

Disconnect camera device after opening it just to check if
it has a flash unit. Leave it open if torch is being turned on.

Bug: 28170202

Change-Id: Ic4a70a1b4be28625449ed52cbf6c5d214089adb7
ameraFlashlight.cpp
ameraFlashlight.h
2362982a1d5ec938a296d7ec2c247490f0db5dc3 21-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Add dumpsys --unreachable support" into nyc-dev
am: 7e52fc604b

* commit '7e52fc604bab7e401aa6a3473d94aa891d3808c8':
Camera: Add dumpsys --unreachable support

Change-Id: I6c8aeada750544610fd03320965521021051896d
d89821ec5481e0640d84bfe3e29a1254a52ca683 20-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Add dumpsys --unreachable support

Use libmemunreachable to instrument camera service to detect
native memory leaks.

Will detect any memory allocated through jemalloc; does not track
gralloc or other special allocations.

It can be triggered with
dumpsys media.camera --unreachable

Bug: 28295283
Change-Id: Ib4e73e9d1a168b3cee4c56a9bf1aeb438591c799
ndroid.mk
ameraService.cpp
06d47907bed5594198cfe7a5c7a89d5877625b58 16-Apr-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: Stop repeating request if its output is abandoned" into nyc-dev
am: 1c39c2b

* commit '1c39c2bd6780e858e0f36cfc58eac84ce88ef3ce':
Camera: Stop repeating request if its output is abandoned

Change-Id: I9bdd7a3ee21988a8e9ddf598603151e47220d51c
e8c535e833ed135895e99ca81aa3b85d80d7cf3c 14-Apr-2016 Chien-Yu Chen <cychen@google.com> Camera: Stop repeating request if its output is abandoned

Stop repeating request if any of its output stream is abandoned.
Add a callback to notify the repeating request has been stopped
with frame number of the last frame.

Update NDK with the new callback and behavior.

Bug: 21270879

Change-Id: I3553775c7807a77104aa1650609480ca3321310c
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.h
ommon/CameraDeviceBase.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3OutputStream.cpp
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
evice3/Camera3StreamInterface.h
321a0f3d95efcbccb6cfab4f47b96d06c4239213 14-Apr-2016 Treehugger Robot <treehugger-gerrit@google.com> Merge "Export libbinder headers as part of libcameraservice" am: 1068fed
am: 11dae86

* commit '11dae86f6f5b909d738b47956f63815e3160b27f':
Export libbinder headers as part of libcameraservice

Change-Id: I420f4bf0868b125e4d08557875fc1601b4ebc9c8
e0c317973c14f5898c881c48d44adadd6f64fb77 14-Apr-2016 Christopher Wiley <wiley@google.com> Export libbinder headers as part of libcameraservice

libcameraservice's headers include headers from libbinder. libbinder's
header include path must be included as part of libcameraservice's
include path.

Bug: 27804373
Test: This library compiles with a slightly modified libbinder include
path.

Change-Id: I7540aec33d432f1ff3673d4fecadb88b707551dd
ndroid.mk
adce0ad22d6e2b56028669316ca411fd2a160660 13-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: derive post RAW sensitivity keys for BC" into nyc-dev
am: 03aa02b

* commit '03aa02bda9bf1f38d8c6d9e6bfd8222ed18d3ff5':
Camera: derive post RAW sensitivity keys for BC

Change-Id: I9158bdd7f25ad604a66fe0306fa4f280004fb9b1
03aa02bda9bf1f38d8c6d9e6bfd8222ed18d3ff5 13-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: derive post RAW sensitivity keys for BC" into nyc-dev
4c060997514cb37aec9a9a7cec02a3f257d3a74d 12-Apr-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: derive post RAW sensitivity keys for BC

Derive post RAW sensitivity keys for devices
earlier than HAL3.4.

Bug: 27950762
Change-Id: Icc2232cb722c61a5878a81706885303b15ddee3e
ommon/CameraModule.cpp
ommon/CameraModule.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
df2b62e38b35bdb03e12d8565a9f530eb096dbf8 13-Apr-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: Keep a list of outstanding buffers" into nyc-dev
am: bb969e7

* commit 'bb969e7b2230b520a903b22fb6e89c3e14d38ad8':
Camera: Keep a list of outstanding buffers

Change-Id: Iae13cdda0b65d9867e8dc7c6082637ed01275852
bb969e7b2230b520a903b22fb6e89c3e14d38ad8 13-Apr-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: Keep a list of outstanding buffers" into nyc-dev
e02e932d2210bd513bb8283840bbe24b58d28620 12-Apr-2016 Chien-Yu Chen <cychen@google.com> Camera: Keep a list of outstanding buffers

Keep a list of outstanding buffers in Camera3Stream so that
it won't return invalid buffers or the same buffers twice back
to the buffer queue.

Bug: 27894484
Change-Id: I9f96629b4f531778433c2e1ec32a142f2040832b
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
d27a77e4bbc2db90c0dce1e8e6ca32cd244c1e45 06-Apr-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Ensure correct error message for disconnected devices" into nyc-dev
am: 7f688ed

* commit '7f688edcace6c7abc9ef566669c4511849ad2493':
Camera: Ensure correct error message for disconnected devices

Change-Id: I9e462cca01ff78b65e73cb9f83f42d92b4066cfa
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
pi1/CameraClient.cpp
pi2/CameraDeviceClient.cpp
626c2abd8e048d08e78c44013513898c4acfecd2 29-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Camera3InputStream: Stop after finding buffer to return" into nyc-dev
am: 9611679

* commit '96116791e9f4d74d2f941a22b6d3ec99e6b6ed6e':
Camera: Camera3InputStream: Stop after finding buffer to return

Change-Id: Ia06e9c6f1216c1eb49382864127be881addf31ac
05a8cf58ce8095752999e0efc7b2713cfeb5309e 28-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Camera3InputStream: Stop after finding buffer to return

Erasing iterator invalidates it, so it's not safe to continue using it.
Besides, there should only be one buffer to erase anyway.

Bug: 27878949
Change-Id: I00e9845fa953c26e117e40112b9f35fc781c5dcf
evice3/Camera3InputStream.cpp
ad5caad62fdb67193dcce91442456382a5129408 25-Mar-2016 Shuzhen Wang <shuzhenwang@google.com> Merge "Camera: Retry JPEG capture if buffer is dropped." into nyc-dev
am: 6fbc20c

* commit '6fbc20c958c0c770261ca4d32a3748ea4ecd64d9':
Camera: Retry JPEG capture if buffer is dropped.
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
pi1/client2/CaptureSequencer.cpp
pi1/client2/CaptureSequencer.h
pi1/client2/JpegProcessor.cpp
pi1/client2/JpegProcessor.h
ommon/CameraDeviceBase.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3Stream.cpp
evice3/Camera3StreamBufferListener.h
4f3d6203c71f9e76fbd2964ad54a81b7036f7e17 22-Mar-2016 Chien-Yu Chen <cychen@google.com> CameraService: Fix client PID

Client PID is the PID of the client that connects to camera service
directly. Without this, mediaserver won't be able to lock camera when
standalone MediaRecorder is in use.

Bug: 25091611
Change-Id: I6afa9409b6337439bb7186c0ec3f9a412fa9950f
ameraService.cpp
7939aee8c1688bc8647c5bceb0d47a4e790ff27d 22-Mar-2016 Chien-Yu Chen <cychen@google.com> resolve merge conflicts of d384306 to nyc-dev-plus-aosp

Change-Id: I288ea4c7b2f750460e8fb0fbcf8ecaebec3f2d53
d384306b8a5c2f106a02574c356d78a08e7894ac 22-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: Use original client PID for eviction" into nyc-dev
1c0e48076f569d5d5d732cb0c4fe8efa3334a741 21-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Fix openLegacy error codes" into nyc-dev
am: 8708e14

* commit '8708e14eba0c9f533c274f7067d744386e45b385':
Camera: Fix openLegacy error codes
8708e14eba0c9f533c274f7067d744386e45b385 21-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Fix openLegacy error codes" into nyc-dev
3525dd92724e4942c9259f19581d63b93f18e14b 21-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Fix openLegacy error codes

Fix error handling regressions from the Binder interface refactor

- Error codes from openLegacy became incorrect
- Client initialize() call error codes were not discriminated between

Bug: 27657269
Change-Id: I2379d45d5fe5c2ad43c78bcfd18ea4c833adc987
ameraService.h
18df60e094edbaa08cbecd25b0398643b8a0f29a 19-Mar-2016 Chien-Yu Chen <cychen@google.com> Camera: Use original client PID for eviction

Use the original client PID to evaluate priorities for eviction. The
original client PID may be different from the calling PID when the
application uses MediaRecorder to open camera.

Bug: 26493273
Change-Id: I8f56194f1ca2151701efb8cb380ff4abf6c8d6c4
ameraService.cpp
ameraService.h
cfc32935147dd31bdbff9bd5ef602ede748eb17c 18-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Send ILLEGAL_ARGUMENT error for a bad stream configuration" into nyc-dev
am: 32dc5a9

* commit '32dc5a990b6180dcb919220dcbefcec92afd8cc2':
Camera2: Send ILLEGAL_ARGUMENT error for a bad stream configuration
32dc5a990b6180dcb919220dcbefcec92afd8cc2 18-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Send ILLEGAL_ARGUMENT error for a bad stream configuration" into nyc-dev
ace805805313827c7edde3bc6eb6624ab9f62dcb 18-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Camera2: Send ILLEGAL_ARGUMENT error for a bad stream configuration

Bug: 24168122
Change-Id: Icd9ce14fcdd2f88c5bde01a9652bb8cb66875560
pi2/CameraDeviceClient.cpp
b363544cc78b94517081dc3eb8647f39fbd0a7bb 18-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera: validate input in releaseRecordingFrame" into nyc-dev
am: c40fcb0

* commit 'c40fcb01669240e9c1a6af74bcb0fcd85147fa87':
Camera: validate input in releaseRecordingFrame
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
pi1/CameraClient.cpp
d1cb1629ace4a9c327b6d148df2e93148d7c35cc 17-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Update dataspace to new spec, convert for older HALs" into nyc-dev
am: 68a91b9

* commit '68a91b9dbe8d70c5542df4f3eb5f9a4f803ba10a':
Camera: Update dataspace to new spec, convert for older HALs
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
pi1/client2/CallbackProcessor.cpp
pi1/client2/JpegProcessor.cpp
pi1/client2/Parameters.cpp
evice3/Camera3Device.cpp
evice3/Camera3Device.h
b95abe525127767dbf2c6b7f2055fbdc40f66f05 11-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Add error stream ID for buffer drop errors" into nyc-dev
am: 97a330964b

* commit '97a330964b0548238d75602c74b290bea77a6b55':
Camera3: Add error stream ID for buffer drop errors
97a330964b0548238d75602c74b290bea77a6b55 11-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Add error stream ID for buffer drop errors" into nyc-dev
288f5e0986f68728e33633127459f7fceed20346 11-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Send partial results seperately" into nyc-dev
am: 37964cbbcf

* commit '37964cbbcf994350d989b482c201ee9571ea1b38':
Camera3Device: Send partial results seperately
37964cbbcf994350d989b482c201ee9571ea1b38 11-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Send partial results seperately" into nyc-dev
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
pi1/client2/FrameProcessor.cpp
pi1/client2/FrameProcessor.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
a069be3143313583b2212824ebf34586ab80223d 10-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Validate template ID" into nyc-dev
am: 3c8aa2fded

* commit '3c8aa2fded9e5c5daf8a3e6ac8acbe3d329d8e65':
Camera3Device: Validate template ID
3c8aa2fded9e5c5daf8a3e6ac8acbe3d329d8e65 09-Mar-2016 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Validate template ID" into nyc-dev
9cd140240c84789d00349c33e9c0b7a74d1543ed 09-Mar-2016 Chien-Yu Chen <cychen@google.com> Camera3Device: Validate template ID

Validate template ID before creating a default request.

Bug: 26866110
Change-Id: Ifda457024f1d5c2b1382f189c1a8d5fda852d30d
pi2/CameraDeviceClient.cpp
evice3/Camera3Device.cpp
ac554124699adbef4d24981a90591b19b4e6573f 09-Mar-2016 Zhijun He <zhijunhe@google.com> Merge "Camera3Device: fix dereferencing null pointer crash" into nyc-dev
am: 14fd3a1e2a

* commit '14fd3a1e2a7b048be2f3a4638e8b30b596eb080e':
Camera3Device: fix dereferencing null pointer crash
431503c11ca9e069584f70b0eef8b858a4a43546 08-Mar-2016 Zhijun He <zhijunhe@google.com> Camera3Device: fix dereferencing null pointer crash

It's possible that the dump is called during the device shutdown
process, where the buffer manager could be already torn down. Add
null check before calling the dump function.

Bug: 27500853
Change-Id: I179eb7ac1e81be2c196833b2c88488cd59fe2cc5
evice3/Camera3Device.cpp
e95bb6312b972117a0ee70eabf78fcd118018f61 07-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Camera3: Add error stream ID for buffer drop errors

To enable passing buffer drop errors to API users

Bug: 24168122
Change-Id: I2769d0ba1fbd9a09494d5904eac511cecea3e6a8
evice3/Camera3Device.cpp
599b62b06e008241ea39090aa63e930f7adbc8a6 05-Mar-2016 Zhijun He <zhijunhe@google.com> Merge "Camera2: protect the device access" into nyc-dev
am: e7d45e3ff9

* commit 'e7d45e3ff9358293f27ce1add94af34908a6a263':
Camera2: protect the device access
0effd5277058b1fa6067875ca86d74452c4491c3 04-Mar-2016 Zhijun He <zhijunhe@google.com> Camera2: protect the device access

The Camera3Device could be detached during the static metadata access,
which could cause some nstive crash or even DoS.

Bug: 26696230
Change-Id: I081a119f6687fdbfcba845c4d317d043390c3a84
pi2/CameraDeviceClient.cpp
1bbe0a4c47997d33ad02192df612ad9f2ef25fed 03-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Don\'t crash when the device has no vendor tags." into nyc-dev
am: b026bb1d9c

* commit 'b026bb1d9ca239af6f241a3c2c84130767a76564':
Camera: Don't crash when the device has no vendor tags.
1e74e241f5a4e0e763e27c888561405d013c9ca0 03-Mar-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Don't crash when the device has no vendor tags.

Turns out copying from null pointers crashes things.

Bug: 27466842
Change-Id: I294f03614eec8c488c016469549464065821a7e7
ameraService.cpp
0492686c4703b3ddbff52d047ef226b973a3388a 03-Mar-2016 Eino-Ville Talvala <etalvala@google.com> resolve merge conflicts of 6e0c00ba53 to nyc-dev-plus-aosp

Change-Id: I123a42e8cd1439177ea75a3c0aba7dca0b2f31fe
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
ndroid.mk
pi1/client2/JpegCompressor.h
pi2/CameraDeviceClient.cpp
evice3/Camera3Device.cpp
evice3/Camera3DummyStream.cpp
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
ui/RingBufferConsumer.cpp
tils/CameraTraces.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
ndroid.mk
ameraService.cpp
ameraService.h
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/CameraClient.cpp
pi1/CameraClient.h
pi1/client2/Parameters.cpp
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.h
ommon/CameraDeviceBase.h
evice1/CameraHardwareInterface.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
e7afc1a8af5d8bd9124bf9b4e47d4ae8e1fac5ae 25-Feb-2016 Bin Chen <chen_bin@projectara.com> Merge "CameraService: Fix cameraId type of onDeviceStatusChanged" am: 2dab1fe48b
am: 103177fd33

* commit '103177fd3326a9aac9cb64d2ab4efcb193571ed5':
CameraService: Fix cameraId type of onDeviceStatusChanged
103177fd3326a9aac9cb64d2ab4efcb193571ed5 25-Feb-2016 Bin Chen <chen_bin@projectara.com> Merge "CameraService: Fix cameraId type of onDeviceStatusChanged"
am: 2dab1fe48b

* commit '2dab1fe48bdf75e1e510ea12e7b5a55ed2692d3f':
CameraService: Fix cameraId type of onDeviceStatusChanged
e16d1165c5dccfb44753610f39b120938269cd3a 22-Feb-2016 Bin Chen <chen_bin@projectara.com> CameraService: Fix cameraId type of onDeviceStatusChanged

The cameraId should be of type int, instead of camera_device_status_t.

Change-Id: I26d587bb74f7100028f09928984c2e8dad6eebef
Signed-off-by: Bin Chen <chen_bin@projectara.com>
ameraService.cpp
ameraService.h
2e2cfd6158d8aded0effc3a1395c2731e2750841 19-Feb-2016 Christopher Wiley <wiley@google.com> Merge "brillo: Don\'t even try contacting the camera proxy" am: 15ca784102
am: cf34799f70

* commit 'cf34799f702fca5cb6fabd185650c265c08c8b2e':
brillo: Don't even try contacting the camera proxy
cf34799f702fca5cb6fabd185650c265c08c8b2e 19-Feb-2016 Christopher Wiley <wiley@google.com> Merge "brillo: Don\'t even try contacting the camera proxy"
am: 15ca784102

* commit '15ca784102df7fc8259509b564d8085273d2a340':
brillo: Don't even try contacting the camera proxy
15ca784102df7fc8259509b564d8085273d2a340 19-Feb-2016 Christopher Wiley <wiley@google.com> Merge "brillo: Don't even try contacting the camera proxy"
55363176be0ad1fe75d97276547929b4ca971f56 17-Feb-2016 Bill Yi <byi@google.com> Merge commit '813ac23bee5b3519c2b7f410a2b24b3a94075b22' into HEAD
13b5caf8cbb6b62d411472c6e831aeee77393adb 16-Feb-2016 Christopher Wiley <wiley@google.com> Merge "resolve merge conflicts of c25621f0e5 to nyc-dev-plus-aosp" into nyc-dev-plus-aosp
ce761d1fef4da2a4dec3eb538d103fcde1971dba 16-Feb-2016 Christopher Wiley <wiley@google.com> resolve merge conflicts of c25621f0e5 to nyc-dev-plus-aosp

Change-Id: I36983f261e91f9fc1b41ff54ba604fa616ada0ff
bc57b12030cbd4885d9231e721bbfed1b6522212 16-Feb-2016 Aurimas Liutikas <aurimas@google.com> Fix compiler warnings in Camera3 service code.

- Removes unsed mDepth variable
- Fixes the type of count in getRawOpaqueBufferSize

Bug: 27149500
Change-Id: I7d5010cb513f9163c8bb6bf4ab427e54ee9d4963
evice3/Camera3Device.cpp
evice3/Camera3ZslStream.cpp
evice3/Camera3ZslStream.h
c25621f0e52dbf78159b5aa28b8c19ed6a7a053b 16-Feb-2016 Christopher Wiley <wiley@google.com> Merge "brillo: Rely on static SELinux policy for camera"
92c06fceabfa47906aaa7c747dcdd6376ccec358 12-Feb-2016 Christopher Wiley <wiley@google.com> brillo: Don't even try contacting the camera proxy

This service isn't running, and every time we try, we spend
five seconds retrying to get a reference to a binder that
will never be registered with the service manager.

Bug: 26936651
Test: With this patch, 5 second pauses with logs disappear.

Change-Id: I9cc6b1b616f1b786c3bb4e687b1c742d31424684
ameraService.cpp
0039bcf0c4f10b92917c26df70c7847f1ab0b51e 05-Feb-2016 Christopher Wiley <wiley@google.com> brillo: Rely on static SELinux policy for camera

In Brillo, there are no applications, and SELinux policy can be
configured statically (at build time). In this model, we control
access to the camera binder, and thus to the camera stack.

Bug: 26936651
Test: Brillo test camera client can connect to camera

Change-Id: I5207c2f78e4f36778b90aac29bf4317b62cbd3dd
ameraService.cpp
ameraService.h
161c953eae05a71309ae5ed03213dec23c907cf6 12-Feb-2016 Dimitry Ivanov <dimitry@google.com> Fix warning: list conflicting ids (not cameraId)

Change-Id: Iad75866ab4edd500a32c5ca7e7c89d8af246f5d2
ameraService.cpp
c28dcccb9bc0a94950a7475f9bd8a6a38be34419 12-Feb-2016 Shuzhen Wang <shuzhenwang@google.com> Camera3: Use proper timestamp clock domain for different streams

If buffer consumers assume different clock domain compared to the camera
output, camera3 device uses the offset between the clock domains to convert
the timestamp.

Bug: 27153476
Change-Id: Iaae33281411cb27b639e87b0dad957d640182898
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
b30f2636bc36d56b94dc5d35e20a68b2e403aac2 09-Feb-2016 Eino-Ville Talvala <etalvala@google.com> Merge "CameraHardwareInterface: Reconnect preview in HAL set_buffer_count" into nyc-dev
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
pi1/CameraClient.cpp
evice1/CameraHardwareInterface.h
80fa61994c8bcc21e5150c1a6bf447f6423239c4 08-Feb-2016 Zhijun He <zhijunhe@google.com> Camera3: increase the buffer manager water mark by one

This reduces the chance of allocation during stream steady state.
It helps the cases where one stream is active, and other streams may
randomly request some buffers.

Change-Id: I3f29001a45e223dd2e7929452c4a2ac81a1213f2
evice3/Camera3BufferManager.cpp
edd41ae47b99b98249e819ac72fb94264326a4eb 03-Feb-2016 Zhijun He <zhijunhe@google.com> Camera3: buffer manager doesn't support HAL3.2 devices

Not all HAL3.2 devices implemented dynamic buffer registeration.
This CL excludes the HAL3.2 devices from the buffer manager
supported devices.

Bug: 26955436
Change-Id: I5bc2eec0a4db2f5ab85f7677ed7b367c13ce67aa
evice3/Camera3Device.cpp
evice3/Camera3OutputStream.cpp
8d1a154cc6239096edda698ea638e6ab6fe53c4e 30-Jan-2016 Zhijun He <zhijunhe@google.com> Camera3: add dynamic buffer count water mark support

The dynamic buffer count water mark starts from zero, and grows when the max of
hand-out buffer counts grow, until reach to the max allowed total buffer count.
For the case where the clients almost always uses less number of buffers than
the max allowed total buffer count, the dynamic buffer count water mark will
remain low, and the memory footprint will be smaller.

Change-Id: I305f40232f4740d3e9bedf14ee9b76a81e29e244
pi2/CameraDeviceClient.cpp
evice3/Camera3BufferManager.cpp
evice3/Camera3BufferManager.h
f1d124eff4ce99adb8ea34912ef899863e7b76e3 29-Jan-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: derive post RAW sensitivity boost range

Bug: 26625646
Change-Id: Ifbc49d744ac0dca201028aa414dae56febf28e4b
ommon/CameraModule.cpp
1ff811b024c690e53510113d19042b7cd2d2637a 26-Jan-2016 Zhijun He <zhijunhe@google.com> Camera3: return cancelled buffers to buffer manager

When a buffer is cancelled, it is considered as a free buffer and need to be
returned to buffer manamager for buffer reuse. This will also make the prepare
work.

Also fix the buffer removal bug.

Bug: 25088440
Change-Id: I0e3da44c76008406ee19541366da7a962c355949
evice3/Camera3BufferManager.cpp
evice3/Camera3OutputStream.cpp
feb76cc0340f3eb4c9ae91cbfab4dcea449422f5 28-Jan-2016 Chien-Yu Chen <cychen@google.com> Merge changes from topic 'camera-hardening'

* changes:
camera: Add support to pass native handles across binders
Camera: Fix client permission check
Add cameraserver process
13a69633108f40f56aa47f1bcbb406cd5173c245 26-Jan-2016 Shuzhen Wang <shuzhenwang@google.com> Camera3: Selectively set buffer timestamp depends on consumer

Certain consumers such as Hardware Composer and AudioSource
use MONOTONIC timestamp, which causes time misalignment if
camera timestamp is in BOOTTIME.

Do not set buffer time stamp for such streams and let
BufferQueue handle it.

Bug: 22214409
Bug: 26762232
Change-Id: Id1c4b85a181e39827e8f27949a199165bbd445f9
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
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
ameraService.cpp
ameraService.h
pi1/Camera2Client.cpp
pi1/CameraClient.cpp
8aa17d0c577594e1240d21fd823d9f4c5cc14fa0 26-Jan-2016 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera NDK library: first draft"
0dea57fd9fc4b2ccaab97d9477359fbd5a626f5c 10-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera NDK library: first draft

Bug: 23012001

Change-Id: I06d834421289d4dead1c87301a6ee94487ccf023
ameraService.cpp
ameraService.h
cc97730e142c21a0af67bd2f18d9938a4ef96a39 25-Jan-2016 Zhijun He <zhijunhe@google.com> Camera3: hook up stream set Id

Hook up the stream set Id with native implementation.

Bug: 25088440
Change-Id: Iaed9f02d6638ea259d18f7ea75fbd2c87073c3e4
pi2/CameraDeviceClient.cpp
125684aba1a11b7adbf5f9d607ee2bcc9449081c 27-Dec-2015 Zhijun He <zhijunhe@google.com> Camera3: add camera3 buffer manager support

* Add camera buffer manager for buffer allocation and sharing management across
multiple streams. Only gralloc v0 implementation is done, v1 implementation is
pending. With this, the max mem footprint for multiple streams in the same
stream set will be the max buffer count x max buffer size.
* API1 client will still use the old bufferQueue code path, buffer manager
is only targeting at API2 clients.
* Prepare and teardown should work with buffer manager.
* Some existing code typo fix and cleanup (to fix the compiling warnings).

Bug: 25088440
Change-Id: I68b246faa43080302acd02a8e976384bd3e26a23
ndroid.mk
pi2/CameraDeviceClient.cpp
ommon/CameraDeviceBase.h
evice3/Camera3BufferManager.cpp
evice3/Camera3BufferManager.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3DummyStream.cpp
evice3/Camera3IOStreamBase.cpp
evice3/Camera3IOStreamBase.h
evice3/Camera3InputStream.cpp
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
evice3/Camera3StreamInterface.h
ui/RingBufferConsumer.h
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
fb5043a703f596b7393c1e24ca4b321b0f697293 14-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Camera: Disallow dumping clients directly am: c400396525
am: 795243686f

* commit '795243686fe2e1c352732b47bcdb6ea9e9e7e39e':
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
5a94f6f199e261c235a05f6b066aa53078962e93 14-Jan-2016 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: Further fixes to default camera counts"
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
ameraService.cpp
ameraService.h
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/CameraClient.cpp
pi1/CameraClient.h
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.h
b1501e2917d94ec0fff6959cbdcf2db84b97f4b0 13-Jan-2016 Yin-Chia Yeh <yinchiayeh@google.com> Camera: set mNumberOfNormalCameras correctly am: 6dd6c54651 am: 72bc40dc51
am: 6258d848c5

* commit '6258d848c52d36e804977c3007a968ad823b9244':
Camera: set mNumberOfNormalCameras correctly
6dd6c546513aa18dc1d7fba0f72d670edce34f77 07-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: set mNumberOfNormalCameras correctly

Need to set the number correctly when a camera HAL is not present.

Bug: 25951590
Change-Id: I666acf7a2a523c51f2c2ae88ff690ca9dccda08c
ameraService.cpp
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
49c9705a7987b94bd53fddd4834f5f534cf946f7 12-Jan-2016 Eino-Ville Talvala <etalvala@google.com> CameraService: Further fixes to default camera counts

At least one section of code still doesn't clear the camera
counts correctly on error, so ensure that they always start at 0.

Also include normal camera count in dumpsys, and remove unnecessary
initializers in the constructor.

Change-Id: Ib891bd37ab5f74b43d5d31b24ac23fa0b11434b3
ameraService.cpp
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
pi1/CameraClient.cpp
d0ef20e9e91afa734078bc229a5ded8e7e3ab944 09-Dec-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera: Support BufferQueue between Camera and StageFright"
e9154ced1216ceb06a82140ed65051c0397e8abc 07-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: plumbing for RAW OPAQUE

Bug: 25596619
Change-Id: I0867a36962084bc508aebc89cb910473402a5e09
ommon/CameraModule.cpp
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3IOStreamBase.cpp
evice3/Camera3OutputStream.cpp
evice3/Camera3Stream.cpp
654b4bf34361b0166a564d178c11ce98cf561cfa 08-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix HAL1.0 support

Bug: 26050582
Change-Id: Ic64fb005d7c804dc2b8b9c22fdbe44408646b406
ameraService.cpp
ommon/CameraModule.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
ameraService.h
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/CameraClient.cpp
pi1/CameraClient.h
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
pi1/client2/StreamingProcessor.cpp
pi1/client2/StreamingProcessor.h
a6b3ed1b8ee37fe244dfbcbe3dbeda66b55c846d 07-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: set mNumberOfNormalCameras correctly"
169e8ebba23f461cdb57f10985e044e235457b0a 07-Dec-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: set mNumberOfNormalCameras correctly

Need to set the number correctly when a camera HAL is not present.

Bug: 25951590
Change-Id: I666acf7a2a523c51f2c2ae88ff690ca9dccda08c
ameraService.cpp
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
ndroid.mk
ameraDeviceFactory.cpp
ameraDeviceFactory.h
ameraFlashlight.cpp
ameraService.cpp
ameraService.h
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/client2/BurstCapture.cpp
pi1/client2/BurstCapture.h
pi1/client2/CallbackProcessor.h
pi1/client2/CaptureSequencer.cpp
pi1/client2/CaptureSequencer.h
pi1/client2/FrameProcessor.cpp
pi1/client2/JpegProcessor.cpp
pi1/client2/JpegProcessor.h
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
pi1/client2/StreamingProcessor.h
pi1/client2/ZslProcessor.cpp
pi1/client2/ZslProcessor.h
pi1/client2/ZslProcessor3.cpp
pi1/client2/ZslProcessor3.h
pi1/client2/ZslProcessorInterface.cpp
pi1/client2/ZslProcessorInterface.h
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.h
ommon/CameraModule.cpp
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
7e7a62dc6c20b5ff761b87d99379797aa3fd7d9d 04-Nov-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Add option to dump templates to HALv3 devices

Add -t to dumpsys media.camera to dump the request templates of any open
HALv3 camera devices.

Change-Id: Ib2746d5ca4a25e7f8eab842e6a99daa03f15acb8
evice3/Camera3Device.cpp
e9ccb98fc7259cbd876f02381b0eec4d5a5ff4ff 29-Oct-2015 Makoto Onuki <omakoto@google.com> Remove "sys.secpolicy.camera.off_" system property check

With I421690f14ee57fa818d2b233fe48a90a0a575a9e, now the device policy camera
restrictions will be propagated with a user restriction via appops, so the
system property check is no longer needed.

Bug 24538855

Change-Id: I7b034c0d49b834e570c758315df6a0163f64af4e
ameraService.cpp
55a4d0bdf185b0cf7e37ca0446e4e5046cef5534 22-Oct-2015 Ian Pedowitz <ijpedowitz@google.com> Merge "DO NOT MERGE: libcameraservice: Fix nullptr crash when no client." into mnc-dr-dev am: c0d8c35a2d
am: 80ad49403e

* commit '80ad49403ede54092e128ddf9f1fe2ef7bc53944':
DO NOT MERGE: libcameraservice: Fix nullptr crash when no client.
5adc76c49a525993f3362cf648864fb21f4547f0 08-Oct-2015 Tom Keel <thomas.keel@intel.com> DO NOT MERGE: libcameraservice: Fix nullptr crash when no client.

This change prevents a crash in the camera service when the camera
HAL notifies the service about the absence of a removable camera and
there happens to be no client connected to the service. It checks
that the pointer returned from clientToDisconnect.get() is non-null
before trying to dereference it (as is done in existing code
immediately below this change).

Bug: 25165323
Change-Id: I8055654bac980542e63ea7f52bf897eaafbc09bc
Signed-off-by: Tom Keel <thomas.keel@intel.com>
ameraService.cpp
2d3e2892f1640ad9fa18f70e2152cf10fa43f933 19-Oct-2015 Ranjith Kagathi Ananda <ranjith@codeaurora.org> am fc7b5a4a: am a04159ac: libcameraservice: Fix ALOG prints in FlashLight. am: 32ab9fdab5

* commit 'fc7b5a4a10fe8cf02f1a9fd330d06319fcabdb05':
libcameraservice: Fix ALOG prints in FlashLight.
7f03a03a62bb10b99fd194ba864f17e61a73dda7 19-Oct-2015 Ranjith Kagathi Ananda <ranjith@codeaurora.org> am 1d288267: am b4a3c6dd: Camera: frameworks: Add NULL check for callback am: 3e60089468

* commit '1d288267c357e90dd68a1eb43f35db00309cab5a':
Camera: frameworks: Add NULL check for callback
fc7b5a4a10fe8cf02f1a9fd330d06319fcabdb05 19-Oct-2015 Ranjith Kagathi Ananda <ranjith@codeaurora.org> am a04159ac: libcameraservice: Fix ALOG prints in FlashLight. am: 32ab9fdab5

* commit 'a04159acc4c49f13fbfa5b5bee5e5b622eb2d659':
libcameraservice: Fix ALOG prints in FlashLight.
1d288267c357e90dd68a1eb43f35db00309cab5a 19-Oct-2015 Ranjith Kagathi Ananda <ranjith@codeaurora.org> am b4a3c6dd: Camera: frameworks: Add NULL check for callback am: 3e60089468

* commit 'b4a3c6dd7e48bc9d3f68c609b2b28abec67d1eeb':
Camera: frameworks: Add NULL check for callback
32ab9fdab562127ccd37a8cdb15421ebdf82a458 09-Oct-2015 Ranjith Kagathi Ananda <ranjith@codeaurora.org> libcameraservice: Fix ALOG prints in FlashLight.

Add missing __FUNCTION__ arguments into log statements.

Ack by: Dilip Gopalakrishna

Bug: 25023187
Change-Id: I0256bad626d490fb9360a73c104afaad7a012a97
ameraFlashlight.cpp
3e600894685b994849d59307721c6862ae0c45b7 09-Oct-2015 Ranjith Kagathi Ananda <ranjith@codeaurora.org> Camera: frameworks: Add NULL check for callback

--Added NULL check for mRemoteCallback

Ack by: Susmitha Gummalla

Bug: 25023187
Change-Id: Ib88a128a52e81b8ec1052e3222b6d8b9e494afcc
ameraService.cpp
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.
43c39be58651745a55e5d66568f92c03d695b461 17-Oct-2015 Eino-Ville Talvala <etalvala@google.com> Merge "ALOGE does not match triggering condition."
86803a9be4dbe0c544aff4c44b186433b9efed26 15-Oct-2015 Yin-Chia Yeh <yinchiayeh@google.com> am bb19b792: am abe90449: am ceb10ea7: Merge "Camera: setup vendor tags before get_camera_info" into mnc-dr-dev

* commit 'bb19b792cf51934fd5f4fe989e66255cc8e132a4':
Camera: setup vendor tags before get_camera_info
ceb10ea795d92d889201cd40f5ac6290edf4ded7 15-Oct-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: setup vendor tags before get_camera_info" into mnc-dr-dev
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
5f54de483624a5731d82060bd3e1aab74b32b15e 15-Oct-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera: Add video recording stop sound" into mnc-dr-dev
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
ameraService.cpp
ameraService.h
pi1/Camera2Client.cpp
pi1/CameraClient.cpp
d4a653a15767d4de37dbfdee22c2170951c93299 14-Oct-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: setup vendor tags before get_camera_info

So HAL can use vendor tags on first get_camera_info call.

Bug: 24913201
Change-Id: I73f17de87e3712a27f9cee366995df27a740f5cb
ameraService.cpp
8a4a0ac6545f53a9ec4af6074caf0e935b08ffbe 14-Sep-2015 Oleksiy Avramchenko <oleksiy.avramchenko@sonymobile.com> DO NOT MERGE: Fix setTorchMode support for the old HAL version

CameraHardwareInterfaceFlashControl class calls disconnectCameraDevice
when torch is disabled. This closes connection to the camera module,
but mDevice instance is kept and variable is non-NULL which will
prevent connection next time torch is going to be enabled.

Bug: 24909924
Change-Id: Icb1ffb07f05256afd92821f0f4908cda5332c05b
ameraFlashlight.cpp
a578772d9697726dce439d0a00c6814bc9859f75 14-Oct-2015 Chien-Yu Chen <cychen@google.com> am f8b12805: am f339beaf: am 2e1683c4: Merge "Fix setTorchMode support for the old HAL version"

* commit 'f8b1280535a6e3ebcf864d434a01d6c672cadd9a':
Fix setTorchMode support for the old HAL version
f339beaf97f4112684c01e40d5ed9f4bfe3270fa 14-Oct-2015 Chien-Yu Chen <cychen@google.com> am 2e1683c4: Merge "Fix setTorchMode support for the old HAL version"

* commit '2e1683c4871faccea74f181194e193cb28016cf3':
Fix setTorchMode support for the old HAL version
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>
pi1/client2/Parameters.cpp
741fd4d9070c1dbe9ff297a8a3fc6317c3808482 14-Sep-2015 Oleksiy Avramchenko <oleksiy.avramchenko@sonymobile.com> Fix setTorchMode support for the old HAL version

CameraHardwareInterfaceFlashControl class calls disconnectCameraDevice
when torch is disabled. This closes connection to the camera module,
but mDevice instance is kept and variable is non-NULL which will
prevent connection next time torch is going to be enabled.

Change-Id: Icb1ffb07f05256afd92821f0f4908cda5332c05b
ameraFlashlight.cpp
29d56072745c91933c416a149900e7d431dd5a84 03-Oct-2015 Chien-Yu Chen <cychen@google.com> am 463e71c6: am fc07d1e6: am 4a8f4a3f: Camera3Device: Change HFR request thread priority to 1

* commit '463e71c6766e68bc042b89c53751095053950c4c':
Camera3Device: Change HFR request thread priority to 1
4a8f4a3f567d8b3134b1c7ab21ca774f279ab9c2 02-Oct-2015 Chien-Yu Chen <cychen@google.com> Camera3Device: Change HFR request thread priority to 1

Based on periods of the request thread and audio threads with
SCHED_FIFO policy, 1 is a more reasonable priority for HFR
request thread.

Bug: 24427480
Change-Id: I91f0066a0e114fc83abcc6a604ecbaa72c6a34e8
evice3/Camera3Device.h
921c7dffbd7f594b13688abae363d562eaefa8a0 01-Oct-2015 Chien-Yu Chen <cychen@google.com> am 27dbbd1d: am d270804d: am a24a1a63: Merge "Camera3Device: Bookkeeping reprocess shutters separately" into mnc-dr-dev

* commit '27dbbd1d26d71edab353fbfc1f741a9abee3590f':
Camera3Device: Bookkeeping reprocess shutters separately
3df11ce7240d0ce5d957c626be467832c1c7fde9 30-Sep-2015 Chien-Yu Chen <cychen@google.com> Camera3Device: Bookkeeping reprocess shutters separately

Bookkeeping reprocess shutters separately so regular and reprocess
shutters together don't need to come in order.

Bug: 24497512
Change-Id: I4aaf22045131e9e2e26bf163f7df9ff4c5cd6259
evice3/Camera3Device.cpp
evice3/Camera3Device.h
060b582b37f55b758a41b0cc26dc1ff6d112814f 27-Sep-2015 Eino-Ville Talvala <etalvala@google.com> am b171ba8c: am ffce26c0: am f99498ee: CameraService: Use SCHED_FIFO for request queue thread in HFR

* commit 'b171ba8ce83ebb5abc2de9a171a15dc974756d3d':
CameraService: Use SCHED_FIFO for request queue thread in HFR
f99498ee4de7123e2fd71778c6877be44fbd1506 26-Sep-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Use SCHED_FIFO for request queue thread in HFR

- Move SchedulingPolicyService from audioservice to mediautils

- When starting up a high speed stream config, set request queue thread
to SCHED_FIFO using SchedulingPolicyService

Bug: 24227252
Change-Id: I224b59142bd111caf563779f55cddd62385b9bac
ndroid.mk
evice3/Camera3Device.cpp
evice3/Camera3Device.h
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
3818c6964a000bcac34176afa2bae5e247f5d223 15-Sep-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: API1 shim: select better default FPS range" into mnc-dr-dev
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
99c906570b8663da8709fd986323470984f9c57e 12-Sep-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Signal buffer returned after it failed" into mnc-dr-dev
b83c1fe4e793da269b9340c64f7032a9cc27809c 11-Sep-2015 Chien-Yu Chen <cychen@google.com> Camera3Device: Signal buffer returned after it failed

Signal buffer returned even after it failed so the thread waiting
for it can wake up sooner.

Bug: 23981045
Change-Id: Iccbcc7ece2e0f6204da9c54f2bdd96ff6843a8f5
evice3/Camera3Stream.cpp
652f7d7ebd9a8cec067588c2a232e49710d5cd83 11-Sep-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: API1 shim: select better default FPS range

Bug: 23992350
Change-Id: Ie86b24d9e5ea753c6dfc2e5526d371b339be96a1
pi1/client2/Parameters.cpp
fefa614f92346e929921bfd47e3643861850bc2a 09-Sep-2015 dcashman <dcashman@google.com> Reduce DUMP permission denial output to one line.

Bug: 23940813
Change-Id: I0060dbaff5cd0c3d028ac5cd7aba7da3f0371150
ameraService.cpp
a84bbe6b59721b1b963d65d270aa98d6513bbb78 09-Sep-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Add more systracing, fix module init order

Improve debugging of performance of concurrent calls to the service.

- Add ATRACE calls to camera service entry points
- Add ATRACE calls for camera HAL module calls
- Ensure that camera module init method is called before all others

Bug: 23718257
Bug: 23933447
Change-Id: I2a025866ab39eda3962877120cab13a063c7727e
ameraService.cpp
ommon/CameraModule.cpp
c85dc0548dcc59aebc39251aa66b8c5df956c76f 05-Sep-2015 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: Link to client binder death at end of connect" into mnc-dr-dev
4abef9bf7cfb98930044c75354f5200b811d099f 05-Sep-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Clean up next request batch variable" into mnc-dr-dev
24901c86e10a0923fe10f5e9bce5e6dba061a289 04-Sep-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Link to client binder death at end of connect

If, within a binder Looper thread, a Binder object death notifier is
registered, and then a nested Binder transaction is begun, that
transaction may process a death notification callback for the
just-registered object, if it was dead at the time of registration.

This can lead to an unexpected nested call into the service, and cause
deadlock.

To avoid this, move the death notifier registration to the end of
handling the connect transaction.

Also remove one extra bit of disconnect logging.

Bug: 23525545
Change-Id: If01cbaf42704f55134118afefc9a8f7bdb014e09
ameraService.cpp
ameraService.h
57ea29251d93c9423030de387573142064366a30 04-Sep-2015 Chien-Yu Chen <cychen@google.com> Camera3Device: Clean up next request batch variable

Make the Vector of next requests a RequestThread member variable
to avoid memory allocation in every threadloop.

Bug: 23360060
Change-Id: I4f33e5c49f0f4deb1f9f45bada0909da748849e4
evice3/Camera3Device.cpp
evice3/Camera3Device.h
50d12164efe3e4df9a1d994afdeb4779ce0f63c9 04-Sep-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Support batch requests" into mnc-dr-dev
85a6455f269d79adf9bf48d757a4b1b3c81cf760 29-Aug-2015 Chien-Yu Chen <cychen@google.com> Camera3Device: Support batch requests

Refactor request threadLoop to three parts: waiting for next
batch of requests, preparing HAL requests and output buffers for
next batch of requests, and submitting the batch of requests to
HAL.

Set the batch size to the size of the request list if it's a video
recording request in a high speed video configuration.

Add a flush lock so that HAL's flush() won't be called while
submitting a batch of requests.

Bug: 23360060
Change-Id: Icd395b1f955a9b336eec6fa5aff6b17741ce08c7
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3DummyStream.cpp
evice3/Camera3DummyStream.h
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
evice3/Camera3OutputStreamInterface.h
evice3/Camera3Stream.cpp
52aad85627f5216e7a3d9db425d2cc409f998a01 03-Sep-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Treat TOP_SLEEPING same as TOP for priority.

When arbitrating between camera clients, treat processes in the
TOP_SLEEPING state with the same high priority as processes in the
TOP state.

This resolves race conditions during lock screen handoffs between
clients such as face unlock (a bound foreground process) and a
secure camera app (the topmost activity, but transitioning from
TOP_SLEEPING to TOP asynchronously from the activity lifecycle
callbacks).

Bug: 23731720
Change-Id: I92c3f8f561c7725627826c0ba3dc926e99af746c
ameraService.cpp
ameraService.h
ef7826692df89514701d12dfbfc31bec3814cf95 02-Sep-2015 Chien-Yu Chen <cychen@google.com> am fe751bea: Camera: Fix flashlight deadlock

* commit 'fe751bea0d3eedd6e817aebf4e457425b82e7117':
Camera: Fix flashlight deadlock
fe751bea0d3eedd6e817aebf4e457425b82e7117 01-Sep-2015 Chien-Yu Chen <cychen@google.com> Camera: Fix flashlight deadlock

Use a dedicated mutex for torch UID map so it won't cause a deadlock
after flashlight app gets killed while the torch is on.

Bug: 23722318
Change-Id: I228377aa0412052d56b6b948361d9abaecbbc686
ameraService.cpp
ameraService.h
efff1c4ba2bf195d97de2fd5718b708e4b942901 29-Aug-2015 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Don't hold mutex during HAL device close.

The HAL device shutdown will likely need to wait on various events and
queues to drain, and holding the mutex will prevent, for example, error
notifications from being processed. This can lead to deadlocks.

Bug: 23501571
Change-Id: I873ac23ef30545adf533e7839445448573ab5048
evice3/Camera3Device.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
ameraService.cpp
ameraService.h
pi1/Camera2Client.cpp
pi1/CameraClient.cpp
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.h
5d1103e5a229401a4c4e0cb7dd91b2742881ff92 17-Aug-2015 Ruben Brunk <rubenbrunk@google.com> Merge "Add experimental camera session prepare API." into mnc-dr-dev
c78ac26e3a65328fc0118f16ee76a800d0687eb7 14-Aug-2015 Ruben Brunk <rubenbrunk@google.com> Add experimental camera session prepare API.

Bug: 18949148
Change-Id: I8f73e68ea2e3acc60d98954106f364d13f439a82
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/CameraDeviceBase.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
evice3/Camera3StreamInterface.h
bad4358c83c7daaf9eeb8542c15eea4f473c884c 14-Aug-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Add camera type to ICameraService.getNumberOfCameras.

Also determine the number of 'normal' cameras present on
camera service startup, and ensure that all normal cameras have
IDs lower than the 'strange' cameras.

Bug: 23194168
Change-Id: I1f7b14825cb52707de698a955f85da1eaa932663
ameraService.cpp
ameraService.h
3ba0c6ec009aa675d3433cd6c12af173874787bd 14-Aug-2015 Ruben Brunk <rubenbrunk@google.com> Merge "Fix deadlock conditions in Camera3Device." into mnc-dev
5732386666aa2265d658e9fc861a1dfe22033861 13-Aug-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: Relax InFlightMap size check" into mnc-dev
c96ac8dfcae66a45b7ae67b82dabdf19f60f859d 13-Aug-2015 Chien-Yu Chen <cychen@google.com> Camera3Device: Relax InFlightMap size check

Relax InFlightMap size check for high speed configurations to
allow more pending capture requests.

Bug: 23162274
Change-Id: I955fe9a0754f0daed001f4a2b34ccb50f2465a11
evice3/Camera3Device.cpp
evice3/Camera3Device.h
183f056393423b344e73f388f21d30379a38e519 12-Aug-2015 Ruben Brunk <rubenbrunk@google.com> Fix deadlock conditions in Camera3Device.

Potential deadlock conditions this addresses, include:
- Not waking up waiting threads for several situations where
the status had been updated.
- Not waking up all waiting thread when status had been updated
(only one thread was awoken due to use of signal).
- Threads clear status transitions before other waiting threads
have a chance to examine them.

Bug: 22448586
Change-Id: I53ba669d333a83d2bfa1ca3170d34acc6d8fe6e3
evice3/Camera3Device.cpp
evice3/Camera3Device.h
95a1d0f2fb1ea85c549ef8b869ab9ab52601d1db 12-Aug-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Allocate correctly-sized buffers for DEPTH_POINT_CLOUD

Bug: 20537722
Change-Id: I9fa2fcdcfd41cd3370732c70414914993d3dc94e
evice3/Camera3Device.cpp
evice3/Camera3Device.h
e361bc024ee7e34b7d53223aa2b209ef120ee78a 08-Aug-2015 Pablo Ceballos <pceballos@google.com> camera: Rename mBuf to mSlot

Bug: 19769719
Change-Id: I9eef512f2a2185b7e0298113d2503b62ec2e5942
pi1/client2/StreamingProcessor.cpp
ui/RingBufferConsumer.cpp
ui/RingBufferConsumer.h
f6d07bc61fd7fefe9d2b2cbdaf637f2fdb1bd21e 18-Jul-2015 Ruben Brunk <rubenbrunk@google.com> Merge "Fix UAF error in CameraModule." into mnc-dev
eff134a61a5dd081ee578628704a66dca24e0cf7 18-Jul-2015 Ruben Brunk <rubenbrunk@google.com> Fix UAF error in CameraModule.

Bug: 22542551
Change-Id: I2fe5791a6554a8e2f7fd94593d552d8af18257db
ommon/CameraModule.cpp
51d0b1d84dc1c095e68126257213f24f64ab3aa0 17-Jul-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera2Client: handle slower jpeg stream sensor" into mnc-dev
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
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/client2/CaptureSequencer.cpp
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
b25e3c87724b6147ed1da7c1d6617c39bfce2fbf 16-Jul-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Add hidden experimental tearDown method.

Bug: 18949148
Change-Id: Ie86ec7d1ec3db54e1154563b2339a208a935f849
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/CameraDeviceBase.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
evice3/Camera3StreamInterface.h
878b8f1a0128cf63617782e3073dffb212d0c8f1 07-Jul-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Fix native binder interface and add tests." into mnc-dev
3450ba7879be6522ea46a56c5e66e5382f5dd5ba 16-Jun-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Fix native binder interface and add tests.

- Add CameraBinderTests for limited coverage of native
camera2 binder interfaces for the camera service.
- Fix several bugs in the native binder interfaces.

Bug: 18468810
Change-Id: Iab2d81a5cacd20daf7454aeeed033cc13d88452c
ameraService.cpp
944f843015c440837abb029356108a81b4095e53 02-Jul-2015 Chien-Yu Chen <cychen@google.com> CameraModule: fix getCameraInfo()

Remove mCameraCharacteristicsMap.

CameraModule kept a CameraMetadata in mCameraCharacteristicsMap
and kept its camera_metadata in mCameraInfoMap. When CameraMetadata
gets moved in mCameraCharacteristicsMap, it may clone a new
camera_metadata and free the old one. So the original
camera_metadata stored in mCameraCharacteristicsMap becomes invalid.

Bug: 22171288
Change-Id: Ia8e99fe42989946bc952ad23abb296aeac60da83
ommon/CameraModule.cpp
ommon/CameraModule.h
ab5135b254c6f9aaac8edb816596f8823dbdb3d5 30-Jun-2015 Chien-Yu Chen <cychen@google.com> Camera3-Device: Fix AE lock available

Pass whether AE lock is available when creating the request thread
because when the request thread was created, its parent's info
was not set yet.

Bug: 20494782
Change-Id: I11ed3f99c473955c437e81f3e1d704c15a9ca1a4
evice3/Camera3Device.cpp
evice3/Camera3Device.h
ed8505836c0b2fba0ab4be0c1eff31d4f241bc1d 25-Jun-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera3: Support AE precapture trigger CANCEL" into mnc-dev
d196d6165aa1ac0dd7c0ad6cc5ada3a2f8e4b49d 23-Jun-2015 Chien-Yu Chen <cychen@google.com> Camera3: Support AE precapture trigger CANCEL

Support AE precapture trigger CANCEL for devices <= API
version 3.2.

Bug: 20494782
Change-Id: I6003ba8057ca4ec9e8dfda47b8411ae6be913d22
evice3/Camera3Device.cpp
evice3/Camera3Device.h
a3b3caaae3fc23b99c5c455ee429f79c270cfbae 22-Jun-2015 Ruben Brunk <rubenbrunk@google.com> Add default for pre-distortion active array.

Bug: 20491394
Change-Id: I53b0539b37cc7a042e6765c97775b8c2bbba7159
ommon/CameraModule.cpp
17338fca4a51dfb32c1291f94b65d4b4f30b682d 19-Jun-2015 Chien-Yu Chen <cychen@google.com> Camera3Device: Fix high speed configuration

If high speed mode changed, HAL needs to reconfigure the streams
even when the stream configurations don't change.

Bug: 21900311
Change-Id: I76aee456b3b6d8c8f599a1638dcd38d75553a235
evice3/Camera3Device.cpp
f8f2f137cceebe3bee4ff3219bc75189a4eccc65 13-Jun-2015 Ruben Brunk <rubenbrunk@google.com> Merge "Fix rounding width." into mnc-dev
77a77f6ef6f04dba8caa54bda937cb276cace9ad 13-Jun-2015 Ruben Brunk <rubenbrunk@google.com> Fix rounding width.

Bug: 19930700
Change-Id: I9d5685bd98a049fcb01f6ecc649f15f3b4498e6d
pi2/CameraDeviceClient.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
ameraFlashlight.cpp
ameraFlashlight.h
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/client2/CallbackProcessor.cpp
pi1/client2/CallbackProcessor.h
pi1/client2/JpegProcessor.cpp
pi1/client2/JpegProcessor.h
pi1/client2/StreamingProcessor.cpp
pi1/client2/StreamingProcessor.h
pi1/client2/ZslProcessor.cpp
pi1/client2/ZslProcessor.h
pi2/CameraDeviceClient.cpp
ommon/CameraDeviceBase.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
evice3/Camera3ZslStream.cpp
9a17941fa70e43119d2c3464bc00a3cd30b2bd14 09-Jun-2015 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Default-initialize operating mode.

Since configureStreams is only called by CameraDeviceClient,
the operation mode could default-initialize to CONSTRAINED_HIGH_SPEED
for API1 operation.

Change-Id: Ide71af07ca3925db8e450d00def1daeb44d8046a
evice3/Camera3Device.cpp
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
ndroid.mk
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/client2/CallbackProcessor.cpp
pi1/client2/JpegProcessor.cpp
pi1/client2/StreamingProcessor.cpp
pi1/client2/StreamingProcessor.h
pi1/client2/ZslProcessor.cpp
pi1/client2/ZslProcessor3.cpp
ommon/CameraDeviceBase.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3StreamInterface.h
e3afb2cc438b76ae433c8c40ceabf0457ad7a678 04-Jun-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Change error for app ops reject, propagate binder errors

INVALID_OPERATION surfaces as an non-specific device-level error to
applications in the onError callback. This is not a condition apps
targeting camera2 in L will generally have to deal with.

Instead, return -EACCESS which maps to throwing
CameraAccessException.CAMERA_DISABLED, same as disabling camera access
with DevicePolicyManager.

The old camera API converts any error code to -EACCESS at the JNI layer,
so this doesn't change anything for the older API.

Also update the various native ICameraService binder connect calls to
check for the transact error code, and return it if it is not OK.
Without this, PERMISSION_DENIED transact errors from the camera
service cannot be distinguished from CAMERA_DISABLED errors in
some codepaths.

Bug: 21604925
Change-Id: Ifccc8989b8c20653429e2d3e51dba7abb2be9c35
ameraService.cpp
1fa8999c91d5df81949aa723000058380cd3faa2 02-Jun-2015 Zhijun He <zhijunhe@google.com> Camera2: implement high speed video APIs

Bug: 21442271
Change-Id: Ia0ae5bbd3e8c81bad293c29987301a2457817d12
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/CameraDeviceBase.h
ommon/CameraModule.cpp
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
cb18ec05b7097a63262b81afe1e866105d400f4a 02-Jun-2015 Ruben Brunk <rubenbrunk@google.com> Merge "Track camera and flashlight usage in battery stats." into mnc-dev
99e69716215cd0665379bc90d708f2ea8689831d 27-May-2015 Ruben Brunk <rubenbrunk@google.com> Track camera and flashlight usage in battery stats.

Bug: 15986092

Change-Id: I9dc6828332e4091fd93bf2d82839e8e3862a2fc2
ndroid.mk
ameraService.cpp
ameraService.h
tils/ClientManager.h
c2adf48e2dfae0b2b5ddd9de9e7d79ca471bfd37 27-May-2015 Chien-Yu Chen <cychen@google.com> Camera3: fix aborting reprocess requests

Get an input buffer right after camera service takes one
reprocess capture request from the request queue to prevent
the input buffers getting out of order.

When aborting pending reprocess requests in the request queue, also
abort the same amount of input buffers.

Bug: 21028914
Change-Id: I7cfacecb4c24509f59c983abd587db5a403237bd
evice3/Camera3Device.cpp
evice3/Camera3Device.h
fb683371379606bd3f41c880d83e33f8f3e445ac 29-May-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: derive LSC characteristics keys" into mnc-dev
3e28a1a1dea11eada3a1c27b973301796032ae20 23-May-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: derive LSC characteristics keys

Also fix a typo in AWB lock available key.

Bug: 21403373
Bug: 20883751
Change-Id: I5156f4fafcf4ae86f680fb618966c7cc58900120
ommon/CameraModule.cpp
0ec23d3f89d804cc1d9dea8f0585dc6d57bfd5c2 29-May-2015 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Do not call cleanUpFailedRequest with mutex held

Double-acquiring a non-recursive mutex tends to work poorly.

Bug: 21498811
Change-Id: I1d59959fca69c97684522195808019797f7a6a7d
evice3/Camera3Device.cpp
e74c228e83906e0e317c4eb6eac20815ff839c04 27-May-2015 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Close hole in prepare in-use stream check

There's a narrow window in which a capture request is neither in the
request queue or handed off to the HAL, which can be expanded to some
size if buffers have to be allocated. During this window, the
prepare() method will not correctly notice that a stream should be
considered in use.

Add a member to contain the current request being processed, and check
against it in prepare as well.

Change-Id: I3a198d617f5feee0a3332af4b4439f24eda28ea3
evice3/Camera3Device.cpp
evice3/Camera3Device.h
2232aee25e4df7d04446912e8ad9e9dc44d8ec16 20-May-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera: Add AIDL interface for CameraServiceProxy." into mnc-dev
2823ce0ce6f9d508a07de20912c93cce9165027f 20-May-2015 Ruben Brunk <rubenbrunk@google.com> camera: Add AIDL interface for CameraServiceProxy.

- Adds an AIDL interface to allow the proxy camera service
running in system server to accept RPCs from the camera
service running in mediaserver.
- Request an update to the valid user set from the proxy
camera service when mediaserver restarts to initialize
properly + avoid DOS after a crash.

Bug: 21267484

Change-Id: Ib821582794ddd1e3574b5dc6c79f7cb197b57f10
ameraService.cpp
ameraService.h
fb2b8eaf0c4bf980605030f3c66b44a097fa7950 20-May-2015 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: Logcat conflicting devices on rejected open" into mnc-dev
022f0cb0c6f135edde4ebe84859c685933ee895e 20-May-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Logcat conflicting devices on rejected open

Already in dumpsys log, but also put into logcat for feedback reports

Also fix a minor warning about an uninitialized variable.

Bug: 21063372
Change-Id: I04b45932e4500ac72aaa1cb724abc8a82a0e70e8
ameraService.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
ameraService.cpp
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/client2/CaptureSequencer.cpp
pi1/client2/CaptureSequencer.h
6267b539d0d1ee7118aafd976d75cb8db397bc24 01-May-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Fix work-profile eviction handling.

Bug: 20124384
Change-Id: I6fb82dbfd5f98746ed4befed81a583e3709bfee8
ameraService.cpp
ameraService.h
24fdd7a48ad8ef66f1e91567a9f7f4d8f89faa7f 14-May-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Fix empty set handling for eviction." into mnc-dev
8050721de77a64c7b53467c5959f0ea38d80cab3 14-May-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Fix empty set handling for eviction.

Bug: 20304829
Change-Id: I120ed6e41ca592c3770797a5fb1e5ce556543949
tils/ClientManager.h
467b6e152e3064b8da58551effb39e72acec14af 14-May-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: update CameraModule deriveKey" into mnc-dev
56d78dffbd2e88987f693edb56d8fb9e5cd1c9f8 14-May-2015 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Cleanup to prepare() implementation" into mnc-dev
261394e3edbe10f4f145f543187dcfbabf702c11 13-May-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Cleanup to prepare() implementation

- Mutexes _might_ be a good idea
- Don't be surprised by behavior that's expected
- Use the existing logging macros

Bug: 20537148
Change-Id: Ie62985a786d7e6645b4e4fe019dd98b02891a1f7
pi2/CameraDeviceClient.cpp
evice3/Camera3Device.cpp
2882bb9a94bba6477552e7f696984e8e1ce052ff 13-May-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Fix arbitration priority calculation." into mnc-dev
be0b6b4a3770a9dd2ff357fe3e88a6ba11a976ff 13-May-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Fix arbitration priority calculation.

- Simplify priority calculation + handle constants
added for device sleep: FOREGROUND_SERVICE and
TOP_SLEEPING.

Bug: 19186859
Change-Id: Ia2a5517cd3150deaccb58a0aa1eaa583cb769add
ameraService.cpp
ameraService.h
d0e25a2529584b07e4fe3544f973c6b0ebda7fc3 12-May-2015 Ronghua Wu <ronghuawu@google.com> Merge "mediaresourcemanager: change resource manager service log to use ring buffer." into mnc-dev
28e8ef72dab287af59663b89b12507e43f760701 12-May-2015 Svetoslav <svetoslavganov@google.com> Fail gracefully when camera app op is not enabled.

Change-Id: I0c7c1dca1c0966efaf30bcfe12636953683712ab
ameraService.cpp
7e31a87177740d06c4a1bc81369d3cfb9e013ad9 12-May-2015 Svetoslav Ganov <svetoslavganov@google.com> Merge "Revert "Add camera app op - camera"" into mnc-dev
280405a138a0068694f3c39b4290f510173133d9 12-May-2015 Svetoslav Ganov <svetoslavganov@google.com> Revert "Add camera app op - camera"

This is not needed duplication of work

This reverts commit 32fa6d0e65dbf956e253a1006e9419dce2fe75c9.

Change-Id: I2c81b0dacb2ed99c408c79c1f9e22a4baa564494
ameraService.cpp
ameraService.h
ommon/Camera2ClientBase.cpp
022ed72e650f756288492ac7a10a7b41e0b14f82 12-May-2015 Ronghua Wu <ronghuawu@google.com> mediaresourcemanager: change resource manager service log to use ring buffer.

move the ring buffer implementation from libcameraservice to media include.

also add line prefix support to the service log.

Bug: 20637674
Change-Id: Ib6b32f31abe92c42644ef7012f1e3d46220ccfbd
ameraService.h
tils/RingBuffer.h
b28c344904e9bab979ec58a1c7b42b0bf25234ba 07-May-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: update CameraModule deriveKey

To add derived keys into availableCharacteristicsKey.

Bug: 20883751
Change-Id: I49d6d1bb79e6f31825dbfdebb039acbd5d9abe68
ommon/CameraModule.cpp
5da9f8450c8d91ec91b79a74542f997a4bbb2f27 07-May-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera2: allow mixing regular/reprocess requests" into mnc-dev
ed0412ed78321bf9d35537626e33115862f7c805 28-Apr-2015 Chien-Yu Chen <cychen@google.com> Camera2: allow mixing regular/reprocess requests

Allow mixing regular and reprocess requests in a capture burst. Also
call abandon() when deleting an input stream.

Bug: 20537735
Change-Id: If8c7781038173ab21c73f5ddc32f53793cf86fd9
pi2/CameraDeviceClient.cpp
evice3/Camera3InputStream.cpp
9c5af614aac9d9ffeee9124ce10f0f4bc025398d 05-May-2015 Zhijun He <zhijunhe@google.com> CameraService: update android.control.availableModes

Only advertise CONTROL_MODE_OFF when manual 3A controls are supported.
Also fixed some bug regarding static metadata update.

Bug: 20734940
Change-Id: I5061f3c49ec20dc8cf5d849771c000fb82543e8f
ommon/CameraModule.cpp
32fa6d0e65dbf956e253a1006e9419dce2fe75c9 02-May-2015 Svet Ganov <svetoslavganov@google.com> Add camera app op - camera

Change-Id: I26570cc0a23fdea740b416a26838d40cac296c85
ameraService.cpp
ameraService.h
ommon/Camera2ClientBase.cpp
0bbf8b213ad96051357e3ad6d6d2808bfa31a59a 30-Apr-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Fix fuzztesting segfault in connect.

Bug: 20721655
Change-Id: I0d974cad19683a8c86a76dac7f61ac0010bd977a
ameraService.cpp
ameraService.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
pi1/client2/Parameters.cpp
pi1/client2/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
pi1/client2/CallbackProcessor.cpp
f2326ac96366ec4d05f470cc4a0b407e7805bab7 16-Apr-2015 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: Add support for module init, some logging updates"
3bf628dc0f4b0ca2c5188652072d5814625f85ae 16-Apr-2015 Chien-Yu Chen <cychen@google.com> Merge "camera2: remove unnecessary flashlight error messages"
f6463fc62a09b8aad8e811a9abbe9f4d9f2688f9 08-Apr-2015 Chien-Yu Chen <cychen@google.com> camera2: remove unnecessary flashlight error messages

Bug: 20069129
Change-Id: I0e721bfad1f0218744d3554397e3ec9b8bc07a19
ameraService.cpp
09f02e55ec4227a29662e7f6ab07fe7d09d9eba0 16-Apr-2015 Chien-Yu Chen <cychen@google.com> Merge "Camera3: allow reconfiguring the input stream"
1527f07eb2b2b40f6b8f53a4644e6a400bddb460 08-Apr-2015 Eino-Ville Talvala <etalvala@google.com> CameraService: Add support for module init, some logging updates

- Add support for camera HAL module init() method on v2.4
- Add logging for service errors such as failure to init
- Minor cleanup to dumping of event log

Bug: 20016050
Change-Id: I94e18b52c186f16fb096457015f7ae761e867fd8
ameraService.cpp
ameraService.h
ommon/CameraModule.cpp
ommon/CameraModule.h
90746f4203989fceb0f2131163435644040218d3 15-Apr-2015 Chien-Yu Chen <cychen@google.com> Camera3: allow reconfiguring the input stream

Change-Id: Ia9d0db1f3378264fc9173bfc8706c8f955b79182
evice3/Camera3Stream.cpp
5e1c007038df74b389018e762d5059cacecff59e 15-Apr-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: allow non-supported template"
6a07a72588c99d01df9d2c4bcd5bdb15db8937c9 15-Apr-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: fix invalid access of static_camera_characteristics"
7768dedbce78e0bdbed014debd90faef88e9dacb 15-Apr-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix invalid access of static_camera_characteristics

Bug: 20260866
Change-Id: Ib2b9ef807d66989515ac1a2e9f623fdd226a665a
ommon/CameraModule.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
pi1/Camera2Client.cpp
pi1/Camera2Client.h
4d44cad22ea925a651463f2d51d6586c14d4b787 11-Apr-2015 Eino-Ville Talvala <etalvala@google.com> Camera2: Add prepare for output streams

The prepare call asynchronously pre-allocates buffers for a given
output stream, and then fires the onPrepared callback.

Not implemented for Camera2Device or used in Camera2Client.

Change-Id: I1cccdfff846dd6985133c591dbdceed823929ade
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.h
ommon/CameraDeviceBase.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3DummyStream.cpp
evice3/Camera3DummyStream.h
evice3/Camera3IOStreamBase.cpp
evice3/Camera3IOStreamBase.h
evice3/Camera3InputStream.cpp
evice3/Camera3InputStream.h
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
evice3/Camera3StreamInterface.h
0336d3649f13506a7daf425690d225beac9d214f 14-Apr-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: allow non-supported template

Bug: 19395059
Change-Id: I42bbd99fef6055173062266c1a490311105c6814
evice3/Camera3Device.cpp
2f33dbc6ca08d45efea2df775c158e2a11e07ab6 14-Apr-2015 Chien-Yu Chen <cychen@google.com> Merge "camera2: add reprocess support"
4264bbd7af97aeae87f1907b96f62e4025c989d0 14-Apr-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera: Fix client eviction/disconnect race."
618ff8a48a0c895a78f91f5692510c2a809425c3 13-Mar-2015 Chien-Yu Chen <cychen@google.com> camera2: add reprocess support

Add support to create input stream, submit reprocess capture requests,
and receive reprocess capture results.

Change-Id: Iee2d4313f3d52616a484eaea7a28f5ef9d8a674b
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/CameraDeviceBase.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3InputStream.cpp
evice3/Camera3InputStream.h
evice3/Camera3OutputStream.cpp
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
evice3/Camera3StreamInterface.h
4f9576bf48c5909782c12490e8a9faa974ae68d6 11-Apr-2015 Ruben Brunk <rubenbrunk@google.com> camera: Fix client eviction/disconnect race.

- Add blocking wait in camera service connect call to
prevent race when client has called disconnect while
eviction of that client is taking place, resulting
in early call of device initialization before all
HAL resources are available.

Bug: 20038135
Change-Id: I7afc5bfa23612ba7f83293fa542ff983a5991230
ameraService.cpp
ameraService.h
tils/ClientManager.h
f945d614116015361e489634737b9f70b6c39e66 11-Apr-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera: Update camera service logging and validation."
a8ca9157d21510fbd474bd31748f4fe0d4635dd7 07-Apr-2015 Ruben Brunk <rubenbrunk@google.com> camera: Update camera service logging and validation.

- Expand the logging included by the camera service.
- Update user validation checks in connect calls so that
these can be correctly called from the camera service.

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

Change-Id: Id018e3ce21b4344d09a877395eb355adba9e8fa2
pi1/Camera2Client.cpp
253930b927d375413a42f170fa1ef8d98b8f7cb4 01-Apr-2015 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Enforce client eviction on user switch."
36597b241c59eba7e55d5150092947a748c5e9cb 21-Mar-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Enforce client eviction on user switch.

Bug: 19186859
Change-Id: I172a2ce46c8e8a131ae7e8dd99d60c5f4f0d6668
ameraService.cpp
ameraService.h
904edf8413039d816e5aaa0d4db51d34e08c232a 31-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: iterate through all encoders for finding max video size"
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
pi1/client2/Parameters.cpp
3e414355fbed266916b446eaabbb3f9c153635b2 25-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: fix release fence logic"
4c9736fbc82b8b76c996c966583d71ca1df17ca6 06-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix release fence logic

According to spec, HAL will set release_fence to acquire_fence
when error happened (usually during flush call). Camera service
should not refer to the acquireFence anyhow since per spec HAL
needs to set it to -1 if acquireFence has been waited on.

Change-Id: I809355d0c8c71f78f657e37d19221fd1f5bdc90b
evice3/Camera3OutputStream.cpp
525907aa2cf2148186ed55e47e424395b9a43dca 25-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: fix metadata assertion"
54298b338cf9f782f2ac681a15e6cbbb99649350 25-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix metadata assertion

Bug: 19897963
Change-Id: I6b383c4750f31691a1c02e927bbeb0c1998a9eff
ommon/CameraModule.cpp
ommon/CameraModule.h
40272963eb8f8d8d7a1f39e6a25ae73bc755e553 24-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "camera: update CameraModule"
676b21b30edbd74d7b9aae247961a1ffde1b8993 24-Feb-2015 Chien-Yu Chen <cychen@google.com> camera: update CameraModule

1. Add more accessor methods to CameraModule to prevent exposing
raw module pointer
2. Use KeyedVector to replace array

Bug: 19897963

Change-Id: I111cc093f09f5fb3c4b13693d5d0687e1f441058
ameraFlashlight.cpp
ameraService.cpp
ommon/CameraModule.cpp
ommon/CameraModule.h
evice1/CameraHardwareInterface.h
9efdf956cc2eef63fef609375901d6c8df6351b6 19-Mar-2015 Ruben Brunk <rubenbrunk@google.com> camera2: Remove ProCamera.

Bug: 19186859
Change-Id: I4aaadb53db65b479f92cbb3c05329d1e40317900
ndroid.mk
ameraService.cpp
ameraService.h
pi2/CameraDeviceClient.cpp
pi_pro/ProCamera2Client.cpp
pi_pro/ProCamera2Client.h
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.h
446ef2025374cee74ee6291b2a11bfa56017ea74 19-Mar-2015 Chih-Hung Hsieh <chh@google.com> Merge "Fix link error of PROCESS_STATE_NONEXISTENT."
54b4246bb2025a5dcfdf1611c199998448d28424 19-Mar-2015 Chih-Hung Hsieh <chh@google.com> Fix link error of PROCESS_STATE_NONEXISTENT.

* A reference to PROCESS_STATE_NONEXISTENT will cause link error with
clang or standard C++ compiler because there is no out-of-class definition,
although g++ is allowing it.
Use +PROCESS_STATE_NONEXISTENT to get the value instead of reference.

Change-Id: I62049584b94e6847b64b572f6ef6c3e9dcc573eb
ameraService.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
ndroid.mk
ameraDeviceFactory.cpp
ameraFlashlight.cpp
ameraService.cpp
ameraService.h
pi1/Camera2Client.cpp
pi1/CameraClient.cpp
pi2/CameraDeviceClient.cpp
tils/AutoConditionLock.cpp
tils/AutoConditionLock.h
tils/ClientManager.h
tils/RingBuffer.h
b97babb8c08969b55af3b6456d15f764c8873d3f 12-Mar-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: plumbing rotation field through

Change-Id: I0f4343a0bfa7bf09ba887c78a1da1c08daa35333
ameraFlashlight.cpp
pi1/client2/CallbackProcessor.cpp
pi1/client2/JpegProcessor.cpp
pi1/client2/StreamingProcessor.cpp
pi1/client2/ZslProcessor.cpp
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
pi_pro/ProCamera2Client.cpp
ommon/CameraDeviceBase.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3DummyStream.cpp
evice3/Camera3DummyStream.h
evice3/Camera3IOStreamBase.cpp
evice3/Camera3IOStreamBase.h
evice3/Camera3InputStream.cpp
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
evice3/Camera3ZslStream.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
pi1/client2/StreamingProcessor.cpp
pi1/client2/StreamingProcessor.h
pi1/client2/ZslProcessor.cpp
pi1/client2/ZslProcessor.h
pi1/client2/ZslProcessor3.h
evice3/Camera3InputStream.cpp
evice3/Camera3InputStream.h
ui/RingBufferConsumer.cpp
ui/RingBufferConsumer.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
ameraFlashlight.cpp
pi1/client2/CallbackProcessor.cpp
pi1/client2/JpegProcessor.cpp
pi1/client2/StreamingProcessor.cpp
pi1/client2/ZslProcessor.cpp
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
pi_pro/ProCamera2Client.cpp
ommon/CameraDeviceBase.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3DummyStream.cpp
evice3/Camera3DummyStream.h
evice3/Camera3IOStreamBase.cpp
evice3/Camera3IOStreamBase.h
evice3/Camera3InputStream.cpp
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
evice3/Camera3ZslStream.cpp
d231fd61ca94441183abda9766ce6906a5b4c3cf 26-Feb-2015 Chien-Yu Chen <cychen@google.com> camera: implement flashlight for HAL v1 devices

Implement flashlight for HAL v1 devices and remove
CameraHardwareInterface's dependency on CameraService to avoid
circular dependency.

Bug: 2682206
Change-Id: Id5bbccef085b607a6189763fd7fbe2e3f26868c8
ameraFlashlight.cpp
ameraFlashlight.h
ameraService.cpp
ameraService.h
ommon/CameraModule.cpp
ommon/CameraModule.h
evice1/CameraHardwareInterface.h
evice2/Camera2Device.cpp
evice3/Camera3Device.cpp
88da526d97442c80731e01bfc94c6b47c4b0c3c7 17-Feb-2015 Chien-Yu Chen <cychen@google.com> camera: fix flashlight implementation for HAL v2

Update torch availability when the camera device availability changes.

For device HAL v2 and v3 implementation, notify torch unavailable for
all camera devices with a flash unit when a camera device is opened.
Notify torch available for all camera devices with flash unit when
all camera devices are closed.

Don't invoke torch status callback in camera service. Invoke torch
status callback in HAL or FlashControlBase implementations to avoid
race condition.

Clean up previous CL.

Bug: 2682206
Change-Id: I24f5478f467b2c680565fe98f112eef33e2547a1
ameraFlashlight.cpp
ameraFlashlight.h
ameraService.cpp
ameraService.h
d031aaae9e93ef2860070eee2c191b1cf428cf46 20-Feb-2015 Yin-Chia Yeh <yinchiayeh@google.com> Merge "CameraService: fix invalid access of camera metadata"
9a4fa2dfb7ce565fabfb7a7bef4f4adfea191f05 20-Feb-2015 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Remove RAW_SENSOR in favor of RAW16"
a97dfeb91aae9569ff11a5a40634e2960c03915e 20-Feb-2015 Eino-Ville Talvala <etalvala@google.com> Camera: Remove RAW_SENSOR in favor of RAW16

Change-Id: I69ca24c69f58be958efdef300b127401d2b2e880
pi1/Camera2Client.cpp
pi1/client2/Parameters.cpp
a9284a8d9e6cb27e6d428be3f70a854d978dc282 19-Feb-2015 Chien-Yu Chen <cychen@google.com> Merge "camera: implement flashlight control"
b6dc0bf1ce7d54995943c3cd6885f35db77728fc 18-Feb-2015 Yin-Chia Yeh <yinchiayeh@google.com> CameraService: fix invalid access of camera metadata

static_camera_characteristics is not defined in API1.

Change-Id: I422953081b0a5581e12fc4b16052b67ca8062186
ommon/CameraModule.cpp
228711d4d25ab434c273c92fc01662c0a6b3adbf 13-Feb-2015 Amith Yamasani <yamasani@google.com> Look up user-specific device policy for disabling camera

Camera can be disabled on a per-user basis by device admins.
Changed the system property format to be per-user so that
the policy can be applied based on calling user.

TODO: Ideally this policy information should be pulled from the
DevicePolicyManager rather than relying on system properties.
Property changes will not be applied immediately either, if
there's no listener.

Bug: 19345698
Change-Id: Ia00034726260bc9ff28ac592f20a27b5c9a77d58
ameraService.cpp
3068d73c6c7e1f44523b1466b903a9c82408b258 09-Feb-2015 Chien-Yu Chen <cychen@google.com> camera: implement flashlight control

Implement flashlight API for module v2.4 by calling module APIs and
by for hal v2 and v3 by using CameraDeviceBase.

Bug: 2682206
Change-Id: Ib8b77f6fd462489d672f27e14fe37801d35b7544
ndroid.mk
ameraFlashlight.cpp
ameraFlashlight.h
ameraService.cpp
ameraService.h
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
ndroid.mk
ameraService.cpp
ameraService.h
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/CameraClient.cpp
pi1/CameraClient.h
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
pi_pro/ProCamera2Client.cpp
pi_pro/ProCamera2Client.h
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.h
ommon/CameraDeviceBase.h
ommon/CameraModule.cpp
ommon/CameraModule.h
evice1/CameraHardwareInterface.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
656d738cab67349f4b5a45473a0c48cf89c68fd0 21-Jan-2015 Yin-Chia Yeh <yinchiayeh@google.com> am a789e519: am 0c4e56d0: Camera: make sure jpeg buffer size isn\'t too small

* commit 'a789e51942c7572e0c9f54326d6d9d0ff65d6941':
Camera: make sure jpeg buffer size isn't too small
0c4e56d0baaa19fcf17234b38d634b7281e2ae37 10-Jan-2015 Yin-Chia Yeh <yinchiayeh@google.com> Camera: make sure jpeg buffer size isn't too small

Assuming the jpeg header can take up to 256KB, make sure we always
allocate enough size for the image data.

Bug: 18962703
Change-Id: I08eb3d198d12f71f3ab7266324e80fe7410bdc89
evice3/Camera3Device.cpp
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
pi1/Camera2Client.cpp
f44bdeb7aff53309ed09fdbf48be526c58f7964b 10-Dec-2014 Chien-Yu Chen <cychen@google.com> am 61697a5c: am 9cea7aa4: Merge "Camera3Device: support shutter after result" into lmp-mr1-dev

* commit '61697a5c1ddd2ad882a889474822851187734cf4':
Camera3Device: support shutter after result
3b46819eb0dd9ea510619c351d7ffdc244ed511d 10-Dec-2014 Ruben Brunk <rubenbrunk@google.com> Merge commit '2340e5a8' into manualmerge

Change-Id: I0299d49b7e283072fc646de717fd7c1643241984
9cea7aa494f6f93a473cab936af79868fc8efea6 10-Dec-2014 Chien-Yu Chen <cychen@google.com> Merge "Camera3Device: support shutter after result" into lmp-mr1-dev
6533dc1c576af241c9c1753f29d6777802d4c496 10-Dec-2014 Ruben Brunk <rubenbrunk@google.com> Merge "Camera2: Round unsupported surface sizes in configure." into lmp-mr1-dev
43e69a6792f01b86b4aaf2314534f637e11c5843 26-Nov-2014 Chien-Yu Chen <cychen@google.com> Camera3Device: support shutter after result

Move the code to remove in-flight requests from processCaptureResult
to a separate function so it can be called when the framework
receives a result or a shutter event. An in-flight request will only
be removed when both results and the shutter event arrive in the
case of a successful request.

Also send out results only after the shutter event receives.

Bug: 18135776
Change-Id: I340db1a495c711b0913784d43fd0f144871e4420
evice3/Camera3Device.cpp
evice3/Camera3Device.h
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
bba75576c3bc5a90cd8e14bd053ab2d74a6c7e9d 21-Nov-2014 Ruben Brunk <rubenbrunk@google.com> Camera2: Round unsupported surface sizes in configure.

Bug: 16030677
Change-Id: Ida04e04f41983b9126609522dd12064a7bf9645f
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
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
pi1/client2/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
pi1/client2/ZslProcessor3.cpp
d802d0718d7639da1bef1128a840cfd05200af55 26-Nov-2014 Zhijun He <zhijunhe@google.com> am ec7b26f0: am 512dd849: Merge "camera: fix frame deletion logic in mInFlightMap" into lmp-mr1-dev

* commit 'ec7b26f06f7b1b6334ef1139ac33548ed0510284':
camera: fix frame deletion logic in mInFlightMap
31867b30d3144decd42de0214d8b71c45a2c8cc1 14-Nov-2014 Ruchit Sharma <ruchits@nvidia.com> camera: fix frame deletion logic in mInFlightMap

For per-frame error notifications, camera3.h requirements state that all the
buffer handles for a failed frame capture must be returned via
process_capture_result() call(s). Hence, Camera3Device needs to ensure that
the frame entry is not deleted from mInFlightMap until all buffers for that
frame have been returned by HAL.

Bug: 17757940

Change-Id: I2579ca7980d2fd67d53abc530e2706538f7d3d3a
evice3/Camera3Device.cpp
6b6d8a79ef821541a7687ed924959369f73fc977 21-Nov-2014 Ruben Brunk <rubenbrunk@google.com> am ffa3e71e: am bc0f452b: Merge "Camera2: Fix CameraParameters parse segfault." into lmp-mr1-dev

* commit 'ffa3e71e47215b68fe4ae0b7a3f976db648d63d3':
Camera2: Fix CameraParameters parse segfault.
d0e12a161471823d1ab269cb608be3f3b0a71ed1 21-Nov-2014 Dan Albert <danalbert@google.com> am 902dc42d: am 07715ac3: Merge "C++11 compatibility."

* commit '902dc42d79b075395d484ce1c71f215b199aaa2a':
C++11 compatibility.
5fc9d902510ccd04db80e0bc6aa679a4317a51b2 20-Nov-2014 Ruben Brunk <rubenbrunk@google.com> Camera2: Fix CameraParameters parse segfault.

Bug: 18331142
Change-Id: I41feec93f753f97b3e6bf963deb4a42b73406421
ameraService.cpp
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
pi1/client2/Parameters.h
evice1/CameraHardwareInterface.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
pi1/Camera2Client.cpp
pi1/client2/Parameters.cpp
pi1/client2/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
3171f4e12e5cabb2b496be6aa660aaa83e8fe77d 17-Nov-2014 Chien-Yu Chen <cychen@google.com> Merge "CameraService: normalize face rectangles properly" into lmp-mr1-dev
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
ameraService.cpp
ameraService.h
pi1/Camera2Client.cpp
pi1/CameraClient.cpp
pi2/CameraDeviceClient.cpp
pi_pro/ProCamera2Client.cpp
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.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
pi1/client2/FrameProcessor.cpp
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
7deab61ade08ffd0971323594ded4937e2db8265 13-Nov-2014 Chien-Yu Chen <cychen@google.com> am 06ce4cf5: Merge "Camera2Device: fix camera metadata leaks" into lmp-mr1-dev automerge: 7c77c75

* commit '06ce4cf5e3f8715635bc1913dcbb1d32fbd510a7':
Camera2Device: fix camera metadata leaks
7c77c75d43ac2a40f2b5ce98085ef68f8ba3b4f2 12-Nov-2014 Chien-Yu Chen <cychen@google.com> Merge "Camera2Device: fix camera metadata leaks" into lmp-mr1-dev
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
80de5dca0b8e04f81da0d15dff957f82551eaafc 08-Nov-2014 Chien-Yu Chen <cychen@google.com> Camera2Device: fix camera metadata leaks

bug 11132653

Change-Id: I5445b020c3aeaac9a556c023568adac635834356
evice2/Camera2Device.cpp
evice2/Camera2Device.h
e992e75053e98e3699af6e344c11b787e30411ad 08-Nov-2014 Eino-Ville Talvala <etalvala@google.com> Camera: Guard against asBinder() calls on NULL interfaces

Bug: 18207548
Change-Id: I9879c9b4c0282a6b96b77398f62beedc47f7f0a0
ameraService.cpp
pi1/Camera2Client.cpp
pi1/CameraClient.cpp
pi2/CameraDeviceClient.cpp
pi_pro/ProCamera2Client.cpp
ommon/Camera2ClientBase.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
pi1/client2/BurstCapture.cpp
pi1/client2/BurstCapture.h
pi1/client2/CallbackProcessor.cpp
pi1/client2/CallbackProcessor.h
pi1/client2/JpegProcessor.cpp
pi1/client2/JpegProcessor.h
pi1/client2/StreamingProcessor.cpp
pi1/client2/StreamingProcessor.h
pi1/client2/ZslProcessor.cpp
pi1/client2/ZslProcessor.h
ui/RingBufferConsumer.cpp
ui/RingBufferConsumer.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
pi1/client2/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
pi1/Camera2Client.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
pi1/Camera2Client.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
pi1/client2/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
pi1/Camera2Client.cpp
pi1/client2/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
pi1/client2/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
pi1/client2/Parameters.cpp
e0711f2651121754a10c784e3b149024d17fa4d5 18-Aug-2014 Ruchit Sharma <ruchits@nvidia.com> camera: add traces for KPI measurement

Bug: 17658101
Change-Id: I1d8035c4a8fba7b88a87f205ce57c13d812e9df5
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
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
pi1/Camera2Client.cpp
d3b7327c38964773453a861099c74f547aab9662 20-Sep-2014 Zhijun He <zhijunhe@google.com> Merge "API1: ZSL buffers should be skipped for manual AF mode" into lmp-dev
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
pi1/client2/ZslProcessor3.cpp
b9d2f3333369183344aa89c7be1e643a44296d48 19-Sep-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Add client name/pid to device open/close logging.

Bug: 15672812
Change-Id: I1162c6d9d0a1eea1dd32949a04c295b4941d2602
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.h
67489d2f5668441a36cb1f1157e80ec8684023bf 19-Sep-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Fix dump methods for two clients

Actually write dump text into the provided FD, and add a bit more
dump data into CameraDeviceClient.

Bug: 17570762
Change-Id: I37b1db85188855d4e89c8050c4b13f0d22e07e0c
pi2/CameraDeviceClient.cpp
pi_pro/ProCamera2Client.cpp
47e89d7dcb4406b197c13764897fb28ac1e0b09b 16-Sep-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera2: handle one more videosnapshot failure" into lmp-dev
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
pi1/Camera2Client.cpp
dd5f7dc1a870877c2f0cbe0b595c42b77035f9ec 15-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3Device: Treat failure to idle as an error" into lmp-dev
83a23e1e1e45d9e2f5497e214796250f74aad1d4 15-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Merge "Camera1: Validate scene mode override AF mode" into lmp-dev
9c8a091436052fb0f3290356abe1ac55b7bae8a2 14-Sep-2014 Eino-Ville Talvala <etalvala@google.com> Camera3Device: Treat failure to idle as an error

Bug: 16899526
Change-Id: Ia995aac6360c9c41ed654af5a7052480f23903d8
evice3/Camera3Device.cpp
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
pi1/client2/ZslProcessor3.cpp
pi1/client2/ZslProcessor3.h
evice3/Camera3Device.cpp
evice3/Camera3Device.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
pi1/client2/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
pi1/client2/Parameters.cpp
pi1/client2/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
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/client2/StreamingProcessor.cpp
pi1/client2/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
pi1/client2/ZslProcessor3.cpp
pi1/client2/ZslProcessor3.h
evice3/Camera3ZslStream.cpp
evice3/Camera3ZslStream.h
ui/RingBufferConsumer.cpp
ui/RingBufferConsumer.h
fcf5fea2ac99e6359998078d09fd7e21269dca4a 11-Sep-2014 Igor Murashkin <iam@google.com> camera: add latest parameters to dumpsys for api1 cameras

Bug: 17290106
Change-Id: I08ac1659d0367613c37669d5bf6e6bf7b2b63bc2
pi1/CameraClient.cpp
pi1/CameraClient.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
pi1/Camera2Client.cpp
pi1/client2/ZslProcessor3.cpp
pi1/client2/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
ndroid.mk
pi1/Camera2Client.cpp
pi1/client2/ZslProcessor.cpp
pi1/client2/ZslProcessor.h
pi1/client2/ZslProcessorInterface.cpp
pi1/client2/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
pi1/Camera2Client.cpp
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
evice3/Camera3Device.cpp
evice3/Camera3Stream.cpp
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
pi1/client2/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
pi1/CameraClient.cpp
8b250cb67d0cab6234c0e8e0e21342d03c1eca5d 29-Aug-2014 Eino-Ville Talvala <etalvala@google.com> Merge "CameraService: Create a dummy stream when 0 streams are requested." into lmp-dev
16a2ada049447c156648812b94d25be07869f284 27-Aug-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Create a dummy stream when 0 streams are requested.

A workaround for a camera device HAL v3.2 or older specification hole - it's
not acceptable to configure_streams with 0 output streams. However, we allow for
this at the public API level, to allow an application to release all output streams.

So in this case, create a dummy stream that doesn't actually do anything as a placeholder.

Bug: 17220694
Change-Id: Ib25242ffc2c9f2b2f619fd5fe6d652266579da85
ndroid.mk
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3DummyStream.cpp
evice3/Camera3DummyStream.h
01b9256a1358110ed718c1a83c2a1808d4afbb92 28-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "cameraservice: decrease zsl metadata queue size by 1" into lmp-dev
13d98f419c614c5d389b06232ff99f7fe00dabf7 28-Aug-2014 Zhijun He <zhijunhe@google.com> Merge "Camera API1: Fix ZSLProcessor3 deadlock" 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
pi1/client2/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
pi1/client2/ZslProcessor3.cpp
1754351d9199721e7e7943461689e399ef015260 06-Aug-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Correct API2 error handling

- Add more error codes to the binder camera2 callbacks
- Translate HAL errors to callback errors
- When flushing, report failures for queued requests
- Treat stream config failure as nonfatal
- Send request errors when buffers aren't available for captures

Bug: 15524101
Bug: 14448494
Bug: 11272459
Bug: 17160301
Change-Id: I81aa54e805a9cce1cb8a6a9374549daa7666deb2
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
evice3/Camera3StreamInterface.h
61deb78a8a608955e120469ea7a5d39e652b2ae8 22-Aug-2014 Zhijun He <zhijunhe@google.com> Camera API1: remove unnecessary buffer count check

This check doesn't work with ZSL use case. Since the ZSL is both an input and
output stream, When an input buffer is acquired, checking the handout buffer
count for that stream could trigger false alarm when all the output buffers
are sent to hal, instead, we should wait for an output buffer to return.

Bug: 17188380
Change-Id: I7eb166eb49d2f063189d993195ef389d2cf4f2b4
evice3/Camera3IOStreamBase.cpp
fa1fc7086313f2f1868cae4c1a5698e592a437cb 22-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera: fix triggerId logic" into lmp-dev
1da8c89a9d4a2319bb939771e43960c118445329 22-Aug-2014 Igor Murashkin <iam@google.com> Merge "camera: Configure streams immediately when API2 does configuration" into lmp-dev
c00a25ccce0734bf5627cf02d0c4fb3cf051ce15 21-Aug-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera: fix triggerId logic

Fix missing triggerId introduced by previous cleanup change.

bug 17108154
bug 17053130

Change-Id: Ifda55d5fbe992d98f335a8427aa256d78a856586
evice3/Camera3Device.cpp
evice3/Camera3Device.h
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
pi1/client2/ZslProcessor3.cpp
pi1/client2/ZslProcessor3.h
e2d167eb689d7a536805f950c31f11b9e9c578ae 20-Aug-2014 Igor Murashkin <iam@google.com> camera: Configure streams immediately when API2 does configuration

This makes the configuration more eager (no more waiting until the first
request) and also allows any errors to immediately be sent back to the
client.

Bug: 16629195
Change-Id: I0c365bc8f760466916dcc089217a43c43f9f4c9d
pi2/CameraDeviceClient.cpp
ommon/CameraDeviceBase.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.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
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
c758f2276f9f9fca9ea24a6647361726acb03646 20-Aug-2014 Igor Murashkin <iam@google.com> camera: hal3: Remove register_stream setprop check

camera3_device_t::register_stream must always be NULL in HAL3.2+ cameras

Bug: 13914251
Change-Id: I116ee71135a827c8b4db61cd91f56ba56da3f0ef
evice3/Camera3Stream.cpp
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
ameraService.cpp
ameraService.h
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/CameraClient.cpp
pi1/CameraClient.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
pi1/client2/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
pi1/client2/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
pi1/client2/CallbackProcessor.cpp
pi1/client2/JpegProcessor.cpp
pi1/client2/StreamingProcessor.cpp
pi1/client2/ZslProcessor.cpp
pi2/CameraDeviceClient.cpp
pi_pro/ProCamera2Client.cpp
ommon/CameraDeviceBase.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
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
pi1/Camera2Client.cpp
pi1/CameraClient.cpp
7e4c0033c5d2f9d5f53f520a9b0a2fcb8023c810 07-Aug-2014 Zhijun He <zhijunhe@google.com> Camera: Need consider AF state for ZSL buffer selection

Bug: 16569983
Change-Id: I65e604e382ac0b98777155ad480ec3f6071e1a76
pi1/client2/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
pi1/Camera2Client.cpp
7d70c5e5fe787ae5d7af8830864d208749d6337f 25-Jul-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Replace deprecated native_window methods

Change-Id: I3be5a720ac8b488d1e507c606a9146480faeef63
evice2/Camera2Device.cpp
evice3/Camera3OutputStream.cpp
f67e23ef637d0b53a0d4bebb68c654234df3da94 24-Jul-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Clean up availability listeners and HAL error codes

- Refactor where availability listeners are called to centralize behavior,
ensuring that all client creation/destruction invokes the listeners
- Clean up some of the client hierarchy
- Filter error codes from key HAL calls to ensure proper reporting

Bug: 16514157
Bug: 16483222
Change-Id: I59875a865b6a508b47423946c78862da8df34cd1
ameraService.cpp
ameraService.h
ommon/Camera2ClientBase.cpp
evice1/CameraHardwareInterface.h
evice2/Camera2Device.cpp
evice3/Camera3Device.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
pi1/Camera2Client.cpp
evice3/Camera3Device.cpp
evice3/Camera3OutputStream.h
evice3/Camera3ZslStream.cpp
evice3/Camera3ZslStream.h
f78cd5e5e6af5d06de15e6f91b98e648d89fc409 23-Jul-2014 Zhijun He <zhijunhe@google.com> Merge "Camera3: only append partial result to partial result collection" into lmp-dev
5d76e1a639c1bae9ea7d9af1124abf1c94353344 23-Jul-2014 Zhijun He <zhijunhe@google.com> Camera3: only append partial result to partial result collection

Otherwise, the metadata entries will be duplicated.

Change-Id: If0cd96e09960fdf746a70913d380e9036745a944
evice3/Camera3Device.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
pi1/Camera2Client.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
pi1/Camera2Client.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
pi1/client2/FrameProcessor.cpp
pi1/client2/FrameProcessor.h
pi1/client2/ZslProcessor3.cpp
ommon/CameraDeviceBase.h
ommon/FrameProcessorBase.cpp
ommon/FrameProcessorBase.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
5698d4461a260dbf208484383f692b03c6473e74 18-Jun-2014 Ruben Brunk <rubenbrunk@google.com> camera2: Set orientation flags for hardware composer.

Bug: 15116722
Change-Id: I3fcc9aea38afcbd665f86c511a9929fe9a6a3a8f
pi2/CameraDeviceClient.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
pi1/client2/StreamingProcessor.cpp
pi1/client2/ZslProcessor3.cpp
ommon/CameraDeviceBase.h
evice3/Camera3Device.cpp
2e8863b31e987f9bb54e52645e03e75120863a2e 08-Jul-2014 Eino-Ville Talvala <etalvala@google.com> Merge "av: native_window_set_buffers_geometry is deprecated."
c09cec7ba6df108b91d9d9583b340580bafa5d0b 03-Jul-2014 Pierre Couillaud <pierre@broadcom.com> av: native_window_set_buffers_geometry is deprecated.

native_window_set_buffers_geometry is deprecated, but
__set_buffers_geometry is still used for device1 camera
support.

replace deprecated call with its equivalent combination of
native_window_set_buffers_dimensions and
native_window_set_buffers_format.

Change-Id: I4940367dcae6049451508bfdfc11c16907ec1afc
Signed-off-by: Pierre Couillaud <pierre@broadcom.com>
evice1/CameraHardwareInterface.h
c98bd8d9bf81663b5cd9c79e79d6e7869c1146e6 07-Jul-2014 Zhijun He <zhijunhe@google.com> Camera3: only return input buffer when it is sent in request

This is to WAR the case where HAL sends non-NULL input_buffer in capture
result even capture framework doesn't send input buffer in the request.
It's very likely the input_buffer is uninitialized, and we shouldn't
use it. Log a warning for such case as well.

Bug: 16115675
Bug: 16117312
Change-Id: Ib299b45fbfe084059a9f546ded239c8094b039e2
evice3/Camera3Device.cpp
evice3/Camera3Device.h
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
pi1/client2/ZslProcessor3.cpp
pi1/client2/ZslProcessor3.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
evice3/Camera3ZslStream.cpp
954d248e02e19f8ecd165804b7d063d346154f4c 20-Jun-2014 Gaurav Batra <gbatra@nvidia.com> Camera API1/2: don't register the same listener multiple times

FrameProcessorBase allows register the same metadata result listener multiple
times with the same range IDs, which causes the same metadata result is
delivered multiple times for the same listener. This is problematic as client
like ZslProcessor's updateStream is called multiple times between captures, and
each updateStream calls registerListener unconditionally. The the ZSL metadata
result queue will be flooded with same metadata result multiple times and the
number of same result will keep growing until the queue is full.

Change-Id: I2ff7808e5dce61068a7111e7fbbce2aba95198cd
ommon/FrameProcessorBase.cpp
ommon/FrameProcessorBase.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
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/client2/CaptureSequencer.cpp
pi1/client2/ZslProcessor.cpp
pi1/client2/ZslProcessor3.cpp
pi2/CameraDeviceClient.cpp
ommon/FrameProcessorBase.cpp
ommon/FrameProcessorBase.h
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
pi1/client2/FrameProcessor.cpp
pi1/client2/FrameProcessor.h
evice3/Camera3Device.cpp
e2d83756cb088db15fda73616ca097b8d190e1a1 23-Jun-2014 Zhijun He <zhijunhe@google.com> Camera: Clear ZSL buffer queue when jpeg size is changed

Bug: 15284653
Change-Id: I4778e8443945d918801102ba600874568bde12dc
pi1/Camera2Client.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
ameraService.cpp
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
fc2aa4c228aa3f2d85fe15faa959dbacc85b731a 20-Jun-2014 Yin-Chia Yeh <yinchiayeh@google.com> Merge "Camera2: Fix lastFrameNumber counter in flush case"
8684b7f7977f535260367040931c1fd994cca3b4 13-Jun-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2: Fix lastFrameNumber counter in flush case

Decrement the counter for those repeating requests never
sent to device.

Change-Id: I2064e51cb5d509d86dbde4a89e8157de33f574b0
evice3/Camera3Device.cpp
evice3/Camera3Device.h
fcd58351b6d7fcd62a0fe65b425723dd53d10e5e 20-Jun-2014 Zhijun He <zhijunhe@google.com> Merge "Camera2/3: Don't release recording buffer when stream is active"
50468413251bd92a1cdf9de8275a994dab8648d1 19-Jun-2014 Mark Salyzyn <salyzyn@google.com> libcameraservice: 64-bit compile warnings

Change-Id: I168332a0d4699f6f5597d4883342aa7af7ed92c6
pi2/CameraDeviceClient.cpp
3d07d1ad0e60fd2b9a25563a0c24faf7f1fb1afc 20-Jun-2014 Igor Murashkin <iam@google.com> camera: Let #connectLegacy calls through with unspecified HAL version

This enables the camera2 shim to open a camera1 device without
turning the error codes into a RuntimeException.

Change-Id: I08d9d1e30e72025c41bd54b702d7ae95b32257be
ameraService.cpp
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
ameraService.cpp
ameraService.h
pi1/CameraClient.cpp
evice1/CameraHardwareInterface.h
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
pi1/client2/StreamingProcessor.cpp
07b56676694b01825df2375e4c2ead4e55fe2d98 18-Jun-2014 Igor Murashkin <iam@google.com> Merge "camera: Add #getLegacyParameters, #supportsCameraApi to ICameraService"
65d14b9825311f9d1847cf282bd0419e71bac666 17-Jun-2014 Igor Murashkin <iam@google.com> camera: Add #getLegacyParameters, #supportsCameraApi to ICameraService

Change-Id: Ic86c8df3d703e7cf89caa856387e2c0a1b977401
ameraService.cpp
ameraService.h
63d877fe4138a95c27f1020b34e81bfa0430d2b8 17-Jun-2014 Eino-Ville Talvala <etalvala@google.com> CameraService: Fix permissions check issues

Bug: 15677063
Change-Id: I012c111fff90fefd9eb0fef7c9d6034f00c9c6df
ameraService.cpp
1555a9882179a26ce116dffc920ab0be338db4b8 16-Jun-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera2: Add jpeg sizes to legacy mode static characteristics."
152dbcf2e0d8a46691e22b102972540640f054ec 13-Jun-2014 Ruben Brunk <rubenbrunk@google.com> camera2: Add jpeg sizes to legacy mode static characteristics.

Bug: 15116722

- Adds jpeg size mapping to available output formats.

Change-Id: I73e46dd4309767ba41156d9ba03c4724bf234758
ameraService.cpp
2c79bf19fc6622e757794eb835798d7ce00eac2e 11-Jun-2014 Yin-Chia Yeh <yinchiayeh@google.com> am 3416f9ac: Merge "Camera2: Add null check to createStream" into lmp-preview-dev

* commit '3416f9ac471f97e9544ee821a97a101cbdd25b11':
Camera2: Add null check to createStream
89f14dacfadea1b14149510d4dfbc75dc79b23bb 11-Jun-2014 Yin-Chia Yeh <yinchiayeh@google.com> Camera2: Add null check to createStream

Prevent a native null dereference crash.

bug: 15332257
Change-Id: I10c4053a0b4f07fbf52c37dd2f2853b501def669
pi2/CameraDeviceClient.cpp
9bbfb139ff95752b22ca0f73521f97c6262787d7 12-Jun-2014 Zhijun He <zhijunhe@google.com> Merge "Camera3: Separate the video and preview size filtering"
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
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
87cebadd48710e42474756fc3513df678de045ce 22-May-2014 Elliott Hughes <enh@google.com> resolved conflicts for merge of f285c91e to master

Change-Id: I4c995e297d09c0854a42142cc57dce8b771acf65
c10b874c4d0d6208fb93a7aa0dc8af4418faad45 22-May-2014 Calin Juravle <calin@google.com> am d5516339: Merge "Move frameworks/av from fdprintf to POSIX dprintf."

* commit 'd551633916d3677da4dda10aba6837bdc6803ee0':
Move frameworks/av from fdprintf to POSIX dprintf.
8b5f642eb2364ea7fe46a5b3af51b48b58f12183 22-May-2014 Elliott Hughes <enh@google.com> Move frameworks/av from fdprintf to POSIX dprintf.

Bug: 11156955
Change-Id: Ia98cd16b4c1f7be87cf060b7456de4f40896bacb
tils/CameraTraces.cpp
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
ameraService.cpp
ameraService.h
pi1/client2/Parameters.cpp
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
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
f02f06c422a58ddaca49d14f21a196eaa435d07b 12-May-2014 Eino-Ville Talvala <etalvala@google.com> Merge "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
pi1/client2/Parameters.cpp
14136039b752376240698e8b422c76de01488bc5 06-May-2014 Zhijun He <zhijunhe@google.com> Merge "Camera3: fix missing string in logging code"
13c878f07fb36a49aade20cec684ed8e12724751 06-May-2014 Zhijun He <zhijunhe@google.com> Camera3: fix missing string in logging code

Change-Id: I15da6bb8b586b4641837f42d2145530fb45dd0bd
evice3/Camera3Stream.cpp
f2776a5692bb4228decbe4ea3c8cc6df1d9c684c 05-May-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera3: Update CameraMetadata vendor tag handling."
6640d87d1a9263c12bab6d7ded7cc78a3eb50ae9 05-May-2014 Natalie Silvanovich <natashenka@google.com> Merge "NULL check in ConnectPro"
e1b55da41878255570f18809c5fee72544740344 01-May-2014 Natalie Silvanovich <natashenka@google.com> NULL check in ConnectPro

Prevents service crash

Bug: 13744720
Change-Id: I7a5cdba830b4f96660f890ede6b94c38fc3108dd
ameraService.cpp
f81648ec38ff63f1f35516fa27c1c24d846e9ba5 18-Apr-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Update CameraMetadata vendor tag handling.

Bug: 12134423
Change-Id: I97dc955ee9dd78ace93a7946296d6d9b0e407d43
ameraService.cpp
fa366b2a32294ea22bf7b6f237cdbbd715cbbeb9 03-May-2014 Ruben Brunk <rubenbrunk@google.com> Merge "Revert "camera3: Update CameraMetadata vendor tag handling.""
6770260f83f5576b041b7b3a2536d082a631f9b0 03-May-2014 Ruben Brunk <rubenbrunk@google.com> Revert "camera3: Update CameraMetadata vendor tag handling."

This reverts commit 4764324d2704f1b08bb7407014bf203924ff2363.

Change-Id: I86d7fcc11423502b73fab2a82af6aa89804f0b76
ameraService.cpp
6c516d800d97b7f25a22574998cb055c9d7f7b16 03-May-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera3: Update CameraMetadata vendor tag handling."
4764324d2704f1b08bb7407014bf203924ff2363 18-Apr-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Update CameraMetadata vendor tag handling.

Bug: 12134423
Change-Id: I1d1be6792b6a4c9f08e042a8b2c89146bde5665e
ameraService.cpp
e11ae4b2f7d38c8092e7c67ff06610165d866d98 01-May-2014 Zhijun He <zhijunhe@google.com> Camera3: Don't notifyError for non-fatal errors

Bug: 14448494
Change-Id: Ie2e2dc6a8475189707c556845adb77f20f270df5
evice3/Camera3Device.cpp
1a7be1ec9c769203e6c8e26378de0ab8e2ad493d 29-Apr-2014 Bill Yi <byi@google.com> Merge commit '91820d46b5f3065c2fded3cdf65d305715b33bb1' into HEAD
f7da096db8655531c2f2b7bddccd1064b1021155 24-Apr-2014 Zhijun He <zhijunhe@google.com> Camera3: scale the max jpeg buffer size based on resolutions

The max jpeg buffer size was always the android.jpeg.maxSize, regardless of
the actual jpeg capture size. This creates a huge memory waste especially
for smaller size jpeg capture. Now the max jpeg buffer is linearly scaled based
on the resolution.

Bug: 14288983
Change-Id: I8a971b8e2f4fc7fec0154547bdb688579af71a47
evice3/Camera3Device.cpp
evice3/Camera3Device.h
7ef20390ba4375c4b08edd14923846086987a8c8 22-Apr-2014 Zhijun He <zhijunhe@google.com> camera3: Don't hold mLock during flush call

HAL calls into Camera3Device functions like processCaptureResult during flush
call. When Camera3Device runs into error state during flush call,
processCaptureResult calls setErrorState(), which leads to deadlock.

Change-Id: I35a03f6eb4b77f914097917cb37de98663de365f
evice3/Camera3Device.cpp
e7ec24c9934c98a451e986a07651992df7fe6558 21-Apr-2014 Jianing Wei <jianingwei@google.com> Merge "CameraService: fix waitUntilIdle bug revealed by TestingCamera2."
106b83d2447d3209d12fdc05215b965e05c5efea 21-Apr-2014 Eino-Ville Talvala <etalvala@google.com> am dae621c2: am 95006625: Merge "camera: set mNeedConfig after creating ZSL stream"

* commit 'dae621c2c7f40f1587b97636975908e1374ade9a':
camera: set mNeedConfig after creating ZSL stream
dae621c2c7f40f1587b97636975908e1374ade9a 21-Apr-2014 Eino-Ville Talvala <etalvala@google.com> am 95006625: Merge "camera: set mNeedConfig after creating ZSL stream"

* commit '95006625bd1c562c952833bf08c52e7e6c524363':
camera: set mNeedConfig after creating ZSL stream
3c76fa3e73374dfe7bb93e1b03fed30749e1e4b9 21-Apr-2014 Jianing Wei <jianingwei@google.com> CameraService: fix waitUntilIdle bug revealed by TestingCamera2.

* clear mStreamingRequestList in flush
* fix frame number checker in notify and processCaptureResult

Bug: 14166437
Change-Id: I022421080d05138f9068c1b9b85d83bd613b04fb
pi2/CameraDeviceClient.cpp
evice3/Camera3Device.cpp
6adc9ccb2948d9421a0ed4b74f52b909bcec2037 15-Apr-2014 Zhijun He <zhijunhe@google.com> Camera3: block until get an available buffer

Camera3Stream shouldn't error out when the max number of buffers are already
dequeued. It should block until next buffer returned from camera device.

Bug: 11595505
Change-Id: If65a70c29cb04219e14ded0744059c0ab783444b
evice3/Camera3IOStreamBase.cpp
evice3/Camera3IOStreamBase.h
evice3/Camera3InputStream.cpp
evice3/Camera3OutputStream.cpp
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
evice3/Camera3ZslStream.cpp
77d4f613bbed8b646c8ddade6a0737fcbd391b07 18-Apr-2014 Jianing Wei <jianingwei@google.com> Merge "CameraService: fix race condition and wrong last frame number."
2d6bb3f9e3e7cc1c7debbbe3d74bf9c70b6f39d4 11-Apr-2014 Jianing Wei <jianingwei@google.com> CameraService: fix race condition and wrong last frame number.

Change-Id: Ie2be9a77a0b074497615de38cbb8e8f13b4858ec
evice3/Camera3Device.cpp
evice3/Camera3Device.h
e5e3d0823165dea9211a47232dbbbe361153fb49 15-Apr-2014 Yuvraj Pasi <ypasi@nvidia.com> camera: set mNeedConfig after creating ZSL stream

Set mNeedConfig after creating ZSL stream, camera device
will reconfigure for the case when only ZSL stream
is changed.

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

Bug: 14059542
Change-Id: I8b45a98ef4b296db314cab3819d11626ac7211be
pi1/client2/CaptureSequencer.cpp
43827aea591c2fffdb87006462a5aa7a131a25c0 10-Apr-2014 Vineeta Srivastava <vsrivastava@google.com> Merge "camera3: Remove register_stream_buffers for HAL 3.2+"
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
ameraService.cpp
ameraService.h
pi1/client2/CaptureSequencer.cpp
pi1/client2/CaptureSequencer.h
pi1/client2/FrameProcessor.cpp
pi1/client2/FrameProcessor.h
pi1/client2/ZslProcessor.cpp
pi1/client2/ZslProcessor.h
pi1/client2/ZslProcessor3.cpp
pi1/client2/ZslProcessor3.h
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
pi_pro/ProCamera2Client.cpp
pi_pro/ProCamera2Client.h
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.h
ommon/CameraDeviceBase.h
ommon/FrameProcessorBase.cpp
ommon/FrameProcessorBase.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
13d315eb8c0848ea0584b9fb1d27bab55bc8158b 04-Apr-2014 Igor Murashkin <iam@google.com> camera3: Remove register_stream_buffers for HAL 3.2+

Use 'setprop camera.dev.register_stream 1' to skip the fatal NULL check
- This property will be removed before shipping L

Bug: 13301331
Bug: 13435680
Change-Id: I16aacd7b22e0a10b34f6fb8501be0256170a8cd5
evice3/Camera3IOStreamBase.cpp
evice3/Camera3Stream.cpp
evice3/Camera3Stream.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
ameraDeviceFactory.cpp
ameraService.cpp
pi1/Camera2Client.cpp
evice3/Camera3Device.cpp
evice3/Camera3Device.h
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
pi1/client2/Parameters.cpp
29cdd9bb46437ab580deabf33b2242106e0090b6 25-Mar-2014 Eino-Ville Talvala <etalvala@google.com> am a1aaaf86: am 4f53fe74: Merge "CameraService: deadlock fix"

* commit 'a1aaaf86cd04eabaf961a30d7b0a9fa857089862':
CameraService: deadlock fix
c3dcf1007aa964f825b2ea2ef86acb7f332e748f 25-Mar-2014 Igor Murashkin <iam@google.com> am 65550a0e: am 0370be96: DO NOT MERGE: camera: Fix setParameters for Preview FPS single/range values

* commit '65550a0e17852fe657795508e3bf05bdbfb2520b':
DO NOT MERGE: camera: Fix setParameters for Preview FPS single/range values
65550a0e17852fe657795508e3bf05bdbfb2520b 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
a1aaaf86cd04eabaf961a30d7b0a9fa857089862 25-Mar-2014 Eino-Ville Talvala <etalvala@google.com> am 4f53fe74: Merge "CameraService: deadlock fix"

* commit '4f53fe74051026e6635ba5bdbed4f1898cb66028':
CameraService: deadlock fix
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
1cc3f85de70e813998102bf572caad3691a6b6a2 25-Mar-2014 Eino-Ville Talvala <etalvala@google.com> am 4f53fe74: Merge "CameraService: deadlock fix"

* commit '4f53fe74051026e6635ba5bdbed4f1898cb66028':
CameraService: deadlock fix
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
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
6ec3a15257ca2b56b675a610aef43cc4ec6aaf00 30-Apr-2013 Kalle Lampila <kallex.lampila@intel.com> CameraService: deadlock fix

Release lock before return from CameraService::dump()

Change-Id: Ia20b0921fc675a284f3b7f8d26e0e3596b5a8774
Signed-off-by: Kalle Lampila <kallex.lampila@intel.com>
ameraService.cpp
d6d1883f607d40be5d9a87909ae563cf94256c24 25-Mar-2014 Zhijun He <zhijunhe@google.com> Merge "Camera3: Fix flush call deadlock"
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
69a374897392c8bd70f441b7284f6f578c651ec9 24-Mar-2014 Zhijun He <zhijunhe@google.com> Camera3: Fix flush call deadlock

Flush shouldn't call waitUntilDrained directly, as they are all API calls
with mLock and mInterfaceLock held. Move the waitUntilDrained implementation
into waitUntilDrainedLocked to solve this issue.

Change-Id: Id7d931091d5c11e12204790841097433515446db
evice3/Camera3Device.cpp
evice3/Camera3Device.h
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
cfe09079608d78a0a358f01bb49f279859e38664 22-Mar-2014 Jianing Wei <jianingwei@google.com> Merge "CameraService: Add support for burst capture and repeating burst."
90e59c98c343e941b1a75307ffa4b4b5f1eb50d6 13-Mar-2014 Jianing Wei <jianingwei@google.com> CameraService: Add support for burst capture and repeating burst.

Bug: 10749500
Change-Id: I292a485b222e5cf97388d76bf0d956a6ac54bb2f
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/CameraDeviceBase.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
4bd71b4ed6f1825b287e448c336e3e59138c2956 21-Mar-2014 Colin Cross <ccross@android.com> libcameraservice: build 64-bit

libcameraservice builds fine for 64-bit, remove LOCAL_32_BIT_ONLY

Change-Id: I9f28bc42dc424dee9b92e6ab092f86d3aa1419b7
ndroid.mk
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
ameraService.cpp
pi1/client2/CaptureSequencer.cpp
pi1/client2/FrameProcessor.cpp
pi1/client2/JpegCompressor.cpp
pi1/client2/JpegProcessor.cpp
pi1/client2/Parameters.cpp
pi1/client2/StreamingProcessor.cpp
pi1/client2/ZslProcessor.cpp
pi1/client2/ZslProcessor3.cpp
pi2/CameraDeviceClient.cpp
ommon/Camera2ClientBase.cpp
ommon/FrameProcessorBase.cpp
evice2/Camera2Device.cpp
evice3/Camera3Device.cpp
evice3/Camera3IOStreamBase.cpp
evice3/Camera3Stream.cpp
evice3/Camera3ZslStream.cpp
evice3/StatusTracker.cpp
ui/RingBufferConsumer.cpp
9078a1b3b9f9c0c48046ade0e8e18b0d79a659db 19-Mar-2014 Igor Murashkin <iam@google.com> camera: Fix setParameters for Preview FPS single/range values

Bug: 12609188
Change-Id: I82ea6f5de2183dd046d4bf5683600c97f37ab4db
pi1/client2/Parameters.cpp
b5ea3014b8be9eaa16da0144bd81af6fa514d8e2 18-Mar-2014 Dan Stoza <stoza@google.com> Merge "Remove deprecated BufferQueue constructor"
9ff25ced1404c896df9e6ed3a6ad289305559361 18-Mar-2014 Igor Murashkin <iam@google.com> am 557847ee: am a6ca0acf: am bd3e2e03: camera2: Fix segfault when using null availability listener

* commit '557847ee511dd5e75d584ff04449322f0f098241':
camera2: Fix segfault when using null availability listener
557847ee511dd5e75d584ff04449322f0f098241 18-Mar-2014 Igor Murashkin <iam@google.com> am a6ca0acf: am bd3e2e03: camera2: Fix segfault when using null availability listener

* commit 'a6ca0acf0d009acf45b05561273aaad44ab22533':
camera2: Fix segfault when using null availability listener
a6ca0acf0d009acf45b05561273aaad44ab22533 17-Mar-2014 Igor Murashkin <iam@google.com> am bd3e2e03: camera2: Fix segfault when using null availability listener

* commit 'bd3e2e03f3ab686c52982a9e50cae853128172cf':
camera2: Fix segfault when using null availability listener
63143ee8a0a59d73655c8eac715ae7321027fa2b 17-Mar-2014 Igor Murashkin <iam@google.com> am bd3e2e03: camera2: Fix segfault when using null availability listener

* commit 'bd3e2e03f3ab686c52982a9e50cae853128172cf':
camera2: Fix segfault when using null availability listener
947237f67dd5335b26326a98fd7d3eae5fd7d702 11-Mar-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Remove old vendor tag ops dependencies.

Bug: 12134423
Change-Id: I7acdf76d4c0674bdb1cc939592d4620687c785c3
evice2/Camera2Device.cpp
evice2/Camera2Device.h
e1445da74730473a66a3ae8414e940aebfe6585d 17-Mar-2014 Igor Murashkin <iam@google.com> camera2: Don't log vendor tag errors when camera HAL too old

Change-Id: Iac3d23284230c95c85ee404abbf9b22df1ae721c
ameraService.cpp
bd3e2e03f3ab686c52982a9e50cae853128172cf 17-Mar-2014 Igor Murashkin <iam@google.com> camera2: Fix segfault when using null availability listener

ICameraService::addListener / removeListener will now return BAD_VALUE
if a null listener is used.

Bug: 12891434
Change-Id: I9764110094d8fd42e22fcc8df3ef0e73c1b070e7
ameraService.cpp
758799cef41fc5495f59eeb6249d02ce9154cde8 14-Mar-2014 Glenn Kasten <gkasten@google.com> resolved conflicts for merge of 3c780188 to master

Change-Id: Ic579d346c27ff05ea6444faaa60fa6caaec86fbf
236104afb2300b7d969b1dc786f14b5f912df1cf 14-Mar-2014 Glenn Kasten <gkasten@android.com> am 089affb6: Merge "mediaserver and associated services are 32-bit only"

* commit '089affb6c2d9ed1e2d49df4be02d30dc490506f9':
mediaserver and associated services are 32-bit only
3c7801882bbb6d5f3cc641525a54cb8a6c4aca34 14-Mar-2014 Glenn Kasten <gkasten@android.com> am 089affb6: Merge "mediaserver and associated services are 32-bit only"

* commit '089affb6c2d9ed1e2d49df4be02d30dc490506f9':
mediaserver and associated services are 32-bit only
1d59fea10d94e425cd48667d3030418e3907c56c 13-Mar-2014 Ruben Brunk <rubenbrunk@google.com> Merge "camera3: Pass vendor tags through binder."
d1176ef16677b6c94fb893edb6a864cdccc0b190 21-Feb-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Pass vendor tags through binder.

Bug: 12134423

- Adds a class for parceling vendor tag definitions.
- Passes vendor tag definitions to clients of the camera service.
- Switches over to new vendor tag mechanism when reading from HAL.

Change-Id: Icef3fe9e67160767bdb8244ac49c85b68b497123
ndroid.mk
ameraService.cpp
ameraService.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
8aa0f0619ea867e8fb240cf27913d4f8ae767385 12-Mar-2014 Dan Stoza <stoza@google.com> Remove deprecated BufferQueue constructor

Bug: 13415624
Change-Id: Ifc8f778b70102a38a9f7a086632e6884714e6b58
pi1/client2/CallbackProcessor.cpp
pi1/client2/JpegProcessor.cpp
pi1/client2/StreamingProcessor.cpp
pi1/client2/ZslProcessor.cpp
evice3/Camera3InputStream.cpp
evice3/Camera3ZslStream.cpp
af783aa91f7a279153fb8bab8d0d6b9f737996e9 03-Mar-2014 Glenn Kasten <gkasten@android.com> mediaserver and associated services are 32-bit only

also 32-bit only command-line apps

Change-Id: I9ac557a8d02bbf6986a9b5c3cdce23d400b306a3
ndroid.mk
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
f0fb921c0170fe3b8ebce8fbe3c133a99c6def9f 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
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
pi1/Camera2Client.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
47ef192f0296642b901e82d0c72c5a1a0d08f4df 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
a413dd621966044753a8fa1f57c76d847b6f4bec 29-Jan-2014 Zhijun He <zhijunhe@google.com> DO NOT MERGE: Camera: fix focusArea wrong indexing issue

Bug: 12304559
Change-Id: Id28b35fdd9697c1ec3365f617996801965de8bd0
pi1/client2/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
pi1/Camera2Client.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
pi1/client2/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
ameraService.cpp
pi1/Camera2Client.cpp
pi1/CameraClient.cpp
pi1/client2/ZslProcessor.cpp
pi1/client2/ZslProcessor3.cpp
evice2/Camera2Device.cpp
evice3/Camera3IOStreamBase.cpp
evice3/Camera3ZslStream.cpp
412d4744efae64083e4f99a664e3efaba031af48 05-Feb-2014 Andreas Huber <andih@google.com> Merge "FINAL ATTEMPT: HTTP services are now provided from JAVA and made available to media code"
1b86fe063badb5f28c467ade39be0f4008688947 29-Jan-2014 Andreas Huber <andih@google.com> FINAL ATTEMPT: HTTP services are now provided from JAVA and made available to media code

Change-Id: I9f74a86e70422187c9cf0ca1318a29019700192d
ameraService.cpp
ce6249980434dd04e0eac397083d917cdc4452e9 24-Jan-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Update maxRegions tag.

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

Bug: 12304559
Change-Id: Id28b35fdd9697c1ec3365f617996801965de8bd0
pi1/client2/Parameters.cpp
5f44635dc35814b98b4dc2b255355a93122fec59 22-Jan-2014 Zhijun He <zhijunhe@google.com> camera3: Delete output stream of bi-directional stream

Bi-directional stream (like Zsl stream) is both input and output streams. When
deleted, both streams need to be deleted.

Change-Id: I8b6bb9054fec264cc03754003797de0bae10cb20
evice3/Camera3Device.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
pi1/Camera2Client.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
pi1/client2/ZslProcessor3.cpp
evice3/Camera3Device.cpp
c69b91ceae6255e41c5413796fb0ed4f7af45b15 18-Jan-2014 Ruben Brunk <rubenbrunk@google.com> camera3: Update sceneMode tag spec.

Change-Id: I495435397086a295280c556d94fe8efd442a12c3
pi1/Camera2Client.cpp
pi1/client2/Parameters.cpp
b1c8d9fbc69e2f103699d24a81c2406e52a94c9f 15-Jan-2014 Eino-Ville Talvala <etalvala@google.com> am a2949165: am 3eccdde9: am c7614eb7: Merge "libcameraservice: Fix build in ISO C++11 mode"

* commit 'a2949165680158db31dc1fce32f62bbe70c31820':
libcameraservice: Fix build in ISO C++11 mode
c7614eb7cf2e3e121baa3de26e3622974a163786 15-Jan-2014 Eino-Ville Talvala <etalvala@google.com> Merge "libcameraservice: Fix build in ISO C++11 mode"
f0b7026fca225581c7711e4d802117869b66e9dc 26-Dec-2013 Zhijun He <zhijunhe@google.com> Camera2 API: fix front facing camera flip issue

Camera stream transform calculation should take camera facing into account.
For example, front facing camera preview stream should be horizontally or
vertically flipped.

Bug: 12300670
Change-Id: Ib497f0b8c3e65974de05d4f0aca3c51e99717c3d
pi2/CameraDeviceClient.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.
pi1/Camera2Client.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
pi1/client2/JpegProcessor.cpp
5b19084a5089e3f6527a82440a1c8227c3a366fa 21-Nov-2013 Zhijun He <zhijunhe@google.com> Merge "Camera3: Remove request from InFlightMap for error case"
1b05dfc8df5e741086747d076fc39c79fb4acb33 21-Nov-2013 Zhijun He <zhijunhe@google.com> Camera3: Remove request from InFlightMap for error case

We don't expect HAL send back valid result metadata if error occurs for a
request, such as during flush call. The request needs to be removed from in
flight request map accordingly.

Bug: 9758581
Change-Id: I51fe327337325ce72f11ce592778a2af02e98479
evice3/Camera3Device.cpp
b50df220ae76c7bb6e78b096ece06b2609cf4ffe 19-Nov-2013 Zhijun He <zhijunhe@google.com> Merge "Camera3: add systraces for hal open/close"
213ce79e943a3b51d7859a184d8211c859c960a0 19-Nov-2013 Zhijun He <zhijunhe@google.com> Camera3: add systraces for hal open/close

Bug: 10901465
Change-Id: I32fb96aa0f9efd423bdb9a3d92c142a096a7a47f
evice3/Camera3Device.cpp
3bd2531ac7c87b85bc9f5abf558b5dc247caaa86 18-Nov-2013 Igor Murashkin <iam@google.com> Merge "camera3: Remove BufferQueue::MIN_UNDEQUEUED_BUFFERS references"
054aab3479a094b0a04d48db9cb8f325ea5be162 18-Nov-2013 Igor Murashkin <iam@google.com> camera3: Remove BufferQueue::MIN_UNDEQUEUED_BUFFERS references

Change-Id: I4730ac7849e915e88d3b8fc8aa869f53a8242501
evice3/Camera3InputStream.cpp
evice3/Camera3InputStream.h
evice3/Camera3ZslStream.cpp
evice3/Camera3ZslStream.h
ui/RingBufferConsumer.h
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
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
184dfe4ea5e2ba33951bed2b1366007aee0ce3da 08-Nov-2013 Eino-Ville Talvala <etalvala@google.com> Camera API2: Add support for partial result quirk

- Camera3Device: Include requestId in partial 3A results
- FrameProcessorBase: Add support for partial result listeners
- CameraDeviceClient: Listen and forward partial results to client

Bug: 11115603
Change-Id: If1cc6bbc32932742ac142c058688761ebf6a8024
pi2/CameraDeviceClient.cpp
ommon/FrameProcessorBase.cpp
ommon/FrameProcessorBase.h
evice3/Camera3Device.cpp
evice3/Camera3Device.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
pi1/Camera2Client.cpp
pi1/client2/FrameProcessor.cpp
pi1/client2/FrameProcessor.h
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
ommon/FrameProcessorBase.cpp
evice3/Camera3Device.cpp
evice3/Camera3Device.h
661076292093f82aec488baf8460cdf204a5efd2 01-Nov-2013 Zhijun He <zhijunhe@google.com> Camera: delete zsl stream for video mode

Change-Id: I9ebfe0cb7376092c6ecd71e5c1c5058947282a5f
pi1/Camera2Client.cpp
ff3e31d2b100d8efd969b358b18e4405c49dd10d 24-Oct-2013 Igor Murashkin <iam@google.com> camera: Collect stack traces when bad things happen, print with dumpsys

Bug: 11324229
Change-Id: Ic920e170a8f5a389fc139bbf5416c0e3186c7fb6
ndroid.mk
ameraService.cpp
evice3/Camera3Device.cpp
tils/CameraTraces.cpp
tils/CameraTraces.h
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
pi1/client2/Parameters.cpp
15ad2470b2f2ac34473eb568b606ad75e8e63ac6 12-Oct-2013 Zhijun He <zhijunhe@google.com> Camera: Fix deadlock in Camera3OutputStream

process capture request thread, process capture result and setParameter
binder threads can run into circular locking situation when acquiring
StreamingProcessor lock, Camera3Stream lock, and bufferQueue lock.
Releasing the Camera3Stream lock briefly in process capture request
thread getbuffer call can break this deadlock.

Bug: 11016037
Change-Id: If08d4b134c26be26039b1d5363759e60f911bad6
evice3/Camera3OutputStream.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
pi1/client2/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
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/client2/CaptureSequencer.cpp
pi1/client2/CaptureSequencer.h
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
evice3/Camera3Device.cpp
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
pi1/Camera2Client.cpp
evice3/Camera3Device.cpp
evice3/Camera3Device.h
828363dada5878fca6e0cb1553fbea96f38671c8 09-Oct-2013 Igor Murashkin <iam@google.com> Merge "camera2: Don't race while dumping last frame metadata" into klp-dev
07d2169d46f3536add6044dbf106967a1982252f 25-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Improve resilience to stream failures

- Handle binder connection drops (DEAD_OBJECT) for streams
- Just log an error, don't go to an error state when queue/dequeue fails

Bug: 10347526
Change-Id: Ib463ffe15d58db444cf5d8cad176a201c7d1facc
evice3/Camera3Device.cpp
evice3/Camera3IOStreamBase.cpp
215bb3499c7eeea6303e55fac66452f2574c022a 08-Oct-2013 Igor Murashkin <iam@google.com> camera2: Don't race while dumping last frame metadata

Bug: 11095203
Change-Id: Icfb31e1719634b62004d6c15a95a9316e9642e4c
ommon/FrameProcessorBase.cpp
ommon/FrameProcessorBase.h
19fffcbd89a51af797265af2e11c97be5820a07d 04-Oct-2013 Zhijun He <zhijunhe@google.com> Merge "Camera3: track request status in inflight queue" into klp-dev
1d1f846c0dbaa36d0944e7b1e54cc07863e00a92 03-Oct-2013 Zhijun He <zhijunhe@google.com> Camera3: track request status in inflight queue

Bug: 9758581
Change-Id: I1d7135cd0932bd6b453acabfeb9a553985c887bc
evice3/Camera3Device.cpp
evice3/Camera3Device.h
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
ndroid.mk
pi1/client2/CaptureSequencer.cpp
pi1/client2/CaptureSequencer.h
pi1/client2/ZslProcessor.cpp
pi1/client2/ZslProcessor.h
pi1/client2/ZslProcessor3.cpp
pi1/client2/ZslProcessor3.h
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
pi_pro/ProCamera2Client.cpp
pi_pro/ProCamera2Client.h
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.h
ommon/CameraDeviceBase.h
ommon/FrameProcessorBase.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3IOStreamBase.cpp
evice3/Camera3IOStreamBase.h
evice3/Camera3InputStream.cpp
evice3/Camera3OutputStream.cpp
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
evice3/Camera3StreamInterface.h
evice3/StatusTracker.cpp
evice3/StatusTracker.h
f05e50eb06d3f70e50fa7f44c1fd32128033b49d 01-Oct-2013 Zhijun He <zhijunhe@google.com> Camera: only return static metadata for HAL3 device

This effectively disables the camera2 APIs for HAL2.x or lower HAL device.

Bug: 10360518
Change-Id: I0f374ac533468c6181f5672c75088b7144b9c53d
ameraService.cpp
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
pi1/client2/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
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
1da3b602130d71ac3bff1a1fdecdc5e0d7b9d701 27-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Camera2 API: Hack: Always use async mode with GLConsumer

Until a cleaner solution is implemented, force buffer queues to
consumers that set USAGE_HW_TEXTURE usage to be asynchronous.

Bug: 10949105
Change-Id: I69e6b02b773831396767c282ce8c5936c5d41f03
pi2/CameraDeviceClient.cpp
6914de6dd1d74fcf74e3247c89f9293fbf7bafe5 26-Sep-2013 Zhijun He <zhijunhe@google.com> Merge "Camera: Implement getCameraCharacteristics" into klp-dev
2b59be89dc245b6e2475d9e8b0c5f2392370e71e 25-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: Implement getCameraCharacteristics

Bug: 10904541
Bug: 10360518
Change-Id: Ie9ca6b3b0b5f2fe529e6b0decc193096e770a017
ameraService.cpp
ameraService.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
pi1/Camera2Client.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
pi1/client2/Parameters.cpp
pi1/client2/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
pi1/Camera2Client.cpp
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
f8b2a6f7dea06234c7966798d9363d2d236488a6 18-Sep-2013 Igor Murashkin <iam@google.com> camera2: Tell all streams to ignore global device UI rotation

- Also use android.sensor.orientation to set the right transform
flags automatically.

Bug: 10804238
Change-Id: I10caf8331f19e107c461696963cc10f597c91d83
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
a099d1f6be3fbbb1af4c12b2ab627397f0826982 17-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Always set a trigger ID for an active trigger" into klp-dev
2f876f9ee63396e4e0117f85c5b3132cac7e2c9d 13-Sep-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Always set a trigger ID for an active trigger

This is to work around HAL implementations that expect to see an
ID for every trigger.

Use a dummy trigger ID of 1, since 0 has special meaning for older
HALs.

Bug: 10720617
Change-Id: I9cb1b8dbcb113cb9e737e5adb04032fd61a54c12
evice3/Camera3Device.cpp
evice3/Camera3Device.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
pi1/Camera2Client.cpp
66281c3a5d7eea486ddc6ad30088ba92956fd4fd 14-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: Don't overwrite the error status

Bug: 10749544
Change-Id: I6096effde03e18ee1b8c63cf3b36dce0344054c5
ommon/Camera2ClientBase.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
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
6220f993541b0317e6ace3c410dd35a8d76e30bc 10-Sep-2013 Igor Murashkin <iam@google.com> Merge "camera3: Dump latest request sent with dumpsys" into klp-dev
d1d6467d3bcbc1305eeba0176a2edf04925c368e 07-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: Correct stream id types

Bug: 10604704
Change-Id: I223ac5d200eb6439c08955fb7ad586592099fbae
pi1/Camera2Client.cpp
pi1/client2/CaptureSequencer.cpp
pi1/client2/StreamingProcessor.cpp
pi1/client2/StreamingProcessor.h
pi1/client2/ZslProcessor.cpp
pi1/client2/ZslProcessor3.cpp
pi2/CameraDeviceClient.cpp
evice3/Camera3Device.cpp
1e479c0f4cb3e2174dde0b02e5656fb658f73495 07-Sep-2013 Igor Murashkin <iam@google.com> camera3: Dump latest request sent with dumpsys

Bug: 10606535
Change-Id: I0dd5ca3e09f45701659ab9ebd3b51939a2f6e6ba
evice3/Camera3Device.cpp
evice3/Camera3Device.h
84b7fb0c88ddd05ed7c148c82fe1691040a9404d 06-Sep-2013 Zhijun He <zhijunhe@google.com> Camera: Send VIDEO_SNAPSHOT intent for video snapshot case

Bug: 9924539
Change-Id: Ief39eff79c31f2c2aa5df2fe1a0f04c4afc74690
pi1/client2/CaptureSequencer.cpp
36a8b33a23dca49c9617e97e22e5d67f7d25c268 06-Sep-2013 Ruben Brunk <rubenbrunk@google.com> Merge "camera: Fix race condition between setParameters() and stopPreview()." into klp-dev
a27c4aa222c8dd1712617dad954c5f3aa68d5427 05-Sep-2013 Ruben Brunk <rubenbrunk@google.com> camera: Fix race condition between setParameters() and stopPreview().

Bug: 10414772
Change-Id: I928cb3935afb101da8a7931f88c27dccdb03b4a9
pi1/Camera2Client.cpp
17963d16d66526288ed66c91a6744daf3acfd731 20-Aug-2013 Ruben Brunk <rubenbrunk@google.com> Fix CameraService error flag when running HAL1 with API2.

Bug: 10620944

Change-Id: I44c0d09a3d313ae8f724fbe61fa5f36cf5b38b6d
ameraService.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
pi1/client2/CaptureSequencer.h
d656a4be3c3b6bc249b06599c2b02c2863d2c47f 30-Aug-2013 Igor Murashkin <iam@google.com> Merge "camera: Fix deadlock when sending callbacks during disconnect" into klp-dev
4fb55c15da1a563ab925914a0f493a3dc80495a3 30-Aug-2013 Igor Murashkin <iam@google.com> camera: Fix deadlock when sending callbacks during disconnect

Bug: 10552448
Change-Id: Ie93ba744ae6705aa657f980ae8e08ec624feeb39
pi2/CameraDeviceClient.cpp
26fe6c7c56477ef227205c68f17df07ca3501d65 29-Aug-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Be busy as soon as work arrives.

RequestThread's internal busy flag (mPaused) was not being immediately
set when new work was submitted to it. This allowed for a race
condition where a capture() followed by an immediate
waitUntilDrained() would immediately return from the wait.

Set the mPaused flag to false immediately in capture() and
setStreamingRequest() to avoid this, instead of waiting until the end
of the next RequestThread iteration.

Bug: 10531739
Change-Id: I54a79fe5361d527ec717f41ad805e9b319a48cd8
evice3/Camera3Device.cpp
evice3/Camera3Device.h
abaa51d3ca31f0eda99e1d271e6dc64c877dbf58 14-Aug-2013 Eino-Ville Talvala <etalvala@google.com> Camera2: Add flush support

- On HAL2 devices, fall back to wait until idle
- On HAL3 devices, call HAL flush method

Bug: 9758581
Change-Id: Ie1c570a15f6590a1ee6c271e3b989c48079b468a
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
ommon/CameraDeviceBase.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.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
ameraService.h
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/CameraClient.cpp
pi1/CameraClient.h
0f61d8f14aa368c9cd7076528e8096e10ed100a0 08-Aug-2013 Ruben Brunk <rubenbrunk@google.com> Refactor CameraService to handle errors properly.

Bug: 10361136

-Connect calls now return status_t error flags.

Change-Id: Idca453b111e5df31327f6c99ebe853bb2e332b95
ameraService.cpp
ameraService.h
deeef54487a34034dc0cfaab20b20d557224c07c 02-Aug-2013 Mathias Agopian <mathias@google.com> separte producer and consumer interfaces

Bug: 9265647
Change-Id: Iefabc11e4bd2e2e8ffd31160476c450affe6629c
pi1/client2/CallbackProcessor.cpp
pi1/client2/JpegProcessor.cpp
pi1/client2/StreamingProcessor.cpp
pi1/client2/ZslProcessor.cpp
evice3/Camera3InputStream.cpp
evice3/Camera3InputStream.h
evice3/Camera3ZslStream.cpp
ui/RingBufferConsumer.cpp
ui/RingBufferConsumer.h
ce7842c295638ee1432041186700a71d4bf1c176 05-Aug-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Provide consumer usage flags to HAL for each stream"
b2f5b19e5b6e1408a259add23dba91037756a943 30-Jul-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Provide consumer usage flags to HAL for each stream

At stream configure time, pass on the stream's consumer usage flags
to the HAL, to speed up final hardware configuration.

Bug: 9592202
Change-Id: Ie467be053be36a09e482f5f05cad65df42d66476
evice3/Camera3IOStreamBase.h
evice3/Camera3InputStream.cpp
evice3/Camera3InputStream.h
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
11d0d44d583f679638cc927bfffe920e495e90cc 31-Jul-2013 Zhijun He <zhijunhe@google.com> Camera: fix the metadate parcel write issue

Also rename the frameId to requestId to make it less confusing.

Change-Id: I14a20b6fcabb86294afb31fc0c56397e185c1373
ommon/FrameProcessorBase.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
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2ClientBase.cpp
amera2ClientBase.h
amera2Device.cpp
amera2Device.h
amera3Device.cpp
amera3Device.h
ameraClient.cpp
ameraClient.h
ameraDeviceBase.cpp
ameraDeviceBase.h
ameraDeviceFactory.cpp
ameraDeviceFactory.h
ameraHardwareInterface.h
ameraService.cpp
ameraService.h
roCamera2Client.cpp
roCamera2Client.h
pi1/Camera2Client.cpp
pi1/Camera2Client.h
pi1/CameraClient.cpp
pi1/CameraClient.h
pi1/client2/BurstCapture.cpp
pi1/client2/BurstCapture.h
pi1/client2/CallbackProcessor.cpp
pi1/client2/CallbackProcessor.h
pi1/client2/Camera2Heap.h
pi1/client2/CaptureSequencer.cpp
pi1/client2/CaptureSequencer.h
pi1/client2/FrameProcessor.cpp
pi1/client2/FrameProcessor.h
pi1/client2/JpegCompressor.cpp
pi1/client2/JpegCompressor.h
pi1/client2/JpegProcessor.cpp
pi1/client2/JpegProcessor.h
pi1/client2/Parameters.cpp
pi1/client2/Parameters.h
pi1/client2/StreamingProcessor.cpp
pi1/client2/StreamingProcessor.h
pi1/client2/ZslProcessor.cpp
pi1/client2/ZslProcessor.h
pi1/client2/ZslProcessor3.cpp
pi1/client2/ZslProcessor3.h
pi1/client2/ZslProcessorInterface.h
pi2/CameraDeviceClient.cpp
pi2/CameraDeviceClient.h
pi_pro/ProCamera2Client.cpp
pi_pro/ProCamera2Client.h
amera2/BurstCapture.cpp
amera2/BurstCapture.h
amera2/CallbackProcessor.cpp
amera2/CallbackProcessor.h
amera2/Camera2Heap.h
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
amera2/FrameProcessor.cpp
amera2/FrameProcessor.h
amera2/JpegCompressor.cpp
amera2/JpegCompressor.h
amera2/JpegProcessor.cpp
amera2/JpegProcessor.h
amera2/Parameters.cpp
amera2/Parameters.h
amera2/ProFrameProcessor.cpp
amera2/ProFrameProcessor.h
amera2/StreamingProcessor.cpp
amera2/StreamingProcessor.h
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
amera2/ZslProcessor3.cpp
amera2/ZslProcessor3.h
amera2/ZslProcessorInterface.h
amera3/Camera3IOStreamBase.cpp
amera3/Camera3IOStreamBase.h
amera3/Camera3InputStream.cpp
amera3/Camera3InputStream.h
amera3/Camera3OutputStream.cpp
amera3/Camera3OutputStream.h
amera3/Camera3OutputStreamInterface.h
amera3/Camera3Stream.cpp
amera3/Camera3Stream.h
amera3/Camera3StreamBufferListener.h
amera3/Camera3StreamInterface.h
amera3/Camera3ZslStream.cpp
amera3/Camera3ZslStream.h
ommon/Camera2ClientBase.cpp
ommon/Camera2ClientBase.h
ommon/CameraDeviceBase.cpp
ommon/CameraDeviceBase.h
ommon/FrameProcessorBase.cpp
ommon/FrameProcessorBase.h
evice1/CameraHardwareInterface.h
evice2/Camera2Device.cpp
evice2/Camera2Device.h
evice3/Camera3Device.cpp
evice3/Camera3Device.h
evice3/Camera3IOStreamBase.cpp
evice3/Camera3IOStreamBase.h
evice3/Camera3InputStream.cpp
evice3/Camera3InputStream.h
evice3/Camera3OutputStream.cpp
evice3/Camera3OutputStream.h
evice3/Camera3OutputStreamInterface.h
evice3/Camera3Stream.cpp
evice3/Camera3Stream.h
evice3/Camera3StreamBufferListener.h
evice3/Camera3StreamInterface.h
evice3/Camera3ZslStream.cpp
evice3/Camera3ZslStream.h
hotography/CameraDeviceClient.cpp
hotography/CameraDeviceClient.h
cd4f9920f5658fcf1bf62bfebf5232a1fea06ea6 30-Jul-2013 Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org> libcameraservice: Fix build in ISO C++11 mode

Change log macro define so it can't be confused for a C++11 string
literal

Change-Id: Idcc8085735177aa3313fdea66dc0736cca749f9b
Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
ui/RingBufferConsumer.cpp
ae4b5f93444802632d71ec34373842e6f5febbaa 29-Jul-2013 Igor Murashkin <iam@google.com> Merge "camera2 api: Override default RGBx formats to IMPLEMENTATION_DEFINED"
1581101ce2a8c1b8d0b07b643ad891595221d781 29-Jul-2013 Igor Murashkin <iam@google.com> camera2 api: Override default RGBx formats to IMPLEMENTATION_DEFINED

Bug: 9487482
Change-Id: I09d3b4e41454d350c4bc7b1f8e893c3dad655e73
hotography/CameraDeviceClient.cpp
2ab500c632569e2f131a1a2288459933da70c4ee 23-Jul-2013 Zhijun He <zhijunhe@google.com> camera2: Implement ICameraDeviceUser::waitUntilIdle

Also fixed some logging typo

Change-Id: Ib254bdb137dca10b12595c23aeb1c53097423425
amera3/Camera3OutputStream.cpp
hotography/CameraDeviceClient.cpp
hotography/CameraDeviceClient.h
47110057829ba7d5c7b41fd2aa381b5f5ed811ca 23-Jul-2013 Zhijun He <zhijunhe@google.com> Camera: ProCamera connect need support HAL3 device

Change-Id: Iae7e5f9e6387f61f1c4bbb91f75803fc1fdf2668
ameraService.cpp
288abb6fe160dff109dedbf89b227fc2b10a2ee8 20-Jul-2013 Zhijun He <zhijunhe@google.com> Merge "camera2: Fix request ID bug"
cd63212dedc29d72d4746a4070d018fdbca316a9 20-Jul-2013 Mathias Agopian <mathias@google.com> Merge "update to new Consumer APIs"
e4bc8dbf0329c4845c692a02e54c16906998f77d 20-Jul-2013 Eino-Ville Talvala <etalvala@google.com> am b0177ff2: am 46910bdc: Camera2/3: Fix deadlock when starting recording before preview.

* commit 'b0177ff25e3e620be6ebe1e2c3f645b2f05dd57e':
Camera2/3: Fix deadlock when starting recording before preview.
fe0799e8f1c5db22df3bafdfb9ec995f5494d260 19-Jul-2013 Zhijun He <zhijunhe@google.com> camera2: Fix request ID bug

Wrong request id was pushed in request list.

Change-Id: I55bf7ae84ca41eec79db1a81d2cde35beaa2a6b9
hotography/CameraDeviceClient.cpp
46910bdc57c35ac36bd4adcbb76f4f3a590e3f21 19-Jul-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Fix deadlock when starting recording before preview.

Move 3A notification synthesis for HAL3 devices from
Camera3Device::processCaptureResult to Camera2Client's
FrameProcessor. This will ensure that calls to processCaptureResult
from HAL can never block on Camera2Client internal mutexes.

Bug: 9923891
Change-Id: I5184649bf45c0807babe6b8c0e1239e959cd3480
amera2Device.cpp
amera2Device.h
amera3Device.cpp
amera3Device.h
ameraDeviceBase.h
amera2/FrameProcessor.cpp
amera2/FrameProcessor.h
5e1f08b3917ac7900f8a11118afb7e8bf3e61c64 17-Jul-2013 Mathias Agopian <mathias@google.com> update to new Consumer APIs

Change-Id: I3c5d4be2a2e8783fbf98b3e268fd02658f71dc7d
amera2/CallbackProcessor.cpp
amera2/StreamingProcessor.cpp
amera2/ZslProcessor.cpp
amera3/Camera3InputStream.cpp
ui/RingBufferConsumer.cpp
5478f3c44b9d6670261733953a71a8290fa70ae8 16-Jul-2013 Mathias Agopian <mathias@google.com> Merge "always pass the BufferQueue explicitely to consumers"
099b457f3203fa51387e21bd450495abb973ab31 13-Jul-2013 Igor Murashkin <iam@google.com> camera2: Implement ICameraDeviceUser::getCameraInfo

Bug: 9529161
Change-Id: I927e39c124cd5fb19e38423506f4463acc381cb0
hotography/CameraDeviceClient.cpp
hotography/CameraDeviceClient.h
8d764bfc74c40641f018a0aa87d6f484aec92eae 13-Jul-2013 Mathias Agopian <mathias@google.com> always pass the BufferQueue explicitely to consumers

Change-Id: Ic2d9a9cf184a482b3c78a481ed693ee32df5ca13
amera2/CallbackProcessor.cpp
amera2/JpegProcessor.cpp
amera2/StreamingProcessor.cpp
amera2/ZslProcessor.cpp
amera3/Camera3InputStream.cpp
ceb1f0af56b5ff1f546438ec27321929956c705f 11-Jul-2013 Andy McFadden <fadden@android.com> Merge "Pass additional arg to acquireBuffer calls."
132a4fb88207075932d5dbb7970383ceb6405be7 11-Jul-2013 Zhijun He <zhijunhe@google.com> am adaa78c9: am a2520db0: camera2/3: set preview callback oneshot flag during still capture

* commit 'adaa78c901a2f2509965b7acc1cde848dfc6bafe':
camera2/3: set preview callback oneshot flag during still capture
656e86250cd68f7f362c50a4bc92a865e9deacbe 28-Jun-2013 Andy McFadden <fadden@android.com> Pass additional arg to acquireBuffer calls.

Bug 7900302

Change-Id: I30b9cca783e0a48f77035b745b7d5e20edf10f27
amera2/StreamingProcessor.cpp
amera2/ZslProcessor.cpp
ui/RingBufferConsumer.cpp
a2520db02bead68d4980783c41500ae96511bdf8 09-Jul-2013 Zhijun He <zhijunhe@google.com> camera2/3: set preview callback oneshot flag during still capture

Preview callback oneshot flag need set when a still picture is being captured
and preview callback oneshot is enabled, otherwise, the callback enabling status
could be lost when preview is restarted after still catpure.

Bug 9742091

Change-Id: If9562369013e53727edfdd16f3d00d6a9392e70d
amera2Client.cpp
551ababe67ce31778000d52958e53e1c56e1a294 09-Jul-2013 Eino-Ville Talvala <etalvala@google.com> am 06a4604e: am 4a5c009b: Camera2/3: As a fallback, unilaterally free old recording buffers

* commit '06a4604e77b5872857ef95fe712b6ce00c7aa506':
Camera2/3: As a fallback, unilaterally free old recording buffers
4a5c009bc2389304cf078c270bceb656479367d2 04-Jul-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: As a fallback, unilaterally free old recording buffers

When starting a recording session, check for and clear out recording
buffers still owned by stagefright from a previous recording session,
if any. There should never be any, but in case they are due to a bug
elsewhere in the system, clearing out the buffers makes recovery
possible.

Bug: 9591080
Change-Id: I3a2a1256860bd174381cd525948419f985c9b415
amera2/StreamingProcessor.cpp
amera2/StreamingProcessor.h
8f13428cb29a9b610a9e9a0f5fea437cd2d3f032 01-Jul-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2Api: Creating a JPEG stream needs to use the right size"
c7ba4a5c938d191bf0e477fc9b9aa4f0cba986ef 01-Jul-2013 Eino-Ville Talvala <etalvala@google.com> Camera2Api: Creating a JPEG stream needs to use the right size

JPEG streams have variable size, so use the HAL-provided max size
to size the stream buffers.

Change-Id: Ie6900bc9ece6e972eae93fca6aca779224c9bfc6
hotography/CameraDeviceClient.cpp
25d729c3aba847cb4b56b1e6ca143410faca76c8 28-Jun-2013 Eino-Ville Talvala <etalvala@google.com> resolved conflicts for merge of 364a2677 to master

Change-Id: I21f23c1c5e4408c24c359bef6270dffce47a988d
a691ff3c03e38e148bbefed35ebb15e552a12613 27-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Don't allow recording and callbacks to coexist.

- Tear down conflicting streams when necessary.

- Shut down callbacks if recording starts

- Do not allow callbacks to start if recording is active

Per the current camera API, recording and preview callbacks cannot be
active simultaneously. However, the framework did not explicitly
disallow this, and in fact left the streams configured once they were
created, even if switching between the two operational modes.

In addition, no guards existed for trying to enable both recording and
callbacks at the same time.

Bug: 9423825

Change-Id: I7d6e6114c2e14fcfb5299b4c72ad557895cbf4b8
amera2Client.cpp
amera2/CallbackProcessor.cpp
d44ffc822be382791327c45aec2e812fe66981ce 25-Jun-2013 Igor Murashkin <iam@google.com> Merge changes I5b2eeab2,I71568560

* changes:
Make android.hardware.photography.Camera work on HAL3+ devices
Initial implementation of android.hardware.photography.CameraDevice (service)
98e24724fb77445d4d015a5fec4ecbd5b49abc9b 20-Jun-2013 Igor Murashkin <iam@google.com> Make android.hardware.photography.Camera work on HAL3+ devices

Bug: 9213377
Change-Id: I5b2eeab28985f53dfcb7b8e3029930f5adcd74f5
ndroid.mk
amera2Client.cpp
amera2ClientBase.cpp
ameraDeviceFactory.cpp
ameraDeviceFactory.h
ameraService.cpp
ameraService.h
e7ee7637747371635a85fedd24d2190bb1f38651 12-Jun-2013 Igor Murashkin <iam@google.com> Initial implementation of android.hardware.photography.CameraDevice (service)

* Verified preview streaming requests
* Other things *should* work but unverified / unimplemented in client side

Missing:
* CameraService needs to return static camera info metadata

Bug: 9213377
Change-Id: I71568560fcf18d0e2b408ed1c4d0066647314868
ndroid.mk
amera2ClientBase.cpp
amera2ClientBase.h
ameraService.cpp
ameraService.h
hotography/CameraDeviceClient.cpp
hotography/CameraDeviceClient.h
e8fdbae47bf5793124f244c684ed597ebb78d3f5 21-Jun-2013 Alex Ray <aray@google.com> camera2/3: Warn on missing active array size parameters

Change-Id: I752659e1f0522392b902839cd7f4d997dcd85966
amera2/Parameters.cpp
b3570568b3f37b3f7018257ece53cbc009b91407 19-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am 9c8714da: am e6478de7: Camera2/3: Avoid shutdown race in callback processor.

* commit '9c8714daaf6a402abd85557e9b652c86f0df86e4':
Camera2/3: Avoid shutdown race in callback processor.
e6478de72a8ae1d3abb3e8c20898977c45354a4f 19-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Avoid shutdown race in callback processor.

It's possible, during shutdown, for callback processor's heap to be
destroyed when it's about to send the callback back to the user.
Properly copy the heap reference to a local variable before unlocking
the mutex.

Bug: 9485959
Change-Id: I301347b77145f19c7ac721b9127dc74f122acce2
amera2/CallbackProcessor.cpp
078a540525f86517aefa4afc56e12fbd74e3823d 18-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am bda5d1f2: am 241b5279: Camera3: Power: Properly shut down unused thread.

* commit 'bda5d1f2a34f9b7ded0bc0441be4856e78ec066c':
Camera3: Power: Properly shut down unused thread.
241b52798809d8db3d369af05ace1f73f723f29b 17-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Power: Properly shut down unused thread.

Bug: 9466221
Change-Id: I9ed0740561b2e04954eebc1b8aec89cfab40a3a0
amera2/ZslProcessor3.cpp
8147a6ddfd54079ef89f90bf2b5ed3ab6f59bbc0 14-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am 0cc75491: am 26bc908b: Camera2/3: Make sure to wait for idle after still capture.

* commit '0cc754918a3c1353164ccc5798f63b28f65db406':
Camera2/3: Make sure to wait for idle after still capture.
c0c13c0cd4d21877e1de6a83504c1804a90c149f 14-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am e4a453d4: am 214a17fd: Camera3: Always close HAL device even in face of errors.

* commit 'e4a453d4b7563d1dab674df6ce52c291e63c6ca7':
Camera3: Always close HAL device even in face of errors.
26bc908b3dafb5d80f092a22c5c71116526eae06 14-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Make sure to wait for idle after still capture.

While this wait should be immediate, it's important to guarantee
that preview is stopped when takePicture completes, and that the
device knows itself to be idle.

Bug: 9413025
Change-Id: I1c151ba920e226107ee048918187364990f444c0
amera2/CaptureSequencer.cpp
a28a10c618e90db32e5ebf4927484fdcbda89840 14-Jun-2013 Alex Ray <aray@google.com> Merge "camera2: accept 4-value active array size"
03e6579fc8d853ab6dd6b8ece10ebf4d434b1e17 13-Jun-2013 Alex Ray <aray@google.com> camera2: accept 4-value active array size

Change-Id: Ia320a022b201a938a025efc30a54c05fcfe5b02f
amera2/Parameters.cpp
214a17fd37ef85fc841d3157b1e9096e1aa1b42f 13-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Always close HAL device even in face of errors.

To improve robustness, make sure the HAL device instance is always
closed, even if it cannot be put into the IDLE state.

Bug: 9414167
Change-Id: I8e7035ff0afe7214951f9824e561b340cb37592e
amera3Device.cpp
04411d3ed343added179703837c6c24444acce3b 13-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am ccc366a9: am 1191454a: Merge "Camera3: Skipping no-ops good, not updating state machine bad." into jb-mr2-dev

* commit 'ccc366a90fdd8d9df5de27820f04bc534d122c07':
Camera3: Skipping no-ops good, not updating state machine bad.
2b5f8f451d5459b17a7a99637f99a950fd74cc96 13-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am 4541531a: am c4a8d2dd: Merge "Camera2/3: Create JPEG stream unconditionally." into jb-mr2-dev

* commit '4541531a6e64329764ad7359775689a8f5aca165':
Camera2/3: Create JPEG stream unconditionally.
1191454a3a960a1972b0f36e625796c6c1b2c9ca 13-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Skipping no-ops good, not updating state machine bad." into jb-mr2-dev
c4a8d2ddfff6d91e493692251733f20ece3e713d 13-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2/3: Create JPEG stream unconditionally." into jb-mr2-dev
31fdb29c9f5569fff20756ef1240120817993660 13-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Skipping no-ops good, not updating state machine bad.

If a HAL-level stream reconfigure is not needed, still need to
transition camera device to ACTIVE state in configureStreams.
Otherwise, shutdown functions will not wait for device to drain
properly.

Bug: 9413025
Change-Id: I0b15792097c7e5771015f2a362735d5f88b8c6ea
amera3Device.cpp
52b943e8036aa6ebd15131820d196fedb321613d 12-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am 44ade05f: am ea26c777: Camera3: Skip no-op stream configurations.

* commit '44ade05f8d030ae3af8d05359734b18eac433935':
Camera3: Skip no-op stream configurations.
ea26c7772f4721657db409068d4bed194ae49c94 12-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Skip no-op stream configurations.

If configuring the same set of streams more than once, don't actually
call into the HAL for the second and subsequent configure calls, since
they're no-ops.

This can speed up camera operation substantially if the
HAL implementation does not detect no-ops on its own and does a full
shutdown/restart on each configure call.

Bug: 9392513
Change-Id: I23baf4acbae2304735899adcf8e17565fa94d31d
amera3Device.cpp
amera3Device.h
a9c64a9398ac2e6173f99e252f305808a34cab1c 11-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Create JPEG stream unconditionally.

Instead of creating the JPEG output stream only at first use,
create it at time of preview start. This is important for reducing
the first-capture latency on HAL3 devices, and for ZSL on them.

Bug: 9339858
Change-Id: I4296f706cfd151c47ef315149e87d01fe554aaa4
amera2Client.cpp
5e07157c8f69030b4f9bdabded76f84fd4c91fd7 10-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Add more tracing"
17a61adbd7cc1abe432deeffc11660daa74f6496 04-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Add more tracing

Change-Id: I5f5d0d3f37244f19446c473db70373bdf16cce56
amera3Device.cpp
amera3/Camera3Stream.cpp
f05aec20748c9b71ffbb35cf0ae10078d297b45d 07-Jun-2013 Zhijun He <zhijunhe@google.com> am 574ca4f4: am ba696bbf: Merge "camera2/3: Fix deadlock take picture while preview callback" into jb-mr2-dev

* commit '574ca4f4f15a42d6159150149f68bf3cb800d869':
camera2/3: Fix deadlock take picture while preview callback
ddb104d382e5432e0b15c1b3ee91ba0eed73d0ec 07-Jun-2013 Zhijun He <zhijunhe@google.com> camera2/3: Fix deadlock take picture while preview callback

Acquiring mInputMutex before SharedParameters mutex in preview callback thread
causes circular locking dependency between callback thread and capture callback
thread.
Enforce the right lock ordering to break the dead lock.

Bug: 9323319
Change-Id: Iea2e025e4d9e29debcf74297c19930075017e179
amera2/CallbackProcessor.cpp
dcb614cda0fb11d06dc3e7f508367a36baaebd54 06-Jun-2013 Zhijun He <zhijunhe@google.com> am e097efde: am b05eeaed: camera3: Fix crash in set error state.

* commit 'e097efde4363f80d5ffc34da6ec6253fbd4e5397':
camera3: Fix crash in set error state.
b05eeaedacaff92b6e5ac89f99b0fccdf7643f09 06-Jun-2013 Zhijun He <zhijunhe@google.com> camera3: Fix crash in set error state.

When camera open fails in camera3device initialize call, setErrorStateLockedV()
tries to access RequestThread object that is not created yet.

Bug: 9319518
Change-Id: Id5c6c0150ecaecb198045d5c6eb1b2ceebf5a727
amera3Device.cpp
9490a96eab4b25b23777b297de75186dfb932577 06-Jun-2013 Zhijun He <zhijunhe@google.com> am 1d263b89: am 62a8f67f: camera2/3: Add protection to callback processing call

* commit '1d263b89bd1c5d73389f53976e104dd6b088ab6e':
camera2/3: Add protection to callback processing call
62a8f67f33faf19d0ff815672dd19bb71dd0d650 06-Jun-2013 Zhijun He <zhijunhe@google.com> camera2/3: Add protection to callback processing call

Callback stream in callbackprocessor could be delleted while process or
discard callback are ongoing, which leads CpuConsumer related call crash.

Bug 9303911

Change-Id: Ib6137e512208e5603468eba166640729b744e8f9
amera2/CallbackProcessor.cpp
50bdb73e04cbdf5a8da647f8830cd88663f20f14 05-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am 4dd110ae: am 254446a8: Camera2/3: Move recording frame processing to its own thread.

* commit '4dd110ae6d9f00e1ec036f697045f4b3326b7873':
Camera2/3: Move recording frame processing to its own thread.
254446a80cb13d5beb606bfc3e60a17473869478 05-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Move recording frame processing to its own thread.

Due to new deadlock opportunities from HAL3 integration, recording
frame processing needs to move out of the new frame handler into its
own thread in StreamingProcessor.

Bug: 9282913
Change-Id: I8d2926f2de9d0d395eef3c328c65caebbdbd2827
amera2Client.cpp
amera2/StreamingProcessor.cpp
amera2/StreamingProcessor.h
4b58d70b4109648b5d392d6ad4e4512d9ae5afb7 04-Jun-2013 Eino-Ville Talvala <etalvala@google.com> am cbbd6c83: am 8f908c0c: Merge "Camera2/3: Don\'t trigger AF when in INFINITY focus mode." into jb-mr2-dev

* commit 'cbbd6c8354f7323933081b217ce53461d99215c4':
Camera2/3: Don't trigger AF when in INFINITY focus mode.
9454a9710b13c7d9262fe1cbd910235a3cd35f20 04-Jun-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Don't trigger AF when in INFINITY focus mode.

While the HAL should ignore it, it's faster to immediately respond
with success.

Also filter out cancel autofocus calls for FIXED/INFINITY focus.

Bug: 9263856
Change-Id: I637ec7c8b459d654ef11cb1142b959f2674224c5
amera2Client.cpp
fe7e0c6154309f2491463ee6ca4920d225289638 30-May-2013 Alex Ray <aray@google.com> camera: Dont segfault when result lacks timestamp

Also make a log message more useful.

Change-Id: Id8b65a9b55e1ebe41598dc2db4b0b2aa3f161965
amera3Device.cpp
20cb300bce9a2b80966a422ef2de35b18533e1dd 29-May-2013 Alex Ray <aray@google.com> camera3: Error on minimum buffer count

Change-Id: Idf16de20e940e411286ec3e477534b36ef1c9b11
amera3/Camera3OutputStream.cpp
211a2ed2c05044a10c8619d1dba1070b72a8b256 23-May-2013 Alex Ray <aray@google.com> Camera: static parameter default values

Use sane default values for static metadata parameters.

Change-Id: I180d9b6560ebba468a083e847b78e02b845db788
amera2/Parameters.cpp
608cff22d70a0eabb7e01ef39f13b4d6db5ba48a 25-May-2013 Alex Ray <aray@google.com> libcameraservice: missing argument when logging

Change-Id: I6f3da400f8f47a387968b9da4ee7cd8e0c9dea70
amera2/JpegCompressor.cpp
8bae43ae86b9942892980c3c01bff5c812b1db7f 29-May-2013 Igor Murashkin <iam@google.com> am 9f013a46: am 3c89a2e9: Merge "camera3: Don\'t try to disconnect stream native windows more than once" into jb-mr2-dev

* commit '9f013a46e150da01ebb267574d8095eef399cd0c':
camera3: Don't try to disconnect stream native windows more than once
3c89a2e9d4ee10b9e955783af2ab9e9dd137922f 29-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Don't try to disconnect stream native windows more than once" into jb-mr2-dev
e2172bed7e77ab1d922588cf727818b481400b53 29-May-2013 Igor Murashkin <iam@google.com> camera3: Don't try to disconnect stream native windows more than once

This fixes the multiple-disconnect-from-BufferQueue bug.

(In logs)
BufferQueue: [SurfaceView] disconnect: connected to another api (cur=0, req=4)

Bug: 9114681
Change-Id: I21ae1c5bd993701eea13648aa9994979a24eb210
amera3Device.cpp
amera3/Camera3IOStreamBase.cpp
amera3/Camera3Stream.cpp
amera3/Camera3Stream.h
55beec78a47a32288a01dde7fbc08406aa44345a 24-May-2013 Zhijun He <zhijunhe@google.com> am 22a5ddb6: am 6f6b31da: Merge "Camera3: Fix the deadlock during recording pinch zooming" into jb-mr2-dev

* commit '22a5ddb68173b75053d838a30d091920cd0a1dca':
Camera3: Fix the deadlock during recording pinch zooming
4032fc33089ddd6f4bc4f247f5c8f32a3f7f975e 24-May-2013 Ed Heyl <edheyl@google.com> am 14e585c8: am 6947f125: Merge "camera3: Disable ZSL for limited mode camera HALs" into jb-mr2-dev

* commit '14e585c8e0667c13202dbefc52f9d00ffe161cf1':
camera3: Disable ZSL for limited mode camera HALs
6f6b31da6097f1d770137ebadac5023dd8b79413 24-May-2013 Zhijun He <zhijunhe@google.com> Merge "Camera3: Fix the deadlock during recording pinch zooming" into jb-mr2-dev
6947f125f76dde6664779126415d11b3365225da 24-May-2013 Ed Heyl <edheyl@google.com> Merge "camera3: Disable ZSL for limited mode camera HALs" into jb-mr2-dev
059161b7ab0a38b276b1aa26e73ff4398a02e012 24-May-2013 Igor Murashkin <iam@google.com> camera3: Disable ZSL for limited mode camera HALs

Bug: 9111852
Change-Id: Idad7e0d2f912341bd643d0ad1a0861fb2043aa90
amera2/Parameters.cpp
d030447b617105b31bf3013e5e4b39d422b53b77 15-May-2013 Lajos Molnar <lajos@google.com> stagefright: BufferProducer updates

Update BufferQueue and ConsumerBase users to new BufferQueue
API, to allow BufferQueue slots to be reused. Buffer consumers
generally now need to track the unique frameNumber belonging to
each frame acquired if they are using BufferQueue directly.
Otherwise, they can simply track the graphicBuffer.

Change-Id: I30ee3158cf40fb10bbd085241646d5f1128ee480
Signed-off-by: Lajos Molnar <lajos@google.com>
Related-to-bug: 7093648
ui/RingBufferConsumer.cpp
599d83e4f2197968d77d3d106630179c88c8a6d7 23-May-2013 Igor Murashkin <iam@google.com> am 9b89c15d: am ca3fb120: Merge "camera3: Fix zsl buffers released-while-in-use race condition" into jb-mr2-dev

* commit '9b89c15d9d8abb9408760ffdb022df4c4367685b':
camera3: Fix zsl buffers released-while-in-use race condition
ca3fb120f5697c05e3ea1a50abe913a9cc4a8d73 23-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Fix zsl buffers released-while-in-use race condition" into jb-mr2-dev
124ccf4b5023a40c57b49981123e6c9b61408a5d 22-May-2013 Zhijun He <zhijunhe@google.com> Camera3: Fix the deadlock during recording pinch zooming

When zooming during recording, hal callback thread and request update thread run
into deadlock due to lock circular dependency. This change release lock during
queuebuffer in callback thread to break the dependency.

Bug: 9091576
Change-Id: Ia7b3f0ec17573cb32a5696dcde419ca28f42cfb8
amera3/Camera3OutputStream.cpp
amera3/Camera3OutputStream.h
7d7bb975026a3b428101cdea11e2d94605f845c1 23-May-2013 Igor Murashkin <iam@google.com> am 98730cd7: am 1f7f83b7: Merge "Camera3: Make sure new metadata results signal other threads waiting" into jb-mr2-dev

* commit '98730cd7456b32255a37d691a70f49df22975a72':
Camera3: Make sure new metadata results signal other threads waiting
1f7f83b7a1f2e2d01f808913ef0b869652c08949 23-May-2013 Igor Murashkin <iam@google.com> Merge "Camera3: Make sure new metadata results signal other threads waiting" into jb-mr2-dev
efb0fd232388b1f726c59f2ec20eea2d3ea8465d 23-May-2013 Igor Murashkin <iam@google.com> camera3: Fix zsl buffers released-while-in-use race condition

Bug: 9007356
Change-Id: I0ced31020410978c549d408b2815f925e9c9ffcf
amera2/ZslProcessor3.cpp
ui/RingBufferConsumer.cpp
c7722457d9896c10fd33816fbea831852af68330 22-May-2013 Igor Murashkin <iam@google.com> am b7337d56: am ed49d7b5: Merge "camera3: Fix recording failure when switching resolutions while preview on" into jb-mr2-dev

* commit 'b7337d56a72c9b20abf57e853953126d0aa3dd1a':
camera3: Fix recording failure when switching resolutions while preview on
ed49d7b57e66cc2520817b345ef9de289d688bd4 22-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Fix recording failure when switching resolutions while preview on" into jb-mr2-dev
65e218ee5249d722a1af0bab6546709f3de62f8c 22-May-2013 Mansoor Aftab <maftab@codeaurora.org> am 1d60db8b: am c2c874d8: Camera3: Fix Bug minTimestamp is never greater than frame timestamp

* commit '1d60db8bfce9becee9d101eacc58e2a673221622':
Camera3: Fix Bug minTimestamp is never greater than frame timestamp
c2c874d88df1b4be52f5415de6606785691bba1f 22-May-2013 Mansoor Aftab <maftab@codeaurora.org> Camera3: Fix Bug minTimestamp is never greater than frame timestamp

Bug in logic since minTimestamp is initialized to -1, and this needs
to be updated for the first frame atleast for logic to work correctly
for subsequent frames.

Bug: 9007356
Change-Id: I70edc4d9f34ff67a141c027c67396dc2ca9e413a
Signed-off-by: Igor Murashkin <iam@google.com>
amera2/ZslProcessor3.cpp
82db9e6126812dd2ee74e33e4c475cae2c7e48f6 21-May-2013 Igor Murashkin <iam@google.com> camera3: Fix recording failure when switching resolutions while preview on

Bug: 9069574
Change-Id: Ife2ae5467f799dbe37e66714b3a6c9a51e1fe328
amera2Client.cpp
amera2Client.h
amera2/StreamingProcessor.cpp
4345d5b57a93ec6d003df84f5cce2db7cccfbd86 17-May-2013 Igor Murashkin <iam@google.com> Camera3: Make sure new metadata results signal other threads waiting

- Also adds a lot of logging around shuffling around metadata frames

Bug: 9007356
Change-Id: I4285f4f55b4b899ea4928d43062c705619c8248a
amera3Device.cpp
amera2/ProFrameProcessor.cpp
amera2/ZslProcessor3.cpp
475173cd4c9108e6cd141ae74ea62ef9bbdc2aed 21-May-2013 Zhijun He <zhijunhe@google.com> am 722e4892: am 01831d23: Camera2/3: Increase digital zoom steps

* commit '722e4892e2afeb0c7abab84be1caa243d1692e28':
Camera2/3: Increase digital zoom steps
01831d233c84da7f9092e62f143626918a5a747e 20-May-2013 Zhijun He <zhijunhe@google.com> Camera2/3: Increase digital zoom steps

Digitial zoom number of steps was 30 and a bit rough. Change it to 100 to make
smooth zoom smoother.

Bug: 9050908
Change-Id: I141bc0335d58cdcd6530c14cbbfe6c4ffb4c6dc6
amera2/Parameters.h
bd398c64c368615a810c9658798dbe8ec44978e8 17-May-2013 Mathias Agopian <mathias@google.com> am 074eb387: am e2dfa5a4: Merge "update to Fence::waitForever() API change" into jb-mr2-dev

* commit '074eb387091ca464257601a2d23020e3e10a6915':
update to Fence::waitForever() API change
d76442421eadfa73f2f3a9e50f6caf65b0dd1ce9 17-May-2013 Mathias Agopian <mathias@google.com> update to Fence::waitForever() API change

Bug: 8988871
Change-Id: I24a2620d356f3bb6207ed834c79fd3e48b429695
amera3/Camera3Stream.cpp
amera3/Camera3Stream.h
ui/RingBufferConsumer.cpp
3551dfe5b1e228e609d69f717ef25692e4c7a4d5 15-May-2013 Eino-Ville Talvala <etalvala@google.com> am dfaccc77: am 7dd801bd: Merge "Camera3: Fix fast flexible YUV->NV21 path." into jb-mr2-dev

* commit 'dfaccc77508d5d0c6a4cc161ecb76d910c29f6c6':
Camera3: Fix fast flexible YUV->NV21 path.
0d0d868f5fbd549728e9ca4dea738f4663e076c4 15-May-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Fix fast flexible YUV->NV21 path." into jb-mr2-dev
7dd801bd108bff3e897e9e86c5f79f1ab05709d0 15-May-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Fix fast flexible YUV->NV21 path." into jb-mr2-dev
478b9593cede8e07ce0590d7a48bd4c0931ce9d2 15-May-2013 Igor Murashkin <iam@google.com> am 0560ecdc: am 083a08ac: Camera: don\'t spam RingBufferConsumer logs in eng builds

* commit '0560ecdc2de3032a3cba2d6e4e00777b5186fd2a':
Camera: don't spam RingBufferConsumer logs in eng builds
d5694a2e7e61cf7e19a0e135e63142d1967e178b 15-May-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Fix fast flexible YUV->NV21 path.

A U by any other name may smell just as sweet, but the color's pretty
awful if you call it a V.

Henceforth they never will be UV.

Bug: 8949720
Change-Id: I4897e93d5a293e576bb1d7ba44d91792b869ad42
amera2/CallbackProcessor.cpp
9c910c2d780ce1afa221f963da4d4a307443d9be 15-May-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Fix fast flexible YUV->NV21 path.

A U by any other name may smell just as sweet, but the color's pretty
awful if you call it a V.

Henceforth they never will be UV.

Bug: 8949720
Change-Id: I4897e93d5a293e576bb1d7ba44d91792b869ad42
amera2/CallbackProcessor.cpp
8e2afd9817e53858e3f99f810c0b7abe4c4d5533 15-May-2013 Igor Murashkin <iam@google.com> Camera: don't spam RingBufferConsumer logs in eng builds

Bug: 8969579
Change-Id: Ia51d4072725754fd3b6ca028232a605885376287
ui/RingBufferConsumer.cpp
083a08ac82704fdcc37334a4253ff075f703cc87 15-May-2013 Igor Murashkin <iam@google.com> Camera: don't spam RingBufferConsumer logs in eng builds

Bug: 8969579
Change-Id: Ia51d4072725754fd3b6ca028232a605885376287
ui/RingBufferConsumer.cpp
7f7728ffb7e812a845078e2e905b4d17ea40b57c 14-May-2013 Igor Murashkin <iam@google.com> am bd61103f: am be03b28f: Merge "Camera: Pause preview when needing to delete jpeg/zsl streams" into jb-mr2-dev

* commit 'bd61103faef2f75053c86764ae59b3b78d293448':
Camera: Pause preview when needing to delete jpeg/zsl streams
5282713a976184e41451315f1286d8075b257d58 13-May-2013 Igor Murashkin <iam@google.com> Camera: Pause preview when needing to delete jpeg/zsl streams

Bug: 8876221
Change-Id: Idf9490a48462fa44d49c4ebe99425c3149ae6378
amera2Client.cpp
amera2Client.h
amera3Device.cpp
amera2/JpegProcessor.cpp
amera2/StreamingProcessor.cpp
amera2/StreamingProcessor.h
amera2/ZslProcessor3.cpp
dca254aef0c09867e50fe6613c6fad405de72842 13-May-2013 Igor Murashkin <iam@google.com> Camera: Pause preview when needing to delete jpeg/zsl streams

Bug: 8876221
Change-Id: Idf9490a48462fa44d49c4ebe99425c3149ae6378
amera2Client.cpp
amera2Client.h
amera3Device.cpp
amera2/JpegProcessor.cpp
amera2/StreamingProcessor.cpp
amera2/StreamingProcessor.h
amera2/ZslProcessor3.cpp
e05eabe5c279e08adf100208143b0df229050778 13-May-2013 Igor Murashkin <iam@google.com> am 80502989: am 38ea629e: Merge "Camera3: Refactor stream code to be DRY" into jb-mr2-dev

* commit '805029896a90dc5897e07caf8e4cfa0f85613890':
Camera3: Refactor stream code to be DRY
8dbaa56a9de51d506977bda112f75b8af50920e9 13-May-2013 Igor Murashkin <iam@google.com> Merge "Camera3: Refactor stream code to be DRY" into jb-mr2-dev
38ea629ed2ccba17c763f697ced6d654a42bf699 13-May-2013 Igor Murashkin <iam@google.com> Merge "Camera3: Refactor stream code to be DRY" into jb-mr2-dev
4a1c0a68578c069b09ff5a1b6817dd3a0fe089a2 11-May-2013 Eino-Ville Talvala <etalvala@google.com> am 9ca66450: am 1d74d78f: Merge "Camera2/3: Optimize a few YCbCr_420_888 copy paths" into jb-mr2-dev

* commit '9ca66450ba724aa656382adb82bd61f3c6bdbbf6':
Camera2/3: Optimize a few YCbCr_420_888 copy paths
5fd5b268201e2fc21aaeba4fbac11195ee430c71 11-May-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2/3: Optimize a few YCbCr_420_888 copy paths" into jb-mr2-dev
1d74d78feb36aa08cfba696b67278cb6bbed6bd2 11-May-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2/3: Optimize a few YCbCr_420_888 copy paths" into jb-mr2-dev
38ff2244e951a9365aa142d46b1a8c326788756a 11-May-2013 Alex Ray <aray@google.com> am 0626ee02: am da5405fb: Merge "Camera2: FoV quirk crop regions" into jb-mr2-dev

* commit '0626ee0238dea760e35b840e424ec357ebebaf23':
Camera2: FoV quirk crop regions
6d0cf90b6b28cbb7e3e1b3ae32017aa4b44b6452 10-May-2013 Alex Ray <aray@google.com> Merge "Camera2: FoV quirk crop regions" into jb-mr2-dev
da5405fb0453d8a8ce99ab303599ecb4b47c6ccb 10-May-2013 Alex Ray <aray@google.com> Merge "Camera2: FoV quirk crop regions" into jb-mr2-dev
e3a9f964d7ebb6f269e6df2ba9c24b7c8b9ccefd 09-May-2013 Igor Murashkin <iam@google.com> Camera3: Refactor stream code to be DRY

Bug: 8851039
Change-Id: Iaac2926bfa25dd6e9db8b307765d4fe709b88d21
ndroid.mk
amera3/Camera3IOStreamBase.cpp
amera3/Camera3IOStreamBase.h
amera3/Camera3InputStream.cpp
amera3/Camera3InputStream.h
amera3/Camera3OutputStream.cpp
amera3/Camera3OutputStream.h
amera3/Camera3ZslStream.cpp
amera3/Camera3ZslStream.h
ae3d0babb9c5d68b107b53d5a67193309020c556 09-May-2013 Igor Murashkin <iam@google.com> Camera3: Refactor stream code to be DRY

Bug: 8851039
Change-Id: Iaac2926bfa25dd6e9db8b307765d4fe709b88d21
ndroid.mk
amera3/Camera3IOStreamBase.cpp
amera3/Camera3IOStreamBase.h
amera3/Camera3InputStream.cpp
amera3/Camera3InputStream.h
amera3/Camera3OutputStream.cpp
amera3/Camera3OutputStream.h
amera3/Camera3ZslStream.cpp
amera3/Camera3ZslStream.h
22d63bfe19e04d0c268cfe1219022ff8b85d1826 10-May-2013 Eino-Ville Talvala <etalvala@google.com> am d9e8b326: am 747b8492: Camera3: Fix initial orientation configuration.

* commit 'd9e8b32690078f2cc518a76b3abc501e41fb3aa3':
Camera3: Fix initial orientation configuration.
2703cf1f71f679542f21632a9c1bd88af9578d0f 10-May-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Fix initial orientation configuration.

One call to set orientation too many.

Bug: 8683719
Change-Id: I4b776fc8665eed940a1f18a6f617be4f1406e41a
amera3/Camera3OutputStream.cpp
747b84925886dec39cd7532637b9338054e649ef 10-May-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Fix initial orientation configuration.

One call to set orientation too many.

Bug: 8683719
Change-Id: I4b776fc8665eed940a1f18a6f617be4f1406e41a
amera3/Camera3OutputStream.cpp
dfb6ca555f3b77baa3f18c4dbbc20c644778e60f 09-May-2013 Igor Murashkin <iam@google.com> am e0a4abca: am e464e15a: Merge "camera3: Manage fences properly when buffers are returned with an error" into jb-mr2-dev

* commit 'e0a4abcad6b7e9df99201e35a43b8a8878aa46f8':
camera3: Manage fences properly when buffers are returned with an error
bdf8f272d34c883755637bb08e4b9d2cd0384eb6 09-May-2013 Igor Murashkin <iam@google.com> am 12e66666: am 7fe6ac0d: Merge "camera2: Add height to the crop region metadata property" into jb-mr2-dev

* commit '12e666660a8ff9dabc5270a8d06b402481d97a14':
camera2: Add height to the crop region metadata property
7167849162e046606ffdbfa6a94fadd8f0518af2 09-May-2013 Eino-Ville Talvala <etalvala@google.com> resolved conflicts for merge of c077fc5d to master

Change-Id: Ic636aaf49ac81c070551f3ba9fc48cfa4932bec0
fcbf94b9407b28d5a5f1a14e822e8b9ee264b7d8 09-May-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Optimize a few YCbCr_420_888 copy paths

Covers cases where the HAL format and the API format have the same
chroma layout.

Bug: 8734880
Change-Id: Ia735082c260b5914fc14f12551f91917c4e53b01
amera2/CallbackProcessor.cpp
7e66ebc932b4cfa9b4611dffeeb1e91399deb442 09-May-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Optimize a few YCbCr_420_888 copy paths

Covers cases where the HAL format and the API format have the same
chroma layout.

Bug: 8734880
Change-Id: Ia735082c260b5914fc14f12551f91917c4e53b01
amera2/CallbackProcessor.cpp
9d75e9928f0fd49c4a0764ab71eb00636848c87a 09-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Manage fences properly when buffers are returned with an error" into jb-mr2-dev
e464e15a31bb57754a227f5058299160e6d47ebb 09-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Manage fences properly when buffers are returned with an error" into jb-mr2-dev
7fe6ac0de4b36f89a7f20dafb693e814344f9b4d 09-May-2013 Igor Murashkin <iam@google.com> Merge "camera2: Add height to the crop region metadata property" into jb-mr2-dev
714e392037834a1d183609745e69d3cfc2d26985 09-May-2013 Igor Murashkin <iam@google.com> Merge "camera2: Add height to the crop region metadata property" into jb-mr2-dev
19cb41fbee0218c51345844a59437ee8c087c970 09-May-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Support flexible YUV for preview callbacks" into jb-mr2-dev
8513c5ef44428229fc43d4c0fe3f31f0ff79ed41 09-May-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Support flexible YUV for preview callbacks" into jb-mr2-dev
d354abf5658a9da89762e09ae46404ab6b1c9bae 09-May-2013 Igor Murashkin <iam@google.com> am a790258a: am a5751c3a: Merge "Camera: Hotplug - conditionally transition to PRESENT when clients disconnect" into jb-mr2-dev

* commit 'a790258aa5061a18ef455061de914c025fa86ded':
Camera: Hotplug - conditionally transition to PRESENT when clients disconnect
5a1798ad24c73212c6614cf9f11de5fa86a20148 07-May-2013 Igor Murashkin <iam@google.com> camera3: Manage fences properly when buffers are returned with an error

Bug: 8622089
Change-Id: I4df0258d6803d460d4dd98f0a80829eb844ca30d
amera3/Camera3OutputStream.cpp
amera3/Camera3ZslStream.cpp
df2c8bfd48b687bfefacc9167c5dbc66b20f5e91 07-May-2013 Igor Murashkin <iam@google.com> camera3: Manage fences properly when buffers are returned with an error

Bug: 8622089
Change-Id: I4df0258d6803d460d4dd98f0a80829eb844ca30d
amera3/Camera3OutputStream.cpp
amera3/Camera3ZslStream.cpp
a5751c3ade37923ef7b36c53c36bb55ef7076a3b 08-May-2013 Igor Murashkin <iam@google.com> Merge "Camera: Hotplug - conditionally transition to PRESENT when clients disconnect" into jb-mr2-dev
a281c960b27eff06e3f4a57d1057c38dad18fff5 08-May-2013 Igor Murashkin <iam@google.com> Merge "Camera: Hotplug - conditionally transition to PRESENT when clients disconnect" into jb-mr2-dev
4ad015003cbab4ee6889b803225648c76a156193 07-May-2013 Alex Ray <aray@google.com> Camera2: FoV quirk crop regions

Bug: 8484377
Change-Id: I5ffcc20b68dc92b502acc9898e57f12cadb92848
amera2/Parameters.cpp
c3624cbf410c8915a103fcb3dacaab583badcfe0 07-May-2013 Alex Ray <aray@google.com> Camera2: FoV quirk crop regions

Bug: 8484377
Change-Id: I5ffcc20b68dc92b502acc9898e57f12cadb92848
amera2/Parameters.cpp
05bbae99e0fc30ffdef8a3c5037fb3db7c55211b 07-May-2013 Igor Murashkin <iam@google.com> camera2: Add height to the crop region metadata property

Bug: 8756080
Change-Id: I90b9166440e92f7675255a01ddc4a980c2e52201
amera2/Parameters.cpp
be53a80f4e50921790aa7c5eb12b798b988232b6 07-May-2013 Igor Murashkin <iam@google.com> camera2: Add height to the crop region metadata property

Bug: 8756080
Change-Id: I90b9166440e92f7675255a01ddc4a980c2e52201
amera2/Parameters.cpp
4a66ad403b21a256773c719ae39f7b5e705b244e 05-May-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Support flexible YUV for preview callbacks

When the HAL supports it, and the client asks for YV12 or NV21,
use the new flexible YUV format instead.

Bug: 8734880

Change-Id: Ib0129d9c26a6b30f3be7aa624c2439c6edba1bbd
amera2/CallbackProcessor.cpp
amera2/CallbackProcessor.h
amera2/Parameters.cpp
amera2/Parameters.h
92086e6d402dcad6e199325ef097d7707b3d1f83 05-May-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Support flexible YUV for preview callbacks

When the HAL supports it, and the client asks for YV12 or NV21,
use the new flexible YUV format instead.

Bug: 8734880

Change-Id: Ib0129d9c26a6b30f3be7aa624c2439c6edba1bbd
amera2/CallbackProcessor.cpp
amera2/CallbackProcessor.h
amera2/Parameters.cpp
amera2/Parameters.h
13320af823b7e539af13f66cb0fa4654cbae6beb 07-May-2013 Igor Murashkin <iam@google.com> am 41348da3: am ef33d308: Merge "camera3: Don\'t eagerly finish configuring bidi streams more than once" into jb-mr2-dev

* commit '41348da3a614bca05e7a4f6c96b0a91d7df924fe':
camera3: Don't eagerly finish configuring bidi streams more than once
ef33d3085fd5ac92e90af80a9fca729daa001eca 06-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Don't eagerly finish configuring bidi streams more than once" into jb-mr2-dev
41af583462d06aeac417567d08d10d21a484aa00 06-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Don't eagerly finish configuring bidi streams more than once" into jb-mr2-dev
93747b9c7724f690b3068300514c05629e0b0a3e 02-May-2013 Igor Murashkin <iam@google.com> Camera: Hotplug - conditionally transition to PRESENT when clients disconnect

Fixes an issue where a client could unconditionally transition to PRESENT
after a client disconnects, even though the underlying HAL status was actually
NOT_PRESENT or ENUMERATING.

Bug: 8780114
Change-Id: I68adb5fc819eec3b046ddcb2507b84bedc999a0f
ameraService.cpp
ameraService.h
f6adf0eaa9b1035540b5f68555c307983b631a6f 02-May-2013 Igor Murashkin <iam@google.com> Camera: Hotplug - conditionally transition to PRESENT when clients disconnect

Fixes an issue where a client could unconditionally transition to PRESENT
after a client disconnects, even though the underlying HAL status was actually
NOT_PRESENT or ENUMERATING.

Bug: 8780114
Change-Id: I68adb5fc819eec3b046ddcb2507b84bedc999a0f
ameraService.cpp
ameraService.h
b0864b6a20dc2e72bd6d08ad3c06f0fa5cef92e0 03-May-2013 Igor Murashkin <iam@google.com> am f9539bb7: am 2628bc9d: Merge "camera3: Don\'t crash when taking a still capture with ZSL disabled" into jb-mr2-dev

* commit 'f9539bb75101b85033eb45fd283b3fa40eaa8c98':
camera3: Don't crash when taking a still capture with ZSL disabled
2628bc9d1261c2942f3506baca348ccd71ea9c86 03-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Don't crash when taking a still capture with ZSL disabled" into jb-mr2-dev
98e099aca2089decdf3486ae216c89766cc252f2 03-May-2013 Igor Murashkin <iam@google.com> Merge "camera3: Don't crash when taking a still capture with ZSL disabled" into jb-mr2-dev
0b918674b971c111b8cba322aad5848a6d53a913 02-May-2013 Igor Murashkin <iam@google.com> camera3: Don't eagerly finish configuring bidi streams more than once

Finishing all stream configuration immediately is good, but when a stream is
both input and output it attempted to finish configuring bidi streams twice.
Since all ZSL streams are bidi, when we had a ZSL stream active preview would
immediately stop working.

Bug: 8563838
Change-Id: Iec998f11f6405fc15f3f31bd7cd29f03a7968d14
amera3Device.cpp
073f8570d8404b6d1ea3a1bd34954c6332ba991a 02-May-2013 Igor Murashkin <iam@google.com> camera3: Don't eagerly finish configuring bidi streams more than once

Finishing all stream configuration immediately is good, but when a stream is
both input and output it attempted to finish configuring bidi streams twice.
Since all ZSL streams are bidi, when we had a ZSL stream active preview would
immediately stop working.

Bug: 8563838
Change-Id: Iec998f11f6405fc15f3f31bd7cd29f03a7968d14
amera3Device.cpp
fe98d7cabf689784fe804fb8fdc2908b3cf83aa9 02-May-2013 Eino-Ville Talvala <etalvala@google.com> am 86150f33: am a69f3213: Merge "Camera2/3: Fix still image FOV reporting." into jb-mr2-dev

* commit '86150f33380a93cbc0d1554f5bcd0af2d3ebf246':
Camera2/3: Fix still image FOV reporting.
a69f3213d122b09d04fb890efd6dbe87a8df4ecc 02-May-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2/3: Fix still image FOV reporting." into jb-mr2-dev
e0b121bd312dc4c238cca5d9b48192c1b4cd53c1 02-May-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2/3: Fix still image FOV reporting." into jb-mr2-dev
768b7d07e8c660d7b42b0f6b76da275821ee0adb 02-May-2013 Igor Murashkin <iam@google.com> camera3: Don't crash when taking a still capture with ZSL disabled

Bug: 8790212
Change-Id: I4bf7ac5ab856b0ea1738844182efb86137e14083
amera2/ZslProcessor3.cpp
61675c0a7b5d88d5f525b1a1926fab6a7b2c7904 02-May-2013 Igor Murashkin <iam@google.com> camera3: Don't crash when taking a still capture with ZSL disabled

Bug: 8790212
Change-Id: I4bf7ac5ab856b0ea1738844182efb86137e14083
amera2/ZslProcessor3.cpp
1f1872f1e1f3705e235ce784ce6d79102d26c117 29-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Fix still image FOV reporting.

Still FOV can vary as a function of the output sizes, with
the function depending on the HAL version.

Calculate and update the FOV whenever the output sizes might change.

Bug: 8484377
Change-Id: I56f2cc768a1e128a159b326588be55b2752db06e
amera2/Parameters.cpp
amera2/Parameters.h
a1220f482f5a50488777ab789abd861b5565acdc 29-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera2/3: Fix still image FOV reporting.

Still FOV can vary as a function of the output sizes, with
the function depending on the HAL version.

Calculate and update the FOV whenever the output sizes might change.

Bug: 8484377
Change-Id: I56f2cc768a1e128a159b326588be55b2752db06e
amera2/Parameters.cpp
amera2/Parameters.h
7d710e1fb373d338a166560abdb90fde0c0213ef 01-May-2013 Igor Murashkin <iam@google.com> am 1931e9b9: am 3c7c39af: Merge "Camera3: Add missing buffer listener include (for ZSL)" into jb-mr2-dev

* commit '1931e9b9e5ff613f3c45f298e30d717b4a2b15a5':
Camera3: Add missing buffer listener include (for ZSL)
3c7c39afbc8931ef2cec1bed3c477a19c139f87e 01-May-2013 Igor Murashkin <iam@google.com> Merge "Camera3: Add missing buffer listener include (for ZSL)" into jb-mr2-dev
197b11755575a0ff65b5bf19523972ca5b39bf22 01-May-2013 Igor Murashkin <iam@google.com> Merge "Camera3: Add missing buffer listener include (for ZSL)" into jb-mr2-dev
eb10919cd3c8c26b0b9c09f933d152248ac3a666 01-May-2013 Igor Murashkin <iam@google.com> Camera3: Add missing buffer listener include (for ZSL)

Bug: 8563838
Change-Id: Ie053655f5583d20003abdabccee68980d7cdcbfd
amera3/Camera3StreamBufferListener.h
1dbcd935994dc5067bb2f16101f0f2ad6c9c1e1d 01-May-2013 Igor Murashkin <iam@google.com> Camera3: Add missing buffer listener include (for ZSL)

Bug: 8563838
Change-Id: Ie053655f5583d20003abdabccee68980d7cdcbfd
amera3/Camera3StreamBufferListener.h
bfbe189e1052fe44f668efedb8eca6c9b3c9abaf 01-May-2013 Igor Murashkin <iam@google.com> am 7a0f7d9f: am d24b0653: Merge changes I2feda142,I5a95e0be,Ia0c21ef0 into jb-mr2-dev

* commit '7a0f7d9f6cdad84e4b5f6c6b164874393d541824':
Camera3: Add ZSL stream support
camera: Add new RingBufferConsumer to keep a ring buffer of acquired frames
Camera3: Add input stream support
d24b0653c7620e07e92308c05b41f7df9943f83b 01-May-2013 Igor Murashkin <iam@google.com> Merge changes I2feda142,I5a95e0be,Ia0c21ef0 into jb-mr2-dev

* changes:
Camera3: Add ZSL stream support
camera: Add new RingBufferConsumer to keep a ring buffer of acquired frames
Camera3: Add input stream support
75b61342bd47ed27ce0d8bf8f59ddaf8f6b73b19 01-May-2013 Igor Murashkin <iam@google.com> Merge changes I2feda142,I5a95e0be,Ia0c21ef0 into jb-mr2-dev

* changes:
Camera3: Add ZSL stream support
camera: Add new RingBufferConsumer to keep a ring buffer of acquired frames
Camera3: Add input stream support
ef052a9a7ca79340086bf636e536fb6420f5c2ac 01-May-2013 Igor Murashkin <iam@google.com> am 6feba7db: am d8c7ad1c: Camera: Don\'t complain repeatedly about missing android.led.availableLeds

* commit '6feba7db1144dc383de22a521854d7e983c700fb':
Camera: Don't complain repeatedly about missing android.led.availableLeds
d8c7ad1cbc2e6830560a085380a5828cc3d41010 30-Apr-2013 Igor Murashkin <iam@google.com> Camera: Don't complain repeatedly about missing android.led.availableLeds

Bug: 8765726
Change-Id: I78f5f98315068aaad3a39d56698b9c8a18cc8f4a
amera2/Parameters.cpp
amera2/Parameters.h
37b2602761cbfc20f8a36e27eb4cf1b3dfd04e6b 30-Apr-2013 Igor Murashkin <iam@google.com> Camera: Don't complain repeatedly about missing android.led.availableLeds

Bug: 8765726
Change-Id: I78f5f98315068aaad3a39d56698b9c8a18cc8f4a
amera2/Parameters.cpp
amera2/Parameters.h
4e2a359b7c4f0255f8323c379d6f85e6f210cbbc 29-Apr-2013 Igor Murashkin <iam@google.com> am ce68884d: am b7e2ef14: Merge "ProCamera: Add security permission checks for disabling transmit LED" into jb-mr2-dev

* commit 'ce68884da85fdc148756c0b233366b17507e72de':
ProCamera: Add security permission checks for disabling transmit LED
60f11be60f84e79f69e597d158a775c1294e75e9 29-Apr-2013 Eino-Ville Talvala <etalvala@google.com> resolved conflicts for merge of c853784d to master

Change-Id: I8aecc3c4c533a0444ee5c696f05b5c48ac077dbf
ae500e53efa1d26eb7c13e62d0ecc8d75db2473a 22-Apr-2013 Igor Murashkin <iam@google.com> Camera3: Add ZSL stream support

Bug: 8563838

Change-Id: I2feda142ff5172aba17ade5c8d502f9bb5d5b766
ndroid.mk
amera2Client.cpp
amera2Client.h
amera3Device.cpp
amera3Device.h
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
amera2/ZslProcessor3.cpp
amera2/ZslProcessor3.h
amera2/ZslProcessorInterface.h
amera3/Camera3OutputStream.h
amera3/Camera3OutputStreamInterface.h
amera3/Camera3Stream.cpp
amera3/Camera3Stream.h
amera3/Camera3StreamInterface.h
amera3/Camera3ZslStream.cpp
amera3/Camera3ZslStream.h
2fba584544e8687b526e3388bf7160b696da1dba 22-Apr-2013 Igor Murashkin <iam@google.com> Camera3: Add ZSL stream support

Bug: 8563838

Change-Id: I2feda142ff5172aba17ade5c8d502f9bb5d5b766
ndroid.mk
amera2Client.cpp
amera2Client.h
amera3Device.cpp
amera3Device.h
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
amera2/ZslProcessor3.cpp
amera2/ZslProcessor3.h
amera2/ZslProcessorInterface.h
amera3/Camera3OutputStream.h
amera3/Camera3OutputStreamInterface.h
amera3/Camera3Stream.cpp
amera3/Camera3Stream.h
amera3/Camera3StreamInterface.h
amera3/Camera3ZslStream.cpp
amera3/Camera3ZslStream.h
40602741ae87e6bf368c17dd28db4d2db344bded 29-Apr-2013 Igor Murashkin <iam@google.com> camera: Add new RingBufferConsumer to keep a ring buffer of acquired frames

Bug: 8563838
Change-Id: I5a95e0be94e5388b30639905efae42d3c3279f72
ndroid.mk
ui/RingBufferConsumer.cpp
ui/RingBufferConsumer.h
d4d5227521a53dec6f77bed33846b4ccd4a760e4 29-Apr-2013 Igor Murashkin <iam@google.com> camera: Add new RingBufferConsumer to keep a ring buffer of acquired frames

Bug: 8563838
Change-Id: I5a95e0be94e5388b30639905efae42d3c3279f72
ndroid.mk
ui/RingBufferConsumer.cpp
ui/RingBufferConsumer.h
b7e2ef14a93974935783e71829f4b3174001a0fb 27-Apr-2013 Igor Murashkin <iam@google.com> Merge "ProCamera: Add security permission checks for disabling transmit LED" into jb-mr2-dev
948700612e987b49185f7916befd38f39a2b0a3b 27-Apr-2013 Igor Murashkin <iam@google.com> Merge "ProCamera: Add security permission checks for disabling transmit LED" into jb-mr2-dev
a307beb68ac08d59525bbcb37ffb56bb3d4728c9 27-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Fix deadlock on shutdown due to client getting killed." into jb-mr2-dev
7081533bea68a71014d708776d0c384c45321ec5 27-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Fix deadlock on shutdown due to client getting killed." into jb-mr2-dev
0776a14513300f04dc5c1d2f89c4156576b8b8ed 15-Apr-2013 Igor Murashkin <iam@google.com> Camera3: Add input stream support

- Untested with actual CAMERA3_STREAM_INPUT streams.

Bug: 8629088

Change-Id: Ia0c21ef0a2c951e401ea8babd15d3cceb4bb25a1
amera3Device.cpp
amera3Device.h
amera3/Camera3InputStream.cpp
amera3/Camera3InputStream.h
amera3/Camera3OutputStream.cpp
amera3/Camera3Stream.cpp
amera3/Camera3Stream.h
5a269fa72b419e7fe4bf6bf9b27eec8782b3a963 15-Apr-2013 Igor Murashkin <iam@google.com> Camera3: Add input stream support

- Untested with actual CAMERA3_STREAM_INPUT streams.

Bug: 8629088

Change-Id: Ia0c21ef0a2c951e401ea8babd15d3cceb4bb25a1
amera3Device.cpp
amera3Device.h
amera3/Camera3InputStream.cpp
amera3/Camera3InputStream.h
amera3/Camera3OutputStream.cpp
amera3/Camera3Stream.cpp
amera3/Camera3Stream.h
d09801b99503b57c35e321ad9afa7e861e012813 24-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix deadlock on shutdown due to client getting killed.

When the binder connection dies and is the only holder of a strong
pointer to the Camera2Client, disconnect is called from the
destructor. At this point, all weak pointers to Camera2Client are no
longer promotable, and lots of cleanup code paths are broken as a
result.

Rework all such code paths to not need the client pointer, and to
discard image buffers that arrive during shutdown.

Bug: 8696047
Change-Id: Ic0672ecde7c1baaf65079f925a45bd5be45f1fb3
amera2Client.cpp
amera2Device.cpp
ameraService.cpp
amera2/CallbackProcessor.cpp
amera2/CallbackProcessor.h
amera2/JpegProcessor.cpp
amera2/JpegProcessor.h
amera2/StreamingProcessor.cpp
amera2/StreamingProcessor.h
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
02f8457cf788e09e4f0c302dda453f13293009e7 24-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix deadlock on shutdown due to client getting killed.

When the binder connection dies and is the only holder of a strong
pointer to the Camera2Client, disconnect is called from the
destructor. At this point, all weak pointers to Camera2Client are no
longer promotable, and lots of cleanup code paths are broken as a
result.

Rework all such code paths to not need the client pointer, and to
discard image buffers that arrive during shutdown.

Bug: 8696047
Change-Id: Ic0672ecde7c1baaf65079f925a45bd5be45f1fb3
amera2Client.cpp
amera2Device.cpp
ameraService.cpp
amera2/CallbackProcessor.cpp
amera2/CallbackProcessor.h
amera2/JpegProcessor.cpp
amera2/JpegProcessor.h
amera2/StreamingProcessor.cpp
amera2/StreamingProcessor.h
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
03ac850527ffb90348dcdaad95caceb97649fd6b 23-Apr-2013 Igor Murashkin <iam@google.com> ProCamera: Add security permission checks for disabling transmit LED

Bug: 8554573
Change-Id: Ie909908a4cab3700bd622282e8342e8fa5b72376
roCamera2Client.cpp
roCamera2Client.h
amera2/Parameters.cpp
b2d99929781e6c6c4aee41636aa5c6b6922b83de 23-Apr-2013 Igor Murashkin <iam@google.com> ProCamera: Add security permission checks for disabling transmit LED

Bug: 8554573
Change-Id: Ie909908a4cab3700bd622282e8342e8fa5b72376
roCamera2Client.cpp
roCamera2Client.h
amera2/Parameters.cpp
4e6139a522ee0fae9acad3e48d2b4158127a3bfa 24-Apr-2013 Eino-Ville Talvala <etalvala@google.com> am b524303e: am 5e437722: Merge "Camera3: Register all stream buffers at stream configuration time." into jb-mr2-dev

* commit 'b524303ec9c48377a3a47fb273e0017f8edec142':
Camera3: Register all stream buffers at stream configuration time.
cc8d4f8f280dfdcc76df4f18f63e7f9c21684455 20-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Register all stream buffers at stream configuration time.

While registering them later would be nice for startup time, current
hardware will have to reinitialize everything, resulting in glitches.

Bug: 8657740
Change-Id: I1ed1f0a65d648f219f5228c8df15ffcf2a4b272e
amera3Device.cpp
4c95676d259f4449a7da5161dfd46c1d1f9498fe 20-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Register all stream buffers at stream configuration time.

While registering them later would be nice for startup time, current
hardware will have to reinitialize everything, resulting in glitches.

Bug: 8657740
Change-Id: I1ed1f0a65d648f219f5228c8df15ffcf2a4b272e
amera3Device.cpp
5051b5303155d65c92da9d81135fe7832742ae59 19-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Add preview callback surface support"
3ee3550a2f529cbf56d87d8503f59a8f45dccf32 03-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Add preview callback surface support

- Add call to set a preview callback surface
- Implement support for HAL2/3 devices
- Still need HAL1 implementation

Change-Id: I0dc0bd72e43d871aa487858d1665c1efca633ffe
amera2Client.cpp
amera2Client.h
ameraClient.cpp
ameraClient.h
ameraService.h
amera2/CallbackProcessor.cpp
amera2/CallbackProcessor.h
amera2/Parameters.cpp
amera2/Parameters.h
55137044fef6cb9dc4872fbbe963add28c4383a0 09-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Allow multiple process_capture_result calls per request

To simplify HAL implementation, allow the results for a single
capture request to be sent from the HAL across multiple calls
to process_capture_request.

This requires that the HAL must call notify() with the SHUTTER message
to indicate start of exposure time, before the first call to
process_capture_result for a given frame.

Bug: 8565103

Change-Id: I6a61449725f98af88769fafa07736848a226dad2
amera3Device.cpp
amera3Device.h
42368d9308db27a47c9ac706f9b040fa269257a9 09-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Allow multiple process_capture_result calls per request

To simplify HAL implementation, allow the results for a single
capture request to be sent from the HAL across multiple calls
to process_capture_request.

This requires that the HAL must call notify() with the SHUTTER message
to indicate start of exposure time, before the first call to
process_capture_result for a given frame.

Bug: 8565103

Change-Id: I6a61449725f98af88769fafa07736848a226dad2
amera3Device.cpp
amera3Device.h
cb42f317876ff42ed2b7de432b87d0486c385eb7 12-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Improve error logging" into jb-mr2-dev
30c90a56adf7709f2e735219a24a70c60bd1c882 12-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Merge "Camera3: Improve error logging" into jb-mr2-dev
da0dc0af0effe9fbfb3ce3187c8472fca2baf3c6 10-Apr-2013 Ying Wang <wangying@google.com> Add liblog

Bug: 8580410
Change-Id: If493d87d60d71be664ad75b140c62acadb75b0d0
ndroid.mk
ecba7488c5cceaacef95836b1b476433451e7761 10-Apr-2013 Ying Wang <wangying@google.com> Add liblog

Bug: 8580410
Change-Id: If493d87d60d71be664ad75b140c62acadb75b0d0
ndroid.mk
13ec8c4eb54067a9c982ee141121d0ec8230348b 09-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Improve error logging

In preparation for supporting fragmented result calls.

Bug: 8565103
Change-Id: Id834637d7cbecf7b550333beedab3281b5400748
amera3Device.cpp
amera3Device.h
b2058d19297e508133a66b033d29380924b5d267 09-Apr-2013 Eino-Ville Talvala <etalvala@google.com> Camera3: Improve error logging

In preparation for supporting fragmented result calls.

Bug: 8565103
Change-Id: Id834637d7cbecf7b550333beedab3281b5400748
amera3Device.cpp
amera3Device.h
b3a95a56f0adaf2b60ff164275487d1870442734 02-Apr-2013 Igor Murashkin <iam@google.com> Camera: implement takePicture for HAL3-using clients

* Implements Camera2Device-style triggers by mutating the next request
* Implements Camera3Device::waitUntilRequestReceived

Change-Id: Ie0b5591158872513a0bffbfab33123cf18dacf8a
amera3Device.cpp
amera3Device.h
amera2/CaptureSequencer.cpp
amera2/JpegProcessor.h
4d2f2e8414df33337d4f09e5235719dfcc705674 02-Apr-2013 Igor Murashkin <iam@google.com> Camera: implement takePicture for HAL3-using clients

* Implements Camera2Device-style triggers by mutating the next request
* Implements Camera3Device::waitUntilRequestReceived

Change-Id: Ie0b5591158872513a0bffbfab33123cf18dacf8a
amera3Device.cpp
amera3Device.h
amera2/CaptureSequencer.cpp
amera2/JpegProcessor.h
e09f486085c7e7f3de329db73ad6bb9899740dbe 03-Apr-2013 Igor Murashkin <iam@google.com> Camera3: Fix output stream creation for JPEG streams

Change-Id: Iadf85c103c21614abb1aeb69a832ca01919c2aa5
amera3/Camera3OutputStream.cpp
a55b545ef3d8624123efe0e04c2a7d3a30b56b48 03-Apr-2013 Igor Murashkin <iam@google.com> Camera3: Fix output stream creation for JPEG streams

Change-Id: Iadf85c103c21614abb1aeb69a832ca01919c2aa5
amera3/Camera3OutputStream.cpp
b7c9d61b9d398b272c8138a2c6aace069229ac03 02-Apr-2013 Igor Murashkin <iam@google.com> Camera3: Fix metadata result not being rewritten after capture

Generally this problem manifested itself as the Frame Count not being set,
which then errored out ProFrameProcessor with a "Success" error.

Change-Id: Ifa927f43d0ce92100651ad3f714099a2f1ec4c2a
amera3Device.cpp
d2c90696403bb3c9e28d7b51d65c9468bdf8e78b 02-Apr-2013 Igor Murashkin <iam@google.com> Camera3: Fix metadata result not being rewritten after capture

Generally this problem manifested itself as the Frame Count not being set,
which then errored out ProFrameProcessor with a "Success" error.

Change-Id: Ifa927f43d0ce92100651ad3f714099a2f1ec4c2a
amera3Device.cpp
d0158c38ad82c1c3033a6dd5806435def3727784 11-Mar-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Add output side to camera3 HAL device

- Notifications
- Result queue and processing

Change-Id: Id6b4746708ce6c6dcc7262666b6ac3130fa3d225
amera2Client.cpp
amera3Device.cpp
amera3Device.h
7d346fa448551703f98e8892ae7f4eb56675b92a 11-Mar-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Add output side to camera3 HAL device

- Notifications
- Result queue and processing

Change-Id: Id6b4746708ce6c6dcc7262666b6ac3130fa3d225
amera2Client.cpp
amera3Device.cpp
amera3Device.h
3b53bc9b41c262d22f094406e3751bc5a41ef2ef 28-Feb-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Add input side to camera3 HAL device

- Stream creation/deletion
- Request submission
- Request thread loop
- Add get() to CameraMetadata to allow HAL submission while retaining
ownership.

Change-Id: I271f72bcbe9557eded43cbcbfe789109857f8144
amera3Device.cpp
amera3Device.h
f76e027c43f531fc6f9287838b5c332236a4338a 28-Feb-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Add input side to camera3 HAL device

- Stream creation/deletion
- Request submission
- Request thread loop
- Add get() to CameraMetadata to allow HAL submission while retaining
ownership.

Change-Id: I271f72bcbe9557eded43cbcbfe789109857f8144
amera3Device.cpp
amera3Device.h
8be20f50711a94426f1394ec113672e41c1224e8 07-Mar-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Add streams to camera3 HAL device

- Generic stream interface
- Functional output stream
- Skeleton input/zsl stream

Change-Id: I143794eac1a2217031d62b51912662fc6d1db900
ndroid.mk
amera3/Camera3InputStream.cpp
amera3/Camera3InputStream.h
amera3/Camera3OutputStream.cpp
amera3/Camera3OutputStream.h
amera3/Camera3Stream.cpp
amera3/Camera3Stream.h
amera3/Camera3ZslStream.cpp
amera3/Camera3ZslStream.h
fd58f1a10a749ca72fec1012920d6e94a664cd70 07-Mar-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Add streams to camera3 HAL device

- Generic stream interface
- Functional output stream
- Skeleton input/zsl stream

Change-Id: I143794eac1a2217031d62b51912662fc6d1db900
ndroid.mk
amera3/Camera3InputStream.cpp
amera3/Camera3InputStream.h
amera3/Camera3OutputStream.cpp
amera3/Camera3OutputStream.h
amera3/Camera3Stream.cpp
amera3/Camera3Stream.h
amera3/Camera3ZslStream.cpp
amera3/Camera3ZslStream.h
cba2c163555cd329f49d40658ea3ee902e94dda3 20-Mar-2013 Igor Murashkin <iam@google.com> Camera: Add hotplug support (for fixed # of cameras)

* Minor: also change addListener to fire the current status upon subscription
* Minor: STATUS_AVAILABLE is now an alias for STATUS_PRESENT and deprecated

Change-Id: I254608a7332095e3ef201ffea64cff156cfc1b3e
ameraService.cpp
ameraService.h
a36381479c5c546a01188390f1e0d2e280a3dbd8 20-Mar-2013 Igor Murashkin <iam@google.com> Camera: Add hotplug support (for fixed # of cameras)

* Minor: also change addListener to fire the current status upon subscription
* Minor: STATUS_AVAILABLE is now an alias for STATUS_PRESENT and deprecated

Change-Id: I254608a7332095e3ef201ffea64cff156cfc1b3e
ameraService.cpp
ameraService.h
cc76ec941661206e3a3c53f9aff789c839a869bb 21-Mar-2013 Igor Murashkin <iam@google.com> Camera2: getSceneMode should return NULL when there are no supported scene modes

Bug: 8444806
Change-Id: Ic92924ceda3de738a7971605552baf00a4fc0546
amera2/Parameters.cpp
b08a63931f22a1e934b32e8fb8de9ab4877d5258 21-Mar-2013 Igor Murashkin <iam@google.com> Camera2: getSceneMode should return NULL when there are no supported scene modes

Bug: 8444806
Change-Id: Ic92924ceda3de738a7971605552baf00a4fc0546
amera2/Parameters.cpp
caf3a9c1447f602c658f558025b90413d1b4114d 21-Mar-2013 Ziv Hendel <ziv@primesense.com> commandStartFaceDetectionL returned the wrong value when face detection is not supported by the HAL.
This caused the JNI function to fail since it expected a BAD_VALUE response in that case.

Change-Id: I53107a3958d541c25930b81eda638d4b6a394254
Signed-off-by: Igor Murashkin <iam@google.com>
amera2Client.cpp
ea49f4b4ba9d182fd8a74c74d16590cb65f3a5f1 21-Mar-2013 Ziv Hendel <ziv@primesense.com> commandStartFaceDetectionL returned the wrong value when face detection is not supported by the HAL.
This caused the JNI function to fail since it expected a BAD_VALUE response in that case.

Change-Id: I53107a3958d541c25930b81eda638d4b6a394254
Signed-off-by: Igor Murashkin <iam@google.com>
amera2Client.cpp
c13c8bc609be74c89a23a4e3b396b807e59047f1 17-Mar-2013 Alex Ray <aray@google.com> Camera: fix waitUntilDrained log message

Change-Id: Iab6197e0674752de7933dd812bff430a5c487c4b
amera2Device.cpp
f0eeb53e4763fe5063d3ce880f72d52f136fc3c5 17-Mar-2013 Alex Ray <aray@google.com> Camera: fix waitUntilDrained log message

Change-Id: Iab6197e0674752de7933dd812bff430a5c487c4b
amera2Device.cpp
acd695c42749f8821b0a0cc27739ddf096c6d4e8 14-Mar-2013 Igor Murashkin <iam@google.com> ProCamera: Fix rare deadlock when client destructs inside the connect call

Bug: 8337737
Change-Id: Ia6fca4365fa20fdbfd6a1ec8d047639a002f2aba
ameraService.cpp
26bb1d3702e01779c5ef481c2ad38568d4cc2aa8 14-Mar-2013 Igor Murashkin <iam@google.com> ProCamera: Fix rare deadlock when client destructs inside the connect call

Bug: 8337737
Change-Id: Ia6fca4365fa20fdbfd6a1ec8d047639a002f2aba
ameraService.cpp
e6800cea0678dbc0bf697b44c3e4548b0253085c 05-Mar-2013 Igor Murashkin <iam@google.com> Camera: Make ProCamera connect take the same paths as Camera connect

* ProCamera uses the app ops manager
* Refactored connect calls to be as common as possible
* Removed some useless not implemented function calls in ProClient

Change-Id: I5dab30d20f0c202a494a07b2cfe4c1fa04a2a076
amera2Client.cpp
amera2ClientBase.cpp
ameraService.cpp
ameraService.h
9ab909bff49b2eccde1b028901717c193ef723af 05-Mar-2013 Igor Murashkin <iam@google.com> Camera: Make ProCamera connect take the same paths as Camera connect

* ProCamera uses the app ops manager
* Refactored connect calls to be as common as possible
* Removed some useless not implemented function calls in ProClient

Change-Id: I5dab30d20f0c202a494a07b2cfe4c1fa04a2a076
amera2Client.cpp
amera2ClientBase.cpp
ameraService.cpp
ameraService.h
fa4cf9d310685b4c25877cba772ff7da84caf517 05-Mar-2013 Igor Murashkin <iam@google.com> (Camera)ProCamera: Remove unused functions from binder interface

Change-Id: I0582268cef6e84b630bc87c8a03dcd69d54c440d
roCamera2Client.cpp
roCamera2Client.h
7cf9a7e7d19579565e0f9dba8be9c107f2dbf548 05-Mar-2013 Igor Murashkin <iam@google.com> (Camera)ProCamera: Remove unused functions from binder interface

Change-Id: I0582268cef6e84b630bc87c8a03dcd69d54c440d
roCamera2Client.cpp
roCamera2Client.h
ce124da179775a81ad7dcc3f33315eca451e66f2 04-Mar-2013 Igor Murashkin <iam@google.com> (Camera)FrameProcessor: Refactor to share code with ProFrameProcessor

Change-Id: Ie8cd0df7caf83f9d0134f560ae31ab72f2f7d1fc
amera2Client.cpp
amera2Device.cpp
amera2Device.h
amera3Device.cpp
amera3Device.h
ameraDeviceBase.h
roCamera2Client.cpp
amera2/FrameProcessor.cpp
amera2/FrameProcessor.h
amera2/ProFrameProcessor.cpp
amera2/ProFrameProcessor.h
71381051e2d048b2705c447b3d59db6e972493ee 04-Mar-2013 Igor Murashkin <iam@google.com> (Camera)FrameProcessor: Refactor to share code with ProFrameProcessor

Change-Id: Ie8cd0df7caf83f9d0134f560ae31ab72f2f7d1fc
amera2Client.cpp
amera2Device.cpp
amera2Device.h
amera3Device.cpp
amera3Device.h
ameraDeviceBase.h
roCamera2Client.cpp
amera2/FrameProcessor.cpp
amera2/FrameProcessor.h
amera2/ProFrameProcessor.cpp
amera2/ProFrameProcessor.h
44cfcf00b9008c1c04f4c8277c6c06af039fd976 02-Mar-2013 Igor Murashkin <iam@google.com> CameraService: Refactor Camera2Client to share a base with ProCameraClient

Change-Id: I249e2a0fc47ae84f29c9d9c4a223fba13da3ee66
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2ClientBase.cpp
amera2ClientBase.h
ameraClient.cpp
ameraService.cpp
ameraService.h
roCamera2Client.cpp
roCamera2Client.h
amera2/CallbackProcessor.cpp
amera2/CaptureSequencer.cpp
amera2/FrameProcessor.cpp
amera2/ProFrameProcessor.cpp
amera2/StreamingProcessor.cpp
a2e203bdb911bd5595723651d06ad91c330a7873 02-Mar-2013 Igor Murashkin <iam@google.com> CameraService: Refactor Camera2Client to share a base with ProCameraClient

Change-Id: I249e2a0fc47ae84f29c9d9c4a223fba13da3ee66
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2ClientBase.cpp
amera2ClientBase.h
ameraClient.cpp
ameraService.cpp
ameraService.h
roCamera2Client.cpp
roCamera2Client.h
amera2/CallbackProcessor.cpp
amera2/CaptureSequencer.cpp
amera2/FrameProcessor.cpp
amera2/ProFrameProcessor.cpp
amera2/StreamingProcessor.cpp
910403e064d37bd7f135f7de0cd3c64c5fa417c8 07-Mar-2013 Alex Ray <aray@google.com> Camera: Log warning on out-of-range face detect scores

Bug: 7368364
Change-Id: I7b1e995dd15e87c816b89ccf9968a222fd66d140
amera2/FrameProcessor.cpp
36185a4b38d43b712dc9790513b8ef5637aab004 07-Mar-2013 Alex Ray <aray@google.com> Camera: Log warning on out-of-range face detect scores

Bug: 7368364
Change-Id: I7b1e995dd15e87c816b89ccf9968a222fd66d140
amera2/FrameProcessor.cpp
8fdfbe27acd157d58fa35a849ec50c82464062f0 27-Feb-2013 Igor Murashkin <iam@google.com> Camera: Drop ProCamera connections when a Camera connection happens

* Also adds an ICameraServiceListener with available/not available statuses

Bug: 8291653
Change-Id: I24680f1a2dc109510caf451cf7c7bd180b670d84
ameraService.cpp
ameraService.h
roCamera2Client.cpp
roCamera2Client.h
bfc9915f482520eb9676c6d2dbf7f1ac078d937d 27-Feb-2013 Igor Murashkin <iam@google.com> Camera: Drop ProCamera connections when a Camera connection happens

* Also adds an ICameraServiceListener with available/not available statuses

Bug: 8291653
Change-Id: I24680f1a2dc109510caf451cf7c7bd180b670d84
ameraService.cpp
ameraService.h
roCamera2Client.cpp
roCamera2Client.h
7fa43f376ebd63fda24d85c9ebf97e0ddf534083 07-Feb-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Start of support for version 3.0 of camera device HAL

- Refactor common CameraDevice interface out of Camera2Device
- Initial skeleton only for Camera3Device

Change-Id: I097cc76e2ad102a51712ac114235163245f5482c
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
amera3Device.cpp
amera3Device.h
ameraClient.h
ameraDeviceBase.cpp
ameraDeviceBase.h
ameraHardwareInterface.h
ameraService.cpp
amera2/CallbackProcessor.cpp
amera2/FrameProcessor.cpp
amera2/JpegProcessor.cpp
amera2/StreamingProcessor.cpp
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
b99c5b8eebb35133a08c46b015624bd4c4a6c477 07-Feb-2013 Eino-Ville Talvala <etalvala@google.com> Camera: Start of support for version 3.0 of camera device HAL

- Refactor common CameraDevice interface out of Camera2Device
- Initial skeleton only for Camera3Device

Change-Id: I097cc76e2ad102a51712ac114235163245f5482c
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
amera3Device.cpp
amera3Device.h
ameraClient.h
ameraDeviceBase.cpp
ameraDeviceBase.h
ameraHardwareInterface.h
ameraService.cpp
amera2/CallbackProcessor.cpp
amera2/FrameProcessor.cpp
amera2/JpegProcessor.cpp
amera2/StreamingProcessor.cpp
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
b84d935c179a275a47e07291d2a983daf844de80 26-Feb-2013 Igor Murashkin <iam@google.com> camera_client: refactor Camera/ProCamera commonalities into BasicCamera

Change-Id: Ie10a4094522d49683657665fe94ab0b7ccd280e9
ameraService.cpp
ameraService.h
c073ba525404f3416c2824c435d3d926a9892f1b 26-Feb-2013 Igor Murashkin <iam@google.com> camera_client: refactor Camera/ProCamera commonalities into BasicCamera

Change-Id: Ie10a4094522d49683657665fe94ab0b7ccd280e9
ameraService.cpp
ameraService.h
48af7e8dd40883d6154e7029d9500072b551b5fa 19-Feb-2013 Eino-Ville Talvala <etalvala@google.com> CameraService and Stagefright: Support AppOps

Camera:
- Signal to AppOpsService when camera usage starts and stops
- Listen to permissions revocations and act on them
- Currently just kill camera connection when permissions lost

Stagefright:
- Pass on client name, UID to camera as needed

Bug: 8181262
Change-Id: I9e33c9d05e9daa77dbb2d795045d08eb887ec8f0
amera2Client.cpp
amera2Client.h
ameraClient.cpp
ameraClient.h
ameraService.cpp
ameraService.h
roCamera2Client.cpp
roCamera2Client.h
ceb388d6c03c38b96dc41c0ea4804b749aa077c4 19-Feb-2013 Eino-Ville Talvala <etalvala@google.com> CameraService and Stagefright: Support AppOps

Camera:
- Signal to AppOpsService when camera usage starts and stops
- Listen to permissions revocations and act on them
- Currently just kill camera connection when permissions lost

Stagefright:
- Pass on client name, UID to camera as needed

Bug: 8181262
Change-Id: I9e33c9d05e9daa77dbb2d795045d08eb887ec8f0
amera2Client.cpp
amera2Client.h
ameraClient.cpp
ameraClient.h
ameraService.cpp
ameraService.h
roCamera2Client.cpp
roCamera2Client.h
d127c2c8a8b68dae2f8743c310c2547e8f46d967 21-Feb-2013 Igor Murashkin <iam@google.com> ProCamera: Add getInfo for getting static metadata (and a test)

Change-Id: I3b87dfbc621d98bf41f37a892a1012baf85b5166
roCamera2Client.cpp
roCamera2Client.h
7b33a74bbc514b99c16be7fff9a34e892bc19264 21-Feb-2013 Igor Murashkin <iam@google.com> ProCamera: Add getInfo for getting static metadata (and a test)

Change-Id: I3b87dfbc621d98bf41f37a892a1012baf85b5166
roCamera2Client.cpp
roCamera2Client.h
418e493e8d67924cfda652cb64965647ce6381cb 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera - implement onResultReceived callback for metadata callbacks

Change-Id: I46775402b007244bc383d6343a620eebbd492aad
ndroid.mk
roCamera2Client.cpp
roCamera2Client.h
amera2/ProFrameProcessor.cpp
amera2/ProFrameProcessor.h
a91537e268f2b35f9f0dfdc0c4f84655c93285ae 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera - implement onResultReceived callback for metadata callbacks

Change-Id: I46775402b007244bc383d6343a620eebbd492aad
ndroid.mk
roCamera2Client.cpp
roCamera2Client.h
amera2/ProFrameProcessor.cpp
amera2/ProFrameProcessor.h
c0767f148e29ce821281b5965c0e25b4c143e76d 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera - add createStreamCpu and unit test

Change-Id: I468172dbfdd78510b273bf9d119c950cbeda7ea3
roCamera2Client.cpp
5835cc46a2f06dbfa5fbdab70e091896ef2fb438 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera - add createStreamCpu and unit test

Change-Id: I468172dbfdd78510b273bf9d119c950cbeda7ea3
roCamera2Client.cpp
5494cdc67b541034c963919aef8acb8b665e4dde 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: Change ProCamera to take IGraphicBufferProducer

Change-Id: Iec62eead6d179aa5486f7719143340976bb76e7d
roCamera2Client.cpp
roCamera2Client.h
76f8b43909817179b317880202360863b8f976d0 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: Change ProCamera to take IGraphicBufferProducer

Change-Id: Iec62eead6d179aa5486f7719143340976bb76e7d
roCamera2Client.cpp
roCamera2Client.h
9fb7fa159b2a47d6a7c0e9ef323b23298cdc7cb9 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera2Client implement createStream,createDefaultRequest

The StreamingImage unit test should now work when TEST_DISPLAY_SECS is set.

Change-Id: I9cf3ad5bd5a76096ab21bd39e631d636c4ff3d3f
roCamera2Client.cpp
roCamera2Client.h
3261fd3f1d8f798fab2f1b3efaa92d5a35cd42e7 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera2Client implement createStream,createDefaultRequest

The StreamingImage unit test should now work when TEST_DISPLAY_SECS is set.

Change-Id: I9cf3ad5bd5a76096ab21bd39e631d636c4ff3d3f
roCamera2Client.cpp
roCamera2Client.h
69e22433b9d7df77907579f67e47a159aa57f876 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera2Client - add createStream (service is stubbed) and unit test

Change-Id: I1ae7ba9b24f5883c214c19a7ed0eaf0c802d69c1
ndroid.mk
ameraService.cpp
roCamera2Client.cpp
roCamera2Client.h
985fd30a10f6fec4293f071fd258c4726cff5a3d 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: ProCamera2Client - add createStream (service is stubbed) and unit test

Change-Id: I1ae7ba9b24f5883c214c19a7ed0eaf0c802d69c1
ndroid.mk
ameraService.cpp
roCamera2Client.cpp
roCamera2Client.h
bfb5d5ef5bae01efac171397260a7152782d92c7 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: Add ProCamera private binder interface for an API2-light functionality

Change-Id: I2af7a807c99df75ea659e6e6acc9c4fca6a56274
ameraService.cpp
ameraService.h
634a51509ee50475f3e9f8ccf897e90fc72ded31 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: Add ProCamera private binder interface for an API2-light functionality

Change-Id: I2af7a807c99df75ea659e6e6acc9c4fca6a56274
ameraService.cpp
ameraService.h
e4e5b2f23fa85cae789dc6824ea8af321e211d60 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: Add unit test infrastructure for libcameraclient

Change-Id: I957538663ae8332d26f3640c63a75efc79f4ac5c
ameraService.cpp
1d88023e1de6b9f370eb4be944dd9c4480d01f11 21-Feb-2013 Igor Murashkin <iam@google.com> Camera: Add unit test infrastructure for libcameraclient

Change-Id: I957538663ae8332d26f3640c63a75efc79f4ac5c
ameraService.cpp
bd02dd1bf1f34eb4e100d0d058f1fe5a2790d67e 14-Feb-2013 Igor Murashkin <iam@google.com> Camera: Move CameraMetadata.h from service to client library

Change-Id: I940ce86f318f37ae5b73f912a6e589415150125f
ndroid.mk
amera2Client.h
amera2Device.cpp
amera2Device.h
amera2/BurstCapture.h
amera2/CallbackProcessor.h
amera2/CameraMetadata.cpp
amera2/CameraMetadata.h
amera2/CaptureSequencer.h
amera2/FrameProcessor.h
amera2/JpegProcessor.h
amera2/Parameters.h
amera2/StreamingProcessor.h
amera2/ZslProcessor.h
7efa520c76e6a1f6b3146404cc6aca5a8353583a 14-Feb-2013 Igor Murashkin <iam@google.com> Camera: Move CameraMetadata.h from service to client library

Change-Id: I940ce86f318f37ae5b73f912a6e589415150125f
ndroid.mk
amera2Client.h
amera2Device.cpp
amera2Device.h
amera2/BurstCapture.h
amera2/CallbackProcessor.h
amera2/CameraMetadata.cpp
amera2/CameraMetadata.h
amera2/CaptureSequencer.h
amera2/FrameProcessor.h
amera2/JpegProcessor.h
amera2/Parameters.h
amera2/StreamingProcessor.h
amera2/ZslProcessor.h
ee9cc423e2551ffbacfd226b8627737beabaec99 22-Feb-2013 Mathias Agopian <mathias@google.com> Merge "replace getISurfaceTexture by getIGraphicBufferProducer"
99c2f923f6b04efffe949d1daf9cb7148e3cc201 22-Feb-2013 Mathias Agopian <mathias@google.com> Merge "replace getISurfaceTexture by getIGraphicBufferProducer"
53c8ad31435bfb7c71a5b04dfc0314ac8f899219 20-Feb-2013 Alex Ray <aray@google.com> CameraService: Log camera module name

Explicitly logs camera module loaded. This is useful on systems with
multiple camera modules installed. Also this make the camera service
match audioflinger, which logs hardware module names as well.

Change-Id: I280bf12df2d517f936916b8ba3cb662e671d0216
ameraService.cpp
c0dd54f1a77fb94ae69cc3ac5944d718bb6caa28 20-Feb-2013 Alex Ray <aray@google.com> CameraService: Log camera module name

Explicitly logs camera module loaded. This is useful on systems with
multiple camera modules installed. Also this make the camera service
match audioflinger, which logs hardware module names as well.

Change-Id: I280bf12df2d517f936916b8ba3cb662e671d0216
ameraService.cpp
a6843669d4da47755ce97fb85389d4d1c52b8197 20-Feb-2013 Mathias Agopian <mathias@google.com> replace getISurfaceTexture by getIGraphicBufferProducer

Change-Id: I723a3863558126f2635a544a39bb3ec88d499c60
amera2Client.cpp
ameraClient.cpp
9e1cdea45d40fa8cf95dd080943053856009054f 20-Feb-2013 Mathias Agopian <mathias@google.com> replace getISurfaceTexture by getIGraphicBufferProducer

Change-Id: I723a3863558126f2635a544a39bb3ec88d499c60
amera2Client.cpp
ameraClient.cpp
b1e7cd156ca3e1747374e0d20cdd1ce467210453 15-Feb-2013 Mathias Agopian <mathias@google.com> Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830
amera2Client.cpp
ameraClient.cpp
ameraClient.h
ameraService.cpp
amera2/CallbackProcessor.cpp
amera2/JpegProcessor.cpp
amera2/StreamingProcessor.cpp
amera2/ZslProcessor.cpp
1a2952aee048ca7b1765e2bc09ebe9aeddaeafa3 15-Feb-2013 Mathias Agopian <mathias@google.com> Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: I4e8a8b20914cb64edc37abe68233fbc9f2b5d830
amera2Client.cpp
ameraClient.cpp
ameraClient.h
ameraService.cpp
amera2/CallbackProcessor.cpp
amera2/JpegProcessor.cpp
amera2/StreamingProcessor.cpp
amera2/ZslProcessor.cpp
eae312137f71af037d5f5b4071eef8e2ecd6055e 04-Jan-2013 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix JPEG quality metadata type, new warnings.

- JPEG quality tag is now a uint8_t, not an int. Update parameter code
accordingly.

- Fix new warnings about narrowing conversions.

Bug: 7944244

Change-Id: Ie081c57c9e9323148614b170b132ffb98c0a0b9f
amera2/Parameters.cpp
amera2/Parameters.h
c695b7c660e1fe62fca35c6b25c1849f3c81a49f 04-Jan-2013 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix JPEG quality metadata type, new warnings.

- JPEG quality tag is now a uint8_t, not an int. Update parameter code
accordingly.

- Fix new warnings about narrowing conversions.

Bug: 7944244

Change-Id: Ie081c57c9e9323148614b170b132ffb98c0a0b9f
amera2/Parameters.cpp
amera2/Parameters.h
484566c410afdfbc4b6bc5aa1732aef37428a5b8 18-Dec-2012 Andy McFadden <fadden@android.com> Rename ISurfaceTexture and SurfaceTexture

The C++ class names don't match what the classes do, so rename
ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to
GLConsumer.

Bug 7736700

Change-Id: I64520a55f8c09fe6215382ea361c539a9940cba5
amera2Client.cpp
amera2Client.h
ameraClient.cpp
ameraClient.h
ameraService.h
8ba01021b573889802e67e029225a96f0dfa471a 18-Dec-2012 Andy McFadden <fadden@android.com> Rename ISurfaceTexture and SurfaceTexture

The C++ class names don't match what the classes do, so rename
ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to
GLConsumer.

Bug 7736700

Change-Id: I64520a55f8c09fe6215382ea361c539a9940cba5
amera2Client.cpp
amera2Client.h
ameraClient.cpp
ameraClient.h
ameraService.h
2d2b40b67515208273197ac2f03c5fabd430efae 28-Nov-2012 Igor Murashkin <iam@google.com> Camera2: fix metadata symbols

Change-Id: I59e457824782de26b7b489cd92eb33d48e6ee2d9
amera2Client.cpp
amera2/FrameProcessor.cpp
amera2/Parameters.cpp
amera2/Parameters.h
d32b99b1a87497280add6efc0e99bd383e402de1 28-Nov-2012 Igor Murashkin <iam@google.com> Camera2: fix metadata symbols

Change-Id: I59e457824782de26b7b489cd92eb33d48e6ee2d9
amera2Client.cpp
amera2/FrameProcessor.cpp
amera2/Parameters.cpp
amera2/Parameters.h
72421521fd06787a407d06966e11f17b86900d2a 28-Nov-2012 Ben Murdoch <benm@google.com> Fix master build.

Change-Id: Ia362f74d8cd7df76292473c26c112dffe190c599
amera2Client.cpp
ff82370c7c04340d50673d425f48acafd00f2bc9 28-Nov-2012 Ben Murdoch <benm@google.com> Fix master build.

Change-Id: Ia362f74d8cd7df76292473c26c112dffe190c599
amera2Client.cpp
a10f9b0470f598c8edf0b11a7b4c78cdf7dd1f86 28-Nov-2012 Igor Murashkin <iam@google.com> am b8fa1240: am aa9e3e01: Camera: Play shutter sound iff enableShutterSound(true) && ShutterCallback !null

* commit 'b8fa1240eedeb487a7ee0cf7d60e17bed9b25cf4':
Camera: Play shutter sound iff enableShutterSound(true) && ShutterCallback !null
6e406b10353af2c8ae9f7cd38f9053d4e017b4b1 28-Nov-2012 Igor Murashkin <iam@google.com> am b8fa1240: am aa9e3e01: Camera: Play shutter sound iff enableShutterSound(true) && ShutterCallback !null

* commit 'b8fa1240eedeb487a7ee0cf7d60e17bed9b25cf4':
Camera: Play shutter sound iff enableShutterSound(true) && ShutterCallback !null
786a8daf400df7b49f6a7c19a5cea9b504d6aa9e 26-Nov-2012 Igor Murashkin <iam@google.com> Camera: Play shutter sound iff enableShutterSound(true) && ShutterCallback !null

Bug: 7564718
Change-Id: Ie7821cdee57966d88af048759578439a3e6ecb2e
amera2Client.cpp
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
aa9e3e01b86bd9bfb5ac36c0f360d5fe478cbb2d 26-Nov-2012 Igor Murashkin <iam@google.com> Camera: Play shutter sound iff enableShutterSound(true) && ShutterCallback !null

Bug: 7564718
Change-Id: Ie7821cdee57966d88af048759578439a3e6ecb2e
amera2Client.cpp
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
faa4420344216ccbad15a49aa7c1cd6141532fcb 30-Oct-2012 Glenn Kasten <gkasten@google.com> Remove obsolete references to libmedia_native

Bug: 6654403
Change-Id: I3993d62987cf0dd85db10bf002a5cce53d4f01bd
ndroid.mk
c41590251aa84c078c942d258e838aad814b73a5 30-Oct-2012 Glenn Kasten <gkasten@google.com> Remove obsolete references to libmedia_native

Bug: 6654403
Change-Id: I3993d62987cf0dd85db10bf002a5cce53d4f01bd
ndroid.mk
ebe3f69ef09777001b14a1cb9a2a21090655a14b 13-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Compile with warnings, fix warnings

Change-Id: I557350abb32b0480f5da7dcecadfbe9edbe53361
ndroid.mk
amera2Client.cpp
amera2Device.cpp
ameraClient.cpp
ameraHardwareInterface.h
amera2/BurstCapture.cpp
amera2/CallbackProcessor.cpp
amera2/CaptureSequencer.cpp
amera2/FrameProcessor.cpp
amera2/JpegCompressor.cpp
amera2/JpegProcessor.cpp
amera2/Parameters.cpp
amera2/StreamingProcessor.cpp
amera2/ZslProcessor.cpp
ddf3c5025e2f6f35a4c188c19f30142c64a092c4 13-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Compile with warnings, fix warnings

Change-Id: I557350abb32b0480f5da7dcecadfbe9edbe53361
ndroid.mk
amera2Client.cpp
amera2Device.cpp
ameraClient.cpp
ameraHardwareInterface.h
amera2/BurstCapture.cpp
amera2/CallbackProcessor.cpp
amera2/CaptureSequencer.cpp
amera2/FrameProcessor.cpp
amera2/JpegCompressor.cpp
amera2/JpegProcessor.cpp
amera2/Parameters.cpp
amera2/StreamingProcessor.cpp
amera2/ZslProcessor.cpp
bd37975395b6517e155f6195d2300872bc26ee70 25-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 203836b7: am b8d6efba: Camera2: Don\'t hold locks while waiting to sync.

* commit '203836b7584ccb7787202578259d27d70a8a3ede':
Camera2: Don't hold locks while waiting to sync.
692c3e54c63aaaf7e9ef4d89761f98975bd34f33 25-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 203836b7: am b8d6efba: Camera2: Don\'t hold locks while waiting to sync.

* commit '203836b7584ccb7787202578259d27d70a8a3ede':
Camera2: Don't hold locks while waiting to sync.
1d838ceb5808a8753ec20b59deb121ec8b011fb4 25-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't hold locks while waiting to sync.

Bug: 7409877
Change-Id: Ia3a0bc4f0ab4e19fca868ba04a870cf8e8ee7adb
amera2Client.cpp
b8d6efba8b87e6eeb049651cb67f9827198e658e 25-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't hold locks while waiting to sync.

Bug: 7409877
Change-Id: Ia3a0bc4f0ab4e19fca868ba04a870cf8e8ee7adb
amera2Client.cpp
c0b24fdc610d27518b12a3e5ae1ec1872932d9de 23-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 9e83f44c: am 6ccc3c34: Merge "Camera2: Increase mode update timeout." into jb-mr1-dev

* commit '9e83f44c0b310a72a080c006ebc3c07bdccc7027':
Camera2: Increase mode update timeout.
e2097a5a3ea4e11b6dfa53a67ae6c101faeadcdb 23-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 9e83f44c: am 6ccc3c34: Merge "Camera2: Increase mode update timeout." into jb-mr1-dev

* commit '9e83f44c0b310a72a080c006ebc3c07bdccc7027':
Camera2: Increase mode update timeout.
b66e9d6bcc45fabd1a8490d968d58cac8e1ac70c 23-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Increase mode update timeout.

During camera startup, it might take a few hundred milliseconds before
requests start to be dequeued by the HAL. Increase the timeout for
synchronizing mode changes and triggers so that triggers near startup
don't time out.

Bug: 6970465
Change-Id: I9dc35378e8018ec18ae31be874fcb094f8a9a0e9
amera2Client.cpp
43b7ac6bd1a949ecb8ffc7e50d0a2f01a6258034 23-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Increase mode update timeout.

During camera startup, it might take a few hundred milliseconds before
requests start to be dequeued by the HAL. Increase the timeout for
synchronizing mode changes and triggers so that triggers near startup
don't time out.

Bug: 6970465
Change-Id: I9dc35378e8018ec18ae31be874fcb094f8a9a0e9
amera2Client.cpp
b411ab3d7dbd6da7ec153fc7ed6bfe90bc21523b 20-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am e50ba28a: am 9e760d66: Merge "Camera2: Fix potential deadlock" into jb-mr1-dev

* commit 'e50ba28aa1846a7c2a296f122a5675476dacc4a5':
Camera2: Fix potential deadlock
cffeb15b9bf85657a2b03398cac3e3085cfdbdb2 20-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am e50ba28a: am 9e760d66: Merge "Camera2: Fix potential deadlock" into jb-mr1-dev

* commit 'e50ba28aa1846a7c2a296f122a5675476dacc4a5':
Camera2: Fix potential deadlock
c0fdb98b87bdd88c643a630e18838ddcdd5ab964 18-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix potential deadlock

setPreviewWindow was holding a lock during long-lasting HAL calls
which may cause deadlock if the HAL calls back into the service during
the call. Stop holding the lock during these calls, since it's not
essential to do so.

Bug: 7320517
Change-Id: I4a35703d751e22ac32979b5a1288e291610576e7
amera2Client.cpp
f1945f0435e431fab2e6b83337a1ffe71a8df28c 18-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix potential deadlock

setPreviewWindow was holding a lock during long-lasting HAL calls
which may cause deadlock if the HAL calls back into the service during
the call. Stop holding the lock during these calls, since it's not
essential to do so.

Bug: 7320517
Change-Id: I4a35703d751e22ac32979b5a1288e291610576e7
amera2Client.cpp
1d98d9b28397ebe33434f4c14fe5f08c7295607b 17-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am ed653a35: am ecfbc952: Merge "Camera2: Improve quirks focusing behavior." into jb-mr1-dev

* commit 'ed653a35784969b7d36e8b36bd421e2a54def0de':
Camera2: Improve quirks focusing behavior.
db2c9afc763d40e699ba93c8a495783f2372ad66 17-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am ed653a35: am ecfbc952: Merge "Camera2: Improve quirks focusing behavior." into jb-mr1-dev

* commit 'ed653a35784969b7d36e8b36bd421e2a54def0de':
Camera2: Improve quirks focusing behavior.
65dc3fc6fd708350c8d984736da5a2a0b72c5324 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Improve quirks focusing behavior.

- When scene mode is set and the AF quirk is in use, don't change AF
mode and then cancel when AF cancel is received. Just change mode
since that also implies a cancel.

- Only trigger quirks switch when a focusing area is set.

Bug: 7318812
Change-Id: I28d8755553bd78052e774701210cb94d84ee2046
amera2Client.cpp
amera2/Parameters.h
ac0cd56627b121081308213d5a327cfbae410f4d 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Improve quirks focusing behavior.

- When scene mode is set and the AF quirk is in use, don't change AF
mode and then cancel when AF cancel is received. Just change mode
since that also implies a cancel.

- Only trigger quirks switch when a focusing area is set.

Bug: 7318812
Change-Id: I28d8755553bd78052e774701210cb94d84ee2046
amera2Client.cpp
amera2/Parameters.h
a15809ee0dbfd82afd28c4ea2014f682934857b1 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 74a7bcc0: am 54717320: Camera2: Don\'t touch frame counter on output frames.

* commit '74a7bcc052d9bdd0f555e9be6f5ecaf92c6b22d8':
Camera2: Don't touch frame counter on output frames.
697d2c4aa17c95051d8b14738856334db37ee1c9 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 74a7bcc0: am 54717320: Camera2: Don\'t touch frame counter on output frames.

* commit '74a7bcc052d9bdd0f555e9be6f5ecaf92c6b22d8':
Camera2: Don't touch frame counter on output frames.
77bc9b970c7c09298021026e2170ee280d3a3e83 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 522fa119: am d6cc4a62: Camera2: When focus is already locked in CAF mode, do not trigger HAL.

* commit '522fa119fe2745cd950b6216ad6b49587372b7b3':
Camera2: When focus is already locked in CAF mode, do not trigger HAL.
5120e1f0c7fd1e524407895ba624ea39dc559f9d 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 522fa119: am d6cc4a62: Camera2: When focus is already locked in CAF mode, do not trigger HAL.

* commit '522fa119fe2745cd950b6216ad6b49587372b7b3':
Camera2: When focus is already locked in CAF mode, do not trigger HAL.
fbd60660780839a15db9f1c78c5feecd6ba6ed09 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't touch frame counter on output frames.

Bug: 7357069
Change-Id: I9cd0cdcc23959bfecced5f47bb9e8c59c997dade
amera2Device.h
547173205b3fd909dd72b597f6372840c38460e4 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't touch frame counter on output frames.

Bug: 7357069
Change-Id: I9cd0cdcc23959bfecced5f47bb9e8c59c997dade
amera2Device.h
f1a6e0d28abdd0fcf9d35ecf53d7497f573f6113 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: When focus is already locked in CAF mode, do not trigger HAL.

In HAL2 CAF modes, once focus is locked by an AF trigger, additional
triggers will not cause AF notifications, since the state will not
change again until a cancelAutofocus call.

Since the old API still expects to see a notification, short-circuit
this at the service and send an immediate success notification.

Bug: 7318298
Change-Id: Ib209a24eaf2a35a247d06aea671efe80a33d751e
amera2Client.cpp
amera2/Parameters.cpp
amera2/Parameters.h
d6cc4a62f3d94cad4dd36bd0a844ba8764177d26 16-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: When focus is already locked in CAF mode, do not trigger HAL.

In HAL2 CAF modes, once focus is locked by an AF trigger, additional
triggers will not cause AF notifications, since the state will not
change again until a cancelAutofocus call.

Since the old API still expects to see a notification, short-circuit
this at the service and send an immediate success notification.

Bug: 7318298
Change-Id: Ib209a24eaf2a35a247d06aea671efe80a33d751e
amera2Client.cpp
amera2/Parameters.cpp
amera2/Parameters.h
60d87c5af8e4bfe07b3bba3d6036dd6321eb9bf1 11-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am cb3911d3: am a14be593: Camera2: Don\'t error out of startPreview when already recording.

* commit 'cb3911d30c515e06fbea0000af02fa3d09688943':
Camera2: Don't error out of startPreview when already recording.
5f62bd6335cd45260e26a4dae26b307c3b672f1f 11-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am cb3911d3: am a14be593: Camera2: Don\'t error out of startPreview when already recording.

* commit 'cb3911d30c515e06fbea0000af02fa3d09688943':
Camera2: Don't error out of startPreview when already recording.
142dbcfe437524bc0e8d546d2d43cab2a3ea625b 11-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am f5230955: am 907e5651: Camera2: Don\'t let unlocks happen during recording.

* commit 'f52309555013e9909b248374f96d22dae29f6454':
Camera2: Don't let unlocks happen during recording.
31fb725372f2f62a234c4f43c66504dddeaf3c8f 11-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am f5230955: am 907e5651: Camera2: Don\'t let unlocks happen during recording.

* commit 'f52309555013e9909b248374f96d22dae29f6454':
Camera2: Don't let unlocks happen during recording.
411ddcc42a17abf4173345a992e4cd6575751739 11-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't error out of startPreview when already recording.

Bug: 7327474
Change-Id: I603da5b8bd58e5a700d7ae0b3d34bd89bbcb1d53
amera2Client.cpp
a14be59340219c47639ec77a352d2af362551a6f 11-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't error out of startPreview when already recording.

Bug: 7327474
Change-Id: I603da5b8bd58e5a700d7ae0b3d34bd89bbcb1d53
amera2Client.cpp
cfee40e0d30aa2d93df2c4633e7573165f0d7337 11-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't let unlocks happen during recording.

Bug: 7309020
Change-Id: I6e66809b868d2e8f47f71e6f8752b44ec06dfb17
amera2Client.cpp
907e5651c18d0e25073743a49a685fe1a385939a 11-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't let unlocks happen during recording.

Bug: 7309020
Change-Id: I6e66809b868d2e8f47f71e6f8752b44ec06dfb17
amera2Client.cpp
e6ff6cd2fe5c897803d8dfc2d575c24db38acd88 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 6f846139: am 55f6c9df: Camera2: Do not set auto-white-balance regions from metering regions.

* commit '6f846139d97ad6cccdd2f243ccf3a19036ad12c7':
Camera2: Do not set auto-white-balance regions from metering regions.
4c510b9209f7f75520fd2d62657f08192cc49a51 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 6f846139: am 55f6c9df: Camera2: Do not set auto-white-balance regions from metering regions.

* commit '6f846139d97ad6cccdd2f243ccf3a19036ad12c7':
Camera2: Do not set auto-white-balance regions from metering regions.
4e5e64e76a5db351b852109dd288953a4eaaad38 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am e44d7f83: am c0379204: Camera: Limit valid caller PIDs for camera clients.

* commit 'e44d7f83a4d04b90417684d74f18ad8c703b981a':
Camera: Limit valid caller PIDs for camera clients.
3a8850848f4887105338e3e0e3bb2466fc445d2d 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am e44d7f83: am c0379204: Camera: Limit valid caller PIDs for camera clients.

* commit 'e44d7f83a4d04b90417684d74f18ad8c703b981a':
Camera: Limit valid caller PIDs for camera clients.
1bf2809d3fd3890a782869a041b70b8e595ecdb6 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Do not set auto-white-balance regions from metering regions.

Per API documentation, metering regions are only for AE, not also for AWB.

Bug: 7312720
Change-Id: I39bcf33e4c81e80022f45e8fca77ea6cf9ba115e
amera2/Parameters.cpp
55f6c9dfd713776e251655b3ddd496b17df0926e 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Do not set auto-white-balance regions from metering regions.

Per API documentation, metering regions are only for AE, not also for AWB.

Bug: 7312720
Change-Id: I39bcf33e4c81e80022f45e8fca77ea6cf9ba115e
amera2/Parameters.cpp
617048834dc5b2cb87ab208bdd526262a7c4e90c 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera: Limit valid caller PIDs for camera clients.

Narrow down on PID checks to avoid cases where service can access the
camera even though it shouldn't be able to, per API semantics.

Bug: 6970469

Change-Id: Ic468a31949c28ef978b6ed48a70e4601c7ced684
amera2Client.cpp
ameraClient.cpp
c03792041b9dd6f7f54abd6c82bd6c755a336cd8 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera: Limit valid caller PIDs for camera clients.

Narrow down on PID checks to avoid cases where service can access the
camera even though it shouldn't be able to, per API semantics.

Bug: 6970469

Change-Id: Ic468a31949c28ef978b6ed48a70e4601c7ced684
amera2Client.cpp
ameraClient.cpp
b01ba8ff3cceee0f6573f18e5d1cd9535069c395 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 4c7b3129: am 2b0db6ae: Merge "Camera: Clear Hardware device pointer when initialization fails" into jb-mr1-dev

* commit '4c7b312964b2430ccc1f99e99092cc870be2a293':
Camera: Clear Hardware device pointer when initialization fails
9f43843a364a70940b6e76edcb2eec702a4c2d84 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 4c7b3129: am 2b0db6ae: Merge "Camera: Clear Hardware device pointer when initialization fails" into jb-mr1-dev

* commit '4c7b312964b2430ccc1f99e99092cc870be2a293':
Camera: Clear Hardware device pointer when initialization fails
af5041cca803f4e7f0d2dfeca596abb8bda313b6 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Clear Hardware device pointer when initialization fails" into jb-mr1-dev
2b0db6aea3be519334f340ca97581db902196690 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera: Clear Hardware device pointer when initialization fails" into jb-mr1-dev
ffbbacb85b5236d256aae6ad43ae42f4eea6e4ce 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 754cbdd2: am dca0ac21: Merge "Camera2: Fix uninitialized parameters." into jb-mr1-dev

* commit '754cbdd2dd3376bb2b55d762c2909f816bd768cc':
Camera2: Fix uninitialized parameters.
dfe31723835f5006d394c9ebf2a6ac900d3acf9f 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 754cbdd2: am dca0ac21: Merge "Camera2: Fix uninitialized parameters." into jb-mr1-dev

* commit '754cbdd2dd3376bb2b55d762c2909f816bd768cc':
Camera2: Fix uninitialized parameters.
a70995f9dec3c2915792113c9c228b5b6474a915 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Fix uninitialized parameters." into jb-mr1-dev
dca0ac2193e87c57d871dd208073107408c13c0a 10-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Fix uninitialized parameters." into jb-mr1-dev
d230cc783aa13de5c563adec54641bec6a355054 09-Oct-2012 Igor Murashkin <iam@google.com> Camera: Clear Hardware device pointer when initialization fails

When disconnecting, don't try to call device functions if the initialization
fails since this can lead to internal HAL segfaults.

Bug: 7317107
Change-Id: Ib65db7eb6556ee10d844959934b1bfd7bb08d0ff
ameraClient.cpp
44f120fa169cb3131ec853c638ea9c88a9b33b97 09-Oct-2012 Igor Murashkin <iam@google.com> Camera: Clear Hardware device pointer when initialization fails

When disconnecting, don't try to call device functions if the initialization
fails since this can lead to internal HAL segfaults.

Bug: 7317107
Change-Id: Ib65db7eb6556ee10d844959934b1bfd7bb08d0ff
ameraClient.cpp
efc04db5b3751ae02d74c104a0f31b2a88dfcf7a 09-Oct-2012 Igor Murashkin <iam@google.com> am e4664bb0: am 3d84d38e: Merge "Camera2: Call onAutoFocus immediately for fixed-focus cameras" into jb-mr1-dev

* commit 'e4664bb098a9b7d6ae1a93486456eff71eaae1bf':
Camera2: Call onAutoFocus immediately for fixed-focus cameras
151f6cd670a20cd0ccdb7a5e4a7531680c4e4dd7 09-Oct-2012 Igor Murashkin <iam@google.com> am e4664bb0: am 3d84d38e: Merge "Camera2: Call onAutoFocus immediately for fixed-focus cameras" into jb-mr1-dev

* commit 'e4664bb098a9b7d6ae1a93486456eff71eaae1bf':
Camera2: Call onAutoFocus immediately for fixed-focus cameras
9436ff8d852306fb1160170b1cb8613d840df637 09-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Call onAutoFocus immediately for fixed-focus cameras" into jb-mr1-dev
3d84d38e7ac02b47d17f4bb272f18f8b0e873104 09-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Call onAutoFocus immediately for fixed-focus cameras" into jb-mr1-dev
4cc45fa65659ff8771a185e4f4584a9b0da10247 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix uninitialized parameters.

Some parameters were not being set to default values, causing strange
flakiness in any app that wasn't calling setParameters. This includes
many CTS tests.

Bug: 6970468
Change-Id: If91635afc000e23862e7b039292a55349274c5ee
amera2/Parameters.cpp
a3ee047fd8e2a63253f70346925c3ffd069dfc99 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix uninitialized parameters.

Some parameters were not being set to default values, causing strange
flakiness in any app that wasn't calling setParameters. This includes
many CTS tests.

Bug: 6970468
Change-Id: If91635afc000e23862e7b039292a55349274c5ee
amera2/Parameters.cpp
88c6afe3612b808629d58ba10eacf7552a8699b9 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 240a538b: am d016cf5b: Merge "Camera2: Move non-ZSL shutter sound firing to be later." into jb-mr1-dev

* commit '240a538b59b905b68d46e39d79c8d48d1662161c':
Camera2: Move non-ZSL shutter sound firing to be later.
5fa8add64b7f7614c288a9e3b790ab7bfc7858b5 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 240a538b: am d016cf5b: Merge "Camera2: Move non-ZSL shutter sound firing to be later." into jb-mr1-dev

* commit '240a538b59b905b68d46e39d79c8d48d1662161c':
Camera2: Move non-ZSL shutter sound firing to be later.
c8d9bc29aaede1f104c6faed095a4c636bbe5748 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Move non-ZSL shutter sound firing to be later." into jb-mr1-dev
d016cf5b12cb73bd49bcecb0d5a4958df23620c3 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Move non-ZSL shutter sound firing to be later." into jb-mr1-dev
5b44beef5a4ff04889bcdd874dc4e8d140f3edac 09-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Call onAutoFocus immediately for fixed-focus cameras

Bug: 7311578
Change-Id: Ib8a8ea1f5fc269abdd24ed1e0370dc9b87b284ee
amera2Client.cpp
5f0714eb039c07554bef6ec289c70ed1164fdf52 09-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Call onAutoFocus immediately for fixed-focus cameras

Bug: 7311578
Change-Id: Ib8a8ea1f5fc269abdd24ed1e0370dc9b87b284ee
amera2Client.cpp
5ba6b98cac148e0e5d114ae26127e9189fe6262e 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 843aba43: am 2458d482: Merge "Camera2: Always disconnect in the client destructor" into jb-mr1-dev

* commit '843aba43ef85f5a40db03e0f384ed096b03592d0':
Camera2: Always disconnect in the client destructor
03d630b6360aada1df89bd0d4a81eefe145f5514 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 843aba43: am 2458d482: Merge "Camera2: Always disconnect in the client destructor" into jb-mr1-dev

* commit '843aba43ef85f5a40db03e0f384ed096b03592d0':
Camera2: Always disconnect in the client destructor
19caf26b1ab1619020aa417d7913c11fd1d5590d 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Always disconnect in the client destructor" into jb-mr1-dev
2458d482c4822c6f9e6274f5bd12b6aea095a9cd 09-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Always disconnect in the client destructor" into jb-mr1-dev
ad21da9c2b575eddc0d11b789bb577985a0bf50b 08-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move non-ZSL shutter sound firing to be later.

Instead of firing shutter sound when capture request is submitted for
non-ZSL captures, fire it when the metadata frame is received. This
guarantees that the shutter sound fires after picture capture is
completed by the sensor.

Bug: 7259900
Change-Id: I4a1eeed89ed0400bf80b0f0cc2d5799c3d9bb9e3
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
1e6ccd5c78016ac9f9247cb8337cf263b3afb73e 08-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move non-ZSL shutter sound firing to be later.

Instead of firing shutter sound when capture request is submitted for
non-ZSL captures, fire it when the metadata frame is received. This
guarantees that the shutter sound fires after picture capture is
completed by the sensor.

Bug: 7259900
Change-Id: I4a1eeed89ed0400bf80b0f0cc2d5799c3d9bb9e3
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
245b812096e7af209025b8f50a0519e54f040112 09-Oct-2012 Igor Murashkin <iam@google.com> am 4a4253b9: am 82edd543: Camera2: isSmoothZoomSupported should return FALSE

* commit '4a4253b979586c9de21425f5e3cb34da9f1e57de':
Camera2: isSmoothZoomSupported should return FALSE
cf6eb207f21a3cbf4da91273c16c5dab04b2d824 09-Oct-2012 Igor Murashkin <iam@google.com> am 4a4253b9: am 82edd543: Camera2: isSmoothZoomSupported should return FALSE

* commit '4a4253b979586c9de21425f5e3cb34da9f1e57de':
Camera2: isSmoothZoomSupported should return FALSE
a374b0507be31317042e096b186ec62295262a0d 09-Oct-2012 Alex Ray <aray@google.com> am 9ea63b3b: am 6f854608: Camera2: Set default flash mode to FLASH_OFF

* commit '9ea63b3bfd696bcce9cb28e86218a3449dd699d8':
Camera2: Set default flash mode to FLASH_OFF
390bb827d50a1ba0d7df8e9f15eaebcb56e99b3c 09-Oct-2012 Alex Ray <aray@google.com> am 9ea63b3b: am 6f854608: Camera2: Set default flash mode to FLASH_OFF

* commit '9ea63b3bfd696bcce9cb28e86218a3449dd699d8':
Camera2: Set default flash mode to FLASH_OFF
be8d28a12e8d08531c6053bcf8ad1183c2f6e6d3 09-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Always disconnect in the client destructor

If Camera2Client failed to initialize, it would skip disconnect step,
and thus the camera would be forever marked as busy. By always calling
disconnect it will always call free.

It also adds a new guarantee that Client::disconnect is idempotent

Bug: 7298182
Change-Id: Ic9876f1665b7d9b3c0da692880f63f165e3f4fa5
ameraService.cpp
036bc3e2cfc5a11c3f7ace41088c8936dae2e946 09-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Always disconnect in the client destructor

If Camera2Client failed to initialize, it would skip disconnect step,
and thus the camera would be forever marked as busy. By always calling
disconnect it will always call free.

It also adds a new guarantee that Client::disconnect is idempotent

Bug: 7298182
Change-Id: Ic9876f1665b7d9b3c0da692880f63f165e3f4fa5
ameraService.cpp
0ad293aac9af377606fb4aa752b95547a8462791 08-Oct-2012 Igor Murashkin <iam@google.com> Camera2: isSmoothZoomSupported should return FALSE

Bug: 7308024
Change-Id: Ib757bef8f6dc203f8dfa6ea6d11191e3c7cfcc6d
amera2/Parameters.cpp
82edd5431951f461058c07b73c0dbc093aa45c99 08-Oct-2012 Igor Murashkin <iam@google.com> Camera2: isSmoothZoomSupported should return FALSE

Bug: 7308024
Change-Id: Ib757bef8f6dc203f8dfa6ea6d11191e3c7cfcc6d
amera2/Parameters.cpp
2814a4dc0dd45007ce62871af08b98214cd1692c 08-Oct-2012 Alex Ray <aray@google.com> Camera2: Set default flash mode to FLASH_OFF

Bug: 6970090
Change-Id: I904b1be2ee0710e82e8e647753a705184c10b46c
amera2/Parameters.cpp
6f854608d26d7abcce5e46396c7260ed7b250653 08-Oct-2012 Alex Ray <aray@google.com> Camera2: Set default flash mode to FLASH_OFF

Bug: 6970090
Change-Id: I904b1be2ee0710e82e8e647753a705184c10b46c
amera2/Parameters.cpp
a476c9e2d59048928ce50d273a8b31e723fcc492 08-Oct-2012 Igor Murashkin <iam@google.com> am a761686d: am 4c9aeb21: Merge "Camera2: Fix Parameters#setZoom off by 1 validation error" into jb-mr1-dev

* commit 'a761686d14ff8abd704a4802ca6ea0b801a9a32d':
Camera2: Fix Parameters#setZoom off by 1 validation error
957126db7a5cec33a6ab113151ebc54d4dfd865b 08-Oct-2012 Igor Murashkin <iam@google.com> am a761686d: am 4c9aeb21: Merge "Camera2: Fix Parameters#setZoom off by 1 validation error" into jb-mr1-dev

* commit 'a761686d14ff8abd704a4802ca6ea0b801a9a32d':
Camera2: Fix Parameters#setZoom off by 1 validation error
07cc78fe7dee9a96cd33865de890d0890fe752d7 08-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Fix Parameters#setZoom off by 1 validation error" into jb-mr1-dev
4c9aeb21051e908b0a0a0864a04a96a4109717a1 08-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Fix Parameters#setZoom off by 1 validation error" into jb-mr1-dev
30ae899f684e0ddc31576ed67bf5ef41eaffd01f 08-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am c7ee4fda: am b8f0090a: Merge "Camera2: On stopping preview, wait until captures are completed." into jb-mr1-dev

* commit 'c7ee4fda96539815e877cf035c9984f6009c4875':
Camera2: On stopping preview, wait until captures are completed.
5db1d00d66cc2b620b469326ec5c7cffb7ea77a2 08-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am c7ee4fda: am b8f0090a: Merge "Camera2: On stopping preview, wait until captures are completed." into jb-mr1-dev

* commit 'c7ee4fda96539815e877cf035c9984f6009c4875':
Camera2: On stopping preview, wait until captures are completed.
8ada0bf772354a1d31361d3b4f49efd36d8a6e6e 08-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: On stopping preview, wait until captures are completed." into jb-mr1-dev
b8f0090af19b95027d2e08667c662d058832f94b 08-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: On stopping preview, wait until captures are completed." into jb-mr1-dev
cfdd84284394cecdb33cf121fe6d4205da84c761 08-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Fix Parameters#setZoom off by 1 validation error

Bug: 7298683
Change-Id: If79ac6396379593eb852f041ca7d5a20ad2f9e6d
amera2/Parameters.cpp
709bc10c04a9b62875b1c7f1f69486cf275338ba 08-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Fix Parameters#setZoom off by 1 validation error

Bug: 7298683
Change-Id: If79ac6396379593eb852f041ca7d5a20ad2f9e6d
amera2/Parameters.cpp
00614a72a47a0a34ad0c6f17d9442332b431ae77 08-Oct-2012 Igor Murashkin <iam@google.com> am 97f00a6b: am e18c1cce: Merge "Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras" into jb-mr1-dev

* commit '97f00a6b6cde4837e0ab3751d7cfd2921c11f9b4':
Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras
47f97033850ae8540fc389c9bf253e2ebe9b314e 08-Oct-2012 Igor Murashkin <iam@google.com> am 97f00a6b: am e18c1cce: Merge "Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras" into jb-mr1-dev

* commit '97f00a6b6cde4837e0ab3751d7cfd2921c11f9b4':
Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras
193c13fa1615ad5130b6d75dc05e50468e1c585c 08-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras" into jb-mr1-dev
e18c1cce29dde2054ce52b9135b152901883ca91 08-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras" into jb-mr1-dev
e049384cdd0f728c45955d65cae754c46aac18cf 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: On stopping preview, wait until captures are completed.

If preview is stopped while a still capture or a video snapshot is
underway, wait until the capture completes before stopping preview.

Also use the same behavior for disconnect - do not shut down the
camera device until captures are complete.

This works around HAL implementations which report to be done
(get_in_progress_count returns 0) even when a capture is still
outstanding.

Bug: 7276954

Change-Id: I66290acf1740cc330eadecbcded0c59fa9c5d2fd
amera2Client.cpp
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
amera2/JpegProcessor.cpp
d5087f91357a9218580596b466926ab750bc8ea7 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: On stopping preview, wait until captures are completed.

If preview is stopped while a still capture or a video snapshot is
underway, wait until the capture completes before stopping preview.

Also use the same behavior for disconnect - do not shut down the
camera device until captures are complete.

This works around HAL implementations which report to be done
(get_in_progress_count returns 0) even when a capture is still
outstanding.

Bug: 7276954

Change-Id: I66290acf1740cc330eadecbcded0c59fa9c5d2fd
amera2Client.cpp
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
amera2/JpegProcessor.cpp
5b9c992c7128bf857e82d42ac8027285ad86b1e0 07-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 3576742a: am 4d410ede: Camera2: Fix off-by-one error in ZSL selection.

* commit '3576742a2bb3dc10bf8256579d600d85f17c3835':
Camera2: Fix off-by-one error in ZSL selection.
400011b9785ca2a92be116736a80cbc170d62f4c 07-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 3576742a: am 4d410ede: Camera2: Fix off-by-one error in ZSL selection.

* commit '3576742a2bb3dc10bf8256579d600d85f17c3835':
Camera2: Fix off-by-one error in ZSL selection.
3d33019b95439ba8cc062633168ec8fe51ef6ad4 06-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix off-by-one error in ZSL selection.

Bug: 7258126
Change-Id: Ie6da4645c46a7bb0dbd11d7c6183e904f41f74fd
amera2/ZslProcessor.cpp
4d410ede659448557398c84552eb0bf50ef09cbc 06-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix off-by-one error in ZSL selection.

Bug: 7258126
Change-Id: Ie6da4645c46a7bb0dbd11d7c6183e904f41f74fd
amera2/ZslProcessor.cpp
056a76e1b9275833ec8134a5ff56a4489e86d952 06-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 4d85afad: am f6e09d20: Camera2: Unconditionally shut down streams on disconnect.

* commit '4d85afad335ded1019ec7697b9f37241a839efa1':
Camera2: Unconditionally shut down streams on disconnect.
3b23853ad7e0d4f1203071beaadb12deafaf2096 06-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 4d85afad: am f6e09d20: Camera2: Unconditionally shut down streams on disconnect.

* commit '4d85afad335ded1019ec7697b9f37241a839efa1':
Camera2: Unconditionally shut down streams on disconnect.
572bf9a00204ac91de8c5347d793891c6a4bf1d7 06-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras

Bug: 7298805
Change-Id: I7499b80a9416bf454c8ea80c31ea4fdd3c4ee2d7
amera2/Parameters.cpp
amera2/Parameters.h
7d2a4aaaf5691ee523fc0d03c286620f392ed16f 06-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Report getMaxNumFocusAreas 0 for fixed focus cameras

Bug: 7298805
Change-Id: I7499b80a9416bf454c8ea80c31ea4fdd3c4ee2d7
amera2/Parameters.cpp
amera2/Parameters.h
3dcdc3d056c8756d690a6fa719d50aae2e4299d4 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Unconditionally shut down streams on disconnect.

stopPreviewL may do nothing in certain states. Stop streams directly
to avoid those failures, so that we always maintain the HAL interface
invariant that streams referenced by in-flight requests are never
deleted.

Bug: 7276954
Change-Id: Ic4cffc43036f4944684d941981a43d6dd1dce7af
amera2Client.cpp
f6e09d200c3e043737adcdadd52310ebbd1b19da 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Unconditionally shut down streams on disconnect.

stopPreviewL may do nothing in certain states. Stop streams directly
to avoid those failures, so that we always maintain the HAL interface
invariant that streams referenced by in-flight requests are never
deleted.

Bug: 7276954
Change-Id: Ic4cffc43036f4944684d941981a43d6dd1dce7af
amera2Client.cpp
649254536988be71fd77e7b98782d7d26843344f 05-Oct-2012 Igor Murashkin <iam@google.com> am de434d89: am 7373cbe8: Camera2: Fix metering regions to take into account the current zoom/crop region

* commit 'de434d8969bd02ffd7cdfdd39577dd59f6a71e9d':
Camera2: Fix metering regions to take into account the current zoom/crop region
50f15231529ba953396d77d12f9b2cdc39f48e85 05-Oct-2012 Igor Murashkin <iam@google.com> am de434d89: am 7373cbe8: Camera2: Fix metering regions to take into account the current zoom/crop region

* commit 'de434d8969bd02ffd7cdfdd39577dd59f6a71e9d':
Camera2: Fix metering regions to take into account the current zoom/crop region
3a6e45320685b36bb266bbf8fa548f4474d90d6c 29-Sep-2012 Igor Murashkin <iam@google.com> Camera2: Fix metering regions to take into account the current zoom/crop region

Also adds a quirk to disable this fix to work around for incompliant HALs

Bug: 7246065
Change-Id: I80bad25e56ba59149270238e5639bb33cae495ae
amera2Client.cpp
amera2/Parameters.cpp
amera2/Parameters.h
7373cbe85e617345f7002256a4be389fe62af913 29-Sep-2012 Igor Murashkin <iam@google.com> Camera2: Fix metering regions to take into account the current zoom/crop region

Also adds a quirk to disable this fix to work around for incompliant HALs

Bug: 7246065
Change-Id: I80bad25e56ba59149270238e5639bb33cae495ae
amera2Client.cpp
amera2/Parameters.cpp
amera2/Parameters.h
970fb1e0b4eb08ae825047b9b2100e7db9341b4f 05-Oct-2012 Igor Murashkin <iam@google.com> am 9be4d65d: am af3d2887: Camera2: Change policy for calculating previewFpsRange from previewFps

* commit '9be4d65d73bb8db98bf1f53e8c47ff3e3546a144':
Camera2: Change policy for calculating previewFpsRange from previewFps
4c6739026ece4779f168027d2818a575d8896374 05-Oct-2012 Igor Murashkin <iam@google.com> am 9be4d65d: am af3d2887: Camera2: Change policy for calculating previewFpsRange from previewFps

* commit '9be4d65d73bb8db98bf1f53e8c47ff3e3546a144':
Camera2: Change policy for calculating previewFpsRange from previewFps
63dc19921f2770f07bf976bb7573a1133d6548f9 04-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Change policy for calculating previewFpsRange from previewFps

Bug: 7259959
Change-Id: I759a559d7115201264f88db1f23edc2d6aef6c43
amera2/Parameters.cpp
amera2/Parameters.h
af3d28870f7890370d6acb21d20cf1ccab4b9e08 04-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Change policy for calculating previewFpsRange from previewFps

Bug: 7259959
Change-Id: I759a559d7115201264f88db1f23edc2d6aef6c43
amera2/Parameters.cpp
amera2/Parameters.h
ccd9808cec4b17ee37be0173e35fbc3d9caf2718 05-Oct-2012 Igor Murashkin <iam@google.com> am 7ca6460d: am becb0bc4: Merge "Camera2: Don\'t promote weak IBinder ptrs to strong ones" into jb-mr1-dev

* commit '7ca6460d06144d76460c8d43128bd338839d9501':
Camera2: Don't promote weak IBinder ptrs to strong ones
9b29c2ca7cf5d5390b74121e2829d97090a07afa 05-Oct-2012 Igor Murashkin <iam@google.com> am 7ca6460d: am becb0bc4: Merge "Camera2: Don\'t promote weak IBinder ptrs to strong ones" into jb-mr1-dev

* commit '7ca6460d06144d76460c8d43128bd338839d9501':
Camera2: Don't promote weak IBinder ptrs to strong ones
0feea710e236ad90eea73110414ea5d3555fcdfd 05-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Don't promote weak IBinder ptrs to strong ones" into jb-mr1-dev
becb0bc4b620dcd88b559d821e40a9ca7ced5604 05-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Don't promote weak IBinder ptrs to strong ones" into jb-mr1-dev
cc1abea590b8d3f9b9707b3442aea02cd2b4fcef 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am e5f4024b: am 95069fef: Camera2: Use the triggerAfWithAuto quirk

* commit 'e5f4024bad9875e96cefbe3fe81172d166d52154':
Camera2: Use the triggerAfWithAuto quirk
a148eabd26157cdd68035734b52f837c305c8a36 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am e5f4024b: am 95069fef: Camera2: Use the triggerAfWithAuto quirk

* commit 'e5f4024bad9875e96cefbe3fe81172d166d52154':
Camera2: Use the triggerAfWithAuto quirk
3b716883db5fb5e2cae20ad4c3f1c6ff445a7371 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 577ac8a7: am 4865c526: Camera2: Synchronize mode changes and triggers

* commit '577ac8a74e8af7fcc7bc714874b8da21f57989b5':
Camera2: Synchronize mode changes and triggers
16e0e1f5568cb530416641f28835adf21f0ec88b 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 577ac8a7: am 4865c526: Camera2: Synchronize mode changes and triggers

* commit '577ac8a74e8af7fcc7bc714874b8da21f57989b5':
Camera2: Synchronize mode changes and triggers
507994d0312f89127562a1401f118439f810e751 05-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Don't promote weak IBinder ptrs to strong ones

The Binder driver does not support promoting weak pointers into strong
pointers. Occassionally the system would lock up when trying to do this
(when closing the camera app).

Bug: 7289040
Change-Id: I8bc0b5c48616bf0b7f4eed1878ad4994ee635871
ameraService.cpp
ameraService.h
294d0eca9eabfaa3ef0ee8bee7ccf3eaaa925e41 05-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Don't promote weak IBinder ptrs to strong ones

The Binder driver does not support promoting weak pointers into strong
pointers. Occassionally the system would lock up when trying to do this
(when closing the camera app).

Bug: 7289040
Change-Id: I8bc0b5c48616bf0b7f4eed1878ad4994ee635871
ameraService.cpp
ameraService.h
4bfc4a67d4f7d5a9b6cbe5a39d4b599e8ceb505b 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am e68eb9b8: am 9942f62d: Merge "Camera2: Include JPEG settings in ZSL requests." into jb-mr1-dev

* commit 'e68eb9b82d0371324add708e2b2eb45a99ddbd70':
Camera2: Include JPEG settings in ZSL requests.
14c2d2404a800ecbe9f2bd8433584c4a00f0d9e8 05-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am e68eb9b8: am 9942f62d: Merge "Camera2: Include JPEG settings in ZSL requests." into jb-mr1-dev

* commit 'e68eb9b82d0371324add708e2b2eb45a99ddbd70':
Camera2: Include JPEG settings in ZSL requests.
4c843702c7c2d2ca951e25bc54787c68c2071a8b 04-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use the triggerAfWithAuto quirk

When this quirk is set, and a scene mode is enabled, do AF calls with
AF mode AUTO instead of whatever the scene more override AF mode is.

Bug: 7159577
Change-Id: I3ea6b8386abc0968047fc9bba3a35c5db5bdcfd3
amera2Client.cpp
amera2/Parameters.cpp
amera2/Parameters.h
95069fefbdf54d87a624c2ac73727fce1c38545e 04-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use the triggerAfWithAuto quirk

When this quirk is set, and a scene mode is enabled, do AF calls with
AF mode AUTO instead of whatever the scene more override AF mode is.

Bug: 7159577
Change-Id: I3ea6b8386abc0968047fc9bba3a35c5db5bdcfd3
amera2Client.cpp
amera2/Parameters.cpp
amera2/Parameters.h
4c9eb718352697cd75269752344c0bcc6b05e708 02-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Synchronize mode changes and triggers

Make sure that changes to various parameters have reached the HAL
before triggering asynchronous events like autofocus or precapture
metering.

Bug: 7107220
Change-Id: I3c50038de1671968eb32004ce538435121934e7e
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
amera2/FrameProcessor.cpp
amera2/FrameProcessor.h
amera2/StreamingProcessor.cpp
amera2/StreamingProcessor.h
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
4865c526e681366481b0ab242ffa1ead57bb02cc 02-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Synchronize mode changes and triggers

Make sure that changes to various parameters have reached the HAL
before triggering asynchronous events like autofocus or precapture
metering.

Bug: 7107220
Change-Id: I3c50038de1671968eb32004ce538435121934e7e
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
amera2/FrameProcessor.cpp
amera2/FrameProcessor.h
amera2/StreamingProcessor.cpp
amera2/StreamingProcessor.h
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
db30e68be637ca85da238c1e8e3534ec07919985 04-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Include JPEG settings in ZSL requests.

Bug: 7287743
Change-Id: I1aba81b228451c3df712ce1f42b7aab79cac575f
amera2/CaptureSequencer.cpp
amera2/Parameters.cpp
amera2/Parameters.h
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
ec7710898208162576c3242f5a590651ab42aa2d 04-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Include JPEG settings in ZSL requests.

Bug: 7287743
Change-Id: I1aba81b228451c3df712ce1f42b7aab79cac575f
amera2/CaptureSequencer.cpp
amera2/Parameters.cpp
amera2/Parameters.h
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
08102ee8425e39282893c2e84d2914e867124310 04-Oct-2012 Igor Murashkin <iam@google.com> am d6e8c5b1: am f66cc52c: Merge "Camera2: Fix deadlock while zooming during record" into jb-mr1-dev

* commit 'd6e8c5b187225c55a279bc40f262fe137f2ef508':
Camera2: Fix deadlock while zooming during record
e50eb89bad3cb457ed7930225c47c6c4cb8534f5 04-Oct-2012 Igor Murashkin <iam@google.com> am d6e8c5b1: am f66cc52c: Merge "Camera2: Fix deadlock while zooming during record" into jb-mr1-dev

* commit 'd6e8c5b187225c55a279bc40f262fe137f2ef508':
Camera2: Fix deadlock while zooming during record
5e8e66f369fd2f1918495380ed1886e50818e95e 04-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Fix deadlock while zooming during record" into jb-mr1-dev
f66cc52cc5a075b86b585cf72c4a41f6907b2142 04-Oct-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Fix deadlock while zooming during record" into jb-mr1-dev
05dd06eb54a4e15352405a3a5cedce6a7940b96b 04-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Fix deadlock while zooming during record

Acquired SharedParameters before mMutex in StreamingProcessor,
this avoids any potential deadlocks since Camera2Client code would
always acquire SharedParameters first before invoking StreamingProcessor.

Bug: 7275259
Change-Id: Ia741162c455300378bee049f063590ece5328b95
amera2/StreamingProcessor.cpp
04273cb14d2326e85bb047ea6ef75294c8b3d561 04-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Fix deadlock while zooming during record

Acquired SharedParameters before mMutex in StreamingProcessor,
this avoids any potential deadlocks since Camera2Client code would
always acquire SharedParameters first before invoking StreamingProcessor.

Bug: 7275259
Change-Id: Ia741162c455300378bee049f063590ece5328b95
amera2/StreamingProcessor.cpp
f3c7f03eaefc2a89ce28b5ee1abf4056643546e8 04-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am a9438d09: am ce953ce4: Merge "Camera2: Properly update FPS range when FPS is set." into jb-mr1-dev

* commit 'a9438d09fb44f6c95a558accd05711600cc4b2bf':
Camera2: Properly update FPS range when FPS is set.
c66fd7a9f92f05242adda1bab17c96cf257e3181 04-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am a9438d09: am ce953ce4: Merge "Camera2: Properly update FPS range when FPS is set." into jb-mr1-dev

* commit 'a9438d09fb44f6c95a558accd05711600cc4b2bf':
Camera2: Properly update FPS range when FPS is set.
b2e7a84664f3dcca774c754092ed8f390295ab15 04-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Properly update FPS range when FPS is set." into jb-mr1-dev
ce953ce4d698155c50356df093712df1dea76051 04-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Properly update FPS range when FPS is set." into jb-mr1-dev
02b62d3672ebb0761752ba6c841b2cc469c59ed3 03-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Properly update FPS range when FPS is set.

Otherwise a getParameters followed by setParameters will trigger an
incorrect reversion in FPS parameters.

Bug: 7279267
Change-Id: I7426860f05497dbdf4245c34cef1b38f2f5a1832
amera2/Parameters.cpp
260f267288502b73d1920a3701be2038753125b5 03-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Properly update FPS range when FPS is set.

Otherwise a getParameters followed by setParameters will trigger an
incorrect reversion in FPS parameters.

Bug: 7279267
Change-Id: I7426860f05497dbdf4245c34cef1b38f2f5a1832
amera2/Parameters.cpp
acd69364cac252c9ec0c4aaa48ad8e8f01d11662 03-Oct-2012 Alex Ray <aray@google.com> am b08633fc: am c2063056: Camera2: Fix prematurely clearing stream request

* commit 'b08633fc95947173ba3f68627728a8c5f12ef72f':
Camera2: Fix prematurely clearing stream request
17983e5b9a01e65722aa99128a8ae014b21ffa48 03-Oct-2012 Alex Ray <aray@google.com> am b08633fc: am c2063056: Camera2: Fix prematurely clearing stream request

* commit 'b08633fc95947173ba3f68627728a8c5f12ef72f':
Camera2: Fix prematurely clearing stream request
744c170d80ffa6a6b20c78daa2c312b6773539b5 03-Oct-2012 Igor Murashkin <iam@google.com> am 7fd4e2a8: am b3e97b34: Camera2: Fix trying to release HAL stream twice

* commit '7fd4e2a8f4d57d20e679e5321f34cc09245d82a1':
Camera2: Fix trying to release HAL stream twice
fe5f12bec61d43da862c11aeddc464a088f214a4 03-Oct-2012 Igor Murashkin <iam@google.com> am 7fd4e2a8: am b3e97b34: Camera2: Fix trying to release HAL stream twice

* commit '7fd4e2a8f4d57d20e679e5321f34cc09245d82a1':
Camera2: Fix trying to release HAL stream twice
311f69f18c41909e3087e4205548095762a2ecb7 03-Oct-2012 Alex Ray <aray@google.com> Camera2: Fix prematurely clearing stream request

Zsl handling was clearing the stream request before a capture request
was ready to be sent to the HAL, which would cause capture delays and
timeouts in certain conditions.

Bug: 7259520
Change-Id: Idde8bc4fc58b8b426c6985feac87759740e338ea
amera2/CaptureSequencer.cpp
amera2/ZslProcessor.cpp
c20630569431234db23b6182dd17102023dee68e 03-Oct-2012 Alex Ray <aray@google.com> Camera2: Fix prematurely clearing stream request

Zsl handling was clearing the stream request before a capture request
was ready to be sent to the HAL, which would cause capture delays and
timeouts in certain conditions.

Bug: 7259520
Change-Id: Idde8bc4fc58b8b426c6985feac87759740e338ea
amera2/CaptureSequencer.cpp
amera2/ZslProcessor.cpp
cce7ab7a04880b0a9c7a03097775a22999f37160 03-Oct-2012 Igor Murashkin <iam@google.com> am 5f49d702: am ecf17e82: Camera2: Handle client processes dying by closing camera resources

* commit '5f49d702fe25fe3a6752be438db6bf006840e41f':
Camera2: Handle client processes dying by closing camera resources
3b33fc737dc85c2d3bbc8f8d0a050652f506dd27 03-Oct-2012 Igor Murashkin <iam@google.com> am 5f49d702: am ecf17e82: Camera2: Handle client processes dying by closing camera resources

* commit '5f49d702fe25fe3a6752be438db6bf006840e41f':
Camera2: Handle client processes dying by closing camera resources
a1e5dccf73c0b734204b0094241e4a6a0752a67e 03-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Fix trying to release HAL stream twice

When we fail to disconnect the native window, StreamAdapter::release
would fail and remain in the old (ALLOCATED) state, thus it thinks that
we haven't released the HAL stream yet.

With this change, ignore DEAD_OBJECT native window disconnect failures,
so the state transitions to RELEASED and we don't double release HAL
streams.

Bug: 7258314
Change-Id: I524893e4b4d6463d7b0a7ce32fb6f658afba8e11
amera2Device.cpp
b3e97b347dceb882983427ac872b772e25f3f166 03-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Fix trying to release HAL stream twice

When we fail to disconnect the native window, StreamAdapter::release
would fail and remain in the old (ALLOCATED) state, thus it thinks that
we haven't released the HAL stream yet.

With this change, ignore DEAD_OBJECT native window disconnect failures,
so the state transitions to RELEASED and we don't double release HAL
streams.

Bug: 7258314
Change-Id: I524893e4b4d6463d7b0a7ce32fb6f658afba8e11
amera2Device.cpp
b34304a14dc89944f6dc7ee41cf1381d656f1c75 03-Oct-2012 Igor Murashkin <iam@google.com> am ad93604d: am 22d58d37: Camera2: Don\'t change state when reconnect is called

* commit 'ad93604d802c7f726f3bdb83ed14412b26a5c809':
Camera2: Don't change state when reconnect is called
75a6316633b0aecf27d41155d29608d11cc119d9 03-Oct-2012 Igor Murashkin <iam@google.com> am ad93604d: am 22d58d37: Camera2: Don\'t change state when reconnect is called

* commit 'ad93604d802c7f726f3bdb83ed14412b26a5c809':
Camera2: Don't change state when reconnect is called
8dcdb9553defafa1166c64b496e1ee390e4eadfa 03-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Handle client processes dying by closing camera resources

CameraService now subscribes to binder death notifications
for each client, and disconnects the client if the death happened
without cleanly shutting down the client first.

Bug: 7258314
Change-Id: I7803836b589fd8f0dfe00f6c28a707b82012e751
amera2Client.cpp
amera2Client.h
amera2Device.cpp
ameraClient.cpp
ameraClient.h
ameraService.cpp
ameraService.h
amera2/CallbackProcessor.cpp
amera2/JpegProcessor.cpp
amera2/StreamingProcessor.cpp
amera2/ZslProcessor.cpp
ecf17e82505fdb60d59e00b6dd59036df93de655 03-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Handle client processes dying by closing camera resources

CameraService now subscribes to binder death notifications
for each client, and disconnects the client if the death happened
without cleanly shutting down the client first.

Bug: 7258314
Change-Id: I7803836b589fd8f0dfe00f6c28a707b82012e751
amera2Client.cpp
amera2Client.h
amera2Device.cpp
ameraClient.cpp
ameraClient.h
ameraService.cpp
ameraService.h
amera2/CallbackProcessor.cpp
amera2/JpegProcessor.cpp
amera2/StreamingProcessor.cpp
amera2/ZslProcessor.cpp
0cb290b2304ef582a5afa9a45a4594944e89156e 03-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Don't change state when reconnect is called

Bug: 7252802
Change-Id: Ibed4f59a96bef75bf84b1aaf1235fb87e94102ef
amera2Client.cpp
amera2/StreamingProcessor.cpp
22d58d37db6b5f48a10b3a19f69ffda09943c125 03-Oct-2012 Igor Murashkin <iam@google.com> Camera2: Don't change state when reconnect is called

Bug: 7252802
Change-Id: Ibed4f59a96bef75bf84b1aaf1235fb87e94102ef
amera2Client.cpp
amera2/StreamingProcessor.cpp
94f21649c0505bfecdb673fd407ef3ad8478440b 03-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am db6ead4f: am 1bac8972: Merge "Camera2: Use ZSL format quirk." into jb-mr1-dev

* commit 'db6ead4fd0d8bbe3df6ede6727927830727cfa30':
Camera2: Use ZSL format quirk.
2a27f0112ba575096efc069d0694bf74169cf33e 03-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am db6ead4f: am 1bac8972: Merge "Camera2: Use ZSL format quirk." into jb-mr1-dev

* commit 'db6ead4fd0d8bbe3df6ede6727927830727cfa30':
Camera2: Use ZSL format quirk.
596cb97dff006229f10db8bd7306f4d228f96dfd 03-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use ZSL format quirk.

Switch service to using HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED,
unless ZSL quirk is set.

This is important for compatibility across multiple implementations.

Bug: 6243944
Change-Id: Iea74671cbb44890a07e4f99cd757b0a5423d447a
amera2Client.cpp
amera2/Parameters.cpp
amera2/Parameters.h
amera2/ZslProcessor.cpp
e382ee28709b83264a46b09e8f766c5ef42efa35 03-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use ZSL format quirk.

Switch service to using HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED,
unless ZSL quirk is set.

This is important for compatibility across multiple implementations.

Bug: 6243944
Change-Id: Iea74671cbb44890a07e4f99cd757b0a5423d447a
amera2Client.cpp
amera2/Parameters.cpp
amera2/Parameters.h
amera2/ZslProcessor.cpp
f93992e4b0dce1755ef4d2571b0930ef3a1107f0 03-Oct-2012 Eino-Ville Talvala <etalvala@google.com> resolved conflicts for merge of 9bf263b2 to master

Change-Id: I28da6f16a1d044864c81d5f1dcf6543169c09460
1aecbcb23d6304b1c86bd7ee8f6c5352d8d356cc 03-Oct-2012 Eino-Ville Talvala <etalvala@google.com> resolved conflicts for merge of 9bf263b2 to master

Change-Id: I28da6f16a1d044864c81d5f1dcf6543169c09460
c85f826e7b67bdf159a3f1b01bc9f1f33d05aaff 02-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use scene mode override parameter

- Read in SCENE_MODE_OVERRIDES static parameter if available.
Use it to select AF/AE/AWB modes when a scene mode is set.
- Add quirks structure to parameters; not yet used
- Fix desynchronization between range and single FPS value.
Still need to sort out best way to convert from one to another.

Bug: 7259959
Bug: 7159577
Bug: 7172543

Change-Id: I0d07c31d5f21fbc4b0ec2fa23f7f778073d2d6e0
amera2Client.cpp
amera2/BurstCapture.cpp
amera2/Parameters.cpp
amera2/Parameters.h
8a42dd8cd1a245d844f96cfd67dc342d7937e353 02-Oct-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use scene mode override parameter

- Read in SCENE_MODE_OVERRIDES static parameter if available.
Use it to select AF/AE/AWB modes when a scene mode is set.
- Add quirks structure to parameters; not yet used
- Fix desynchronization between range and single FPS value.
Still need to sort out best way to convert from one to another.

Bug: 7259959
Bug: 7159577
Bug: 7172543

Change-Id: I0d07c31d5f21fbc4b0ec2fa23f7f778073d2d6e0
amera2Client.cpp
amera2/BurstCapture.cpp
amera2/Parameters.cpp
amera2/Parameters.h
63c2a38a3c0be207306073c9196ab76cd9df4b2a 01-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 700a4cdc: am 73bbd1f1: Camera2: Refactor preview/recording management to separate class.

* commit '700a4cdc50b07dc75bb8103e55cc227b6cfa1fc7':
Camera2: Refactor preview/recording management to separate class.
da68fae17aaa5b9852caf6a96222f327d5ee3779 01-Oct-2012 Eino-Ville Talvala <etalvala@google.com> am 700a4cdc: am 73bbd1f1: Camera2: Refactor preview/recording management to separate class.

* commit '700a4cdc50b07dc75bb8103e55cc227b6cfa1fc7':
Camera2: Refactor preview/recording management to separate class.
43cbdc5b5545d3344c556014b9afe8249add91e4 26-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Refactor preview/recording management to separate class.

Untangle preview/recording management from main class to simplify
callpaths; in preparation for fixing several HAL/app interactions
bugs.

Bug: 7172543
Bug: 7159577
Bug: 7107220
Change-Id: Iab5503f66b35d88a1524111536a484c9e33fd934
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2/JpegProcessor.cpp
amera2/JpegProcessor.h
amera2/StreamingProcessor.cpp
amera2/StreamingProcessor.h
73bbd1f1c493835f191ea2b0b72439292496b40a 26-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Refactor preview/recording management to separate class.

Untangle preview/recording management from main class to simplify
callpaths; in preparation for fixing several HAL/app interactions
bugs.

Bug: 7172543
Bug: 7159577
Bug: 7107220
Change-Id: Iab5503f66b35d88a1524111536a484c9e33fd934
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2/JpegProcessor.cpp
amera2/JpegProcessor.h
amera2/StreamingProcessor.cpp
amera2/StreamingProcessor.h
2e63d52ea03e0a9d098759cf4689691809f44ceb 28-Sep-2012 James Painter <jpainter@google.com> DO NOT MERGE: Remove experimental parameters for burst mode

Bug: 7248756
Change-Id: I3aaf2da4791b2a13e1e788b2914e4c51c529a75d
amera2/Parameters.cpp
amera2/Parameters.h
0517e304d0cce25653a033e3cb00172d54ba251d 28-Sep-2012 James Painter <jpainter@google.com> DO NOT MERGE: Remove experimental parameters for burst mode

Bug: 7248756
Change-Id: I3aaf2da4791b2a13e1e788b2914e4c51c529a75d
amera2/Parameters.cpp
amera2/Parameters.h
0c0cfd7fb8042b63f0ffebd2de563f2ef733526f 28-Sep-2012 Alex Ray <aray@google.com> Merge "Camera2: Use new JPEG transport header" into jb-mr1-dev
23f74017a2c457a25382677b6e696c4cfa06cef5 28-Sep-2012 Alex Ray <aray@google.com> Merge "Camera2: Use new JPEG transport header" into jb-mr1-dev
d0dad6ece142f132f5d295330bfe386c2c28de46 28-Sep-2012 Alex Ray <aray@google.com> Merge "Camera2: Re-entering preview state on v2 Device" into jb-mr1-dev
24dfc952bcb609f7ba59c7fb9f7c3004ffb8c83b 28-Sep-2012 Alex Ray <aray@google.com> Merge "Camera2: Re-entering preview state on v2 Device" into jb-mr1-dev
6751c093886112f4774bc3de514268e7b85ea417 28-Sep-2012 Alex Ray <aray@google.com> Camera2: Use new JPEG transport header

Check for new JPEG transport header at the end of the stream buffer
instead of at the beginning.

Bug: 7108816
Change-Id: I26c52267cb406dae50c9d0ee01e6c26359ba84aa
amera2/JpegProcessor.cpp
amera2/JpegProcessor.h
0fa1e760f7093d025c977e5813e8d3a04c863ce3 28-Sep-2012 Alex Ray <aray@google.com> Camera2: Use new JPEG transport header

Check for new JPEG transport header at the end of the stream buffer
instead of at the beginning.

Bug: 7108816
Change-Id: I26c52267cb406dae50c9d0ee01e6c26359ba84aa
amera2/JpegProcessor.cpp
amera2/JpegProcessor.h
823b786e8558b7e73d9096cdd629e8896226e422 28-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Only _some_ FPS values in the old API are scaled.

The (deprecated) single-FPS parameter is not scaled by 1000.

Bug: 7230239
Change-Id: I5664cce90f9cb01e57e39f1a1f7c8eb730501da3
amera2/Parameters.cpp
amera2/Parameters.h
d0cec0cb574a3d629afb7c32883bc986d7a65535 28-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Only _some_ FPS values in the old API are scaled.

The (deprecated) single-FPS parameter is not scaled by 1000.

Bug: 7230239
Change-Id: I5664cce90f9cb01e57e39f1a1f7c8eb730501da3
amera2/Parameters.cpp
amera2/Parameters.h
b5d91138fddcb1c4acdc91ddc68a9f4097da5b40 27-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix FPS value scaling between HAL2 and API

API assumes FPS values are in fixed-point with LSB 0.001; HAL2 just
uses ints with no fractional part.

HAL should probably use floats or something similar, but for now, fix
scaling so the two agree on FPS values.

Bug: 7230239
Change-Id: Ie18a4f11fc9d17d9ae2d04781511a273213eda55
amera2/Parameters.cpp
amera2/Parameters.h
c9d7e4da3f963dadbea19e9b520fb7a7e28e614a 27-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix FPS value scaling between HAL2 and API

API assumes FPS values are in fixed-point with LSB 0.001; HAL2 just
uses ints with no fractional part.

HAL should probably use floats or something similar, but for now, fix
scaling so the two agree on FPS values.

Bug: 7230239
Change-Id: Ie18a4f11fc9d17d9ae2d04781511a273213eda55
amera2/Parameters.cpp
amera2/Parameters.h
71d6454cc20b7a3bbe0cfd375c778c5fcc54795a 27-Sep-2012 Alex Ray <aray@google.com> Camera2: Re-entering preview state on v2 Device

Bug: 7240891
Change-Id: I6a01b27197b4ee89a68f06f4375d315a716b67ae
amera2Client.cpp
77449ada4b5ca73a948aa4fef9aafe3079a66d61 27-Sep-2012 Alex Ray <aray@google.com> Camera2: Re-entering preview state on v2 Device

Bug: 7240891
Change-Id: I6a01b27197b4ee89a68f06f4375d315a716b67ae
amera2Client.cpp
b991ed9ec044ece45e433e1ac0fbb84b9ed7e871 25-Sep-2012 Alex Ray <aray@google.com> Camera2: Fix JPEG Transport Header offset

Use offset into start of buffer after transport header

Bug: 7108816
Change-Id: I6f9778db313856eaeee31f6999e4e55678b09b26
amera2/JpegProcessor.cpp
eb8a42b934f20a15f40d656e2bc90f384f1ccb10 25-Sep-2012 Alex Ray <aray@google.com> Camera2: Fix JPEG Transport Header offset

Use offset into start of buffer after transport header

Bug: 7108816
Change-Id: I6f9778db313856eaeee31f6999e4e55678b09b26
amera2/JpegProcessor.cpp
c62bb787e53fc4b400219567585b365a5792412c 24-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Make sure to clean out reprocess streams on shutdown as well.

Otherwise, streams may persist past expected lifetime.

Bug: 6243944
Change-Id: I901971b78baf9d577ea3812588dec3885232e7ef
amera2Device.cpp
c7d9afdc7d2181aef7688638fff52859bcdabd65 24-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Make sure to clean out reprocess streams on shutdown as well.

Otherwise, streams may persist past expected lifetime.

Bug: 6243944
Change-Id: I901971b78baf9d577ea3812588dec3885232e7ef
amera2Device.cpp
852c381dbd1a9f86e6759201b50ac8847a1c3e3c 24-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Debug and logging fixes.

- Fix LOG_TAGs to work with standard logcat filtering.
- Add ATRACE to Camera2Device
- Shorten thread names to fit in 16 characters
- Remove some ATRACEs to avoid flooding trace unnecessarily

Bug: 7220520
Change-Id: Ief8d677b5c8bb35d94e0f21b11b86505e83169ea
amera2Client.cpp
amera2Device.cpp
amera2/BurstCapture.cpp
amera2/CallbackProcessor.cpp
amera2/CameraMetadata.cpp
amera2/CaptureSequencer.cpp
amera2/FrameProcessor.cpp
amera2/JpegCompressor.cpp
amera2/JpegProcessor.cpp
amera2/Parameters.cpp
amera2/ZslProcessor.cpp
4bb8118816874c696d9f1adab48490df1da365f7 24-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Debug and logging fixes.

- Fix LOG_TAGs to work with standard logcat filtering.
- Add ATRACE to Camera2Device
- Shorten thread names to fit in 16 characters
- Remove some ATRACEs to avoid flooding trace unnecessarily

Bug: 7220520
Change-Id: Ief8d677b5c8bb35d94e0f21b11b86505e83169ea
amera2Client.cpp
amera2Device.cpp
amera2/BurstCapture.cpp
amera2/CallbackProcessor.cpp
amera2/CameraMetadata.cpp
amera2/CaptureSequencer.cpp
amera2/FrameProcessor.cpp
amera2/JpegCompressor.cpp
amera2/JpegProcessor.cpp
amera2/Parameters.cpp
amera2/ZslProcessor.cpp
f83e2b4fcff8298432dc75d9808aa05331b23bb1 25-Sep-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Emit ShutterCallback/RawCallback events after takePicture" into jb-mr1-dev
9a2e4fa60c843df54f35923898975fdbd04bed56 25-Sep-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Emit ShutterCallback/RawCallback events after takePicture" into jb-mr1-dev
707c3e34b067064f45c1b50919e88080fcdb5e77 21-Sep-2012 Igor Murashkin <iam@google.com> Camera2: Emit ShutterCallback/RawCallback events after takePicture

Bug: 7176692
Change-Id: I50e8f9511f1770d97a42d1fa208c04b1bbcfba6b
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
1b65ae9b7bcb4302f80ddc1464f1aa2c7483efb8 21-Sep-2012 Igor Murashkin <iam@google.com> Camera2: Emit ShutterCallback/RawCallback events after takePicture

Bug: 7176692
Change-Id: I50e8f9511f1770d97a42d1fa208c04b1bbcfba6b
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
e500bc25cb801e69b4193b2863ec40bb3de04db9 19-Sep-2012 Igor Murashkin <iam@google.com> Camera2: Fix cropRegion sometimes exceeding the sensor array size

Bug: 7155264
Bug: 7120431
Change-Id: I92a9c695b97ec40acf26dbdaa877964e41a9fd4c
amera2/Parameters.cpp
amera2/Parameters.h
018d228ac43a8da7d5f36e45fd105c9baf2490a0 19-Sep-2012 Igor Murashkin <iam@google.com> Camera2: Fix cropRegion sometimes exceeding the sensor array size

Bug: 7155264
Bug: 7120431
Change-Id: I92a9c695b97ec40acf26dbdaa877964e41a9fd4c
amera2/Parameters.cpp
amera2/Parameters.h
12c5d13c644cef1774cec2aafcbfeb4b205ba70f 21-Sep-2012 Alex Ray <aray@google.com> Camera2: Truncate JPEG images

Check for JPEG size hint from HAL, use if applicable. Otherwise
read until end of JPEG image to find appropriate file size.

Bug: 7108816
Change-Id: Idfd194133eb6c293ab08c9466f59606e62ba56b6
amera2/JpegProcessor.cpp
amera2/JpegProcessor.h
a6b4c40e70eafc5aba16163999de6d3e26667b89 21-Sep-2012 Alex Ray <aray@google.com> Camera2: Truncate JPEG images

Check for JPEG size hint from HAL, use if applicable. Otherwise
read until end of JPEG image to find appropriate file size.

Bug: 7108816
Change-Id: Idfd194133eb6c293ab08c9466f59606e62ba56b6
amera2/JpegProcessor.cpp
amera2/JpegProcessor.h
e7fc0ece01c9672629664c07108640f589034636 22-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Don't use ZSL when flash is on force fire mode." into jb-mr1-dev
df2bc29664d3bf80bed0012970608e5605acf7af 22-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Don't use ZSL when flash is on force fire mode." into jb-mr1-dev
5a07a62123d3e630d739e790528273c1c09e3490 22-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't use ZSL when flash is on force fire mode.

Bug: 7213907
Change-Id: I120b187c1886d85f4b2b5d3a6f28a28936424e8e
amera2/CaptureSequencer.cpp
6b367f2a2bddfed60d63fa4da5e19ca13352a454 22-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't use ZSL when flash is on force fire mode.

Bug: 7213907
Change-Id: I120b187c1886d85f4b2b5d3a6f28a28936424e8e
amera2/CaptureSequencer.cpp
e8f1b2e454c4e462521d1751d515c1be4aa820e0 22-Sep-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Emit FaceDetection events for all except repeating 0-face frames" into jb-mr1-dev
75dce94aca6203ada887b6c2d6a8a8130cdbfaca 22-Sep-2012 Igor Murashkin <iam@google.com> Merge "Camera2: Emit FaceDetection events for all except repeating 0-face frames" into jb-mr1-dev
46dee9da04e80971c93cf23d772355217c88bb6a 21-Sep-2012 Igor Murashkin <iam@google.com> Camera2: Emit FaceDetection events for all except repeating 0-face frames

Bug: 7205311
Change-Id: I570209445acf3a26f2246c3fe886d56bb63bd2f8
amera2/FrameProcessor.cpp
amera2/FrameProcessor.h
e7f256a4b1d2037a67ab139fc8131a6ca97bd405 21-Sep-2012 Igor Murashkin <iam@google.com> Camera2: Emit FaceDetection events for all except repeating 0-face frames

Bug: 7205311
Change-Id: I570209445acf3a26f2246c3fe886d56bb63bd2f8
amera2/FrameProcessor.cpp
amera2/FrameProcessor.h
dab11978a30160c65322d46000497d1dfc6c764b 21-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Clean up startup/shutdown sequences." into jb-mr1-dev
75041228626439668b64c93eb7bb866b3f63c3fd 21-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Clean up startup/shutdown sequences." into jb-mr1-dev
7adb52f9fcbe9e72ac29f89bfdabea093a0a0804 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Clean up startup/shutdown sequences.

- Close camera device on startup errors

- Make sure all threads are shut down and the device is closed before
returning from ICamera::disconnect.

Bug: 7172680
Change-Id: I98611448ec5f2311e6604fa8ee5f9dde7bfdd988
amera2Client.cpp
amera2Device.cpp
amera2Device.h
98bb82d1bf7c94240956426812de6593801faad4 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Clean up startup/shutdown sequences.

- Close camera device on startup errors

- Make sure all threads are shut down and the device is closed before
returning from ICamera::disconnect.

Bug: 7172680
Change-Id: I98611448ec5f2311e6604fa8ee5f9dde7bfdd988
amera2Client.cpp
amera2Device.cpp
amera2Device.h
5a8fed0251b978388bcebd6f4d0c4e2773c7641e 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Erase ZSL queue after each use.

Since preview stops after a capture is submitted, need to clear out
the ZSL queue to avoid using stale buffers when the preview starts up
again.

Bug: 7189765
Change-Id: I9ae2382d0af132208aca5ccba49b5464d18a263e
amera2/CaptureSequencer.cpp
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
768cf093dade9085e0ad6305d9f7c16ae9ad9e26 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Erase ZSL queue after each use.

Since preview stops after a capture is submitted, need to clear out
the ZSL queue to avoid using stale buffers when the preview starts up
again.

Bug: 7189765
Change-Id: I9ae2382d0af132208aca5ccba49b5464d18a263e
amera2/CaptureSequencer.cpp
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
52e9ad48ddd3c2e7c90a9002a2a65a5d63125b78 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: State must be STOPPED before JPEG callback is fired.

Move handling of JPEG callback to CaptureSequencer instead of
JpegProcessor, so that we can be sure the camera state is updated to
STOPPED before the JPEG callback is sent to the application layer.

Bug: 7172743
Change-Id: Ie8752d946d3eb8254230c77f10e5c38a83dc5371
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
amera2/JpegProcessor.cpp
fe580e57081885dd6059e0d407a6cd96a1be7e51 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: State must be STOPPED before JPEG callback is fired.

Move handling of JPEG callback to CaptureSequencer instead of
JpegProcessor, so that we can be sure the camera state is updated to
STOPPED before the JPEG callback is sent to the application layer.

Bug: 7172743
Change-Id: Ie8752d946d3eb8254230c77f10e5c38a83dc5371
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
amera2/JpegProcessor.cpp
a4247b833599882b23db39e9f773746dc2fd9693 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: ZSL captures should also make some noise.

Change-Id: If7aff7223db41b4b7edeeb4c32e40ef3197b180b
amera2/CaptureSequencer.cpp
da1c5c15c2483cd41035e1a492c5963ac86bbcf5 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: ZSL captures should also make some noise.

Change-Id: If7aff7223db41b4b7edeeb4c32e40ef3197b180b
amera2/CaptureSequencer.cpp
9d5f5c2a6a2af953de5b091e00bf59cae7f8d481 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Increase max timeout for the precapture sequence.

Increase maximum duration of the precapture sequence (final metering +
preflash + redeye reduction) to 2 seconds before timing out.

Change-Id: Ie1de4e96d46599eb53e1def9052b211e684f1fbc
amera2/CaptureSequencer.h
c55311869f1853c6814c9bcda8a4b60e43091c1a 20-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Increase max timeout for the precapture sequence.

Increase maximum duration of the precapture sequence (final metering +
preflash + redeye reduction) to 2 seconds before timing out.

Change-Id: Ie1de4e96d46599eb53e1def9052b211e684f1fbc
amera2/CaptureSequencer.h
d5a9ae029b50678de3b468d8324728a73ff5b0aa 19-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Increase capture timeout." into jb-mr1-dev
74e58c55bc5259b957a51f1bb44a5911ad1f8400 19-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Increase capture timeout." into jb-mr1-dev
59ab044774bf7fd0b841087212078babb4451eb8 19-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Increase capture timeout.

Low-light modes may take longer to capture a picture, so increase the
timeouts.

Change-Id: Id50b1e4fd3186da4e75b2cc1c226ced2f8d394ac
amera2/CaptureSequencer.h
1f266efe8ce2976b6531fab8698716354b2247f8 19-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Increase capture timeout.

Low-light modes may take longer to capture a picture, so increase the
timeouts.

Change-Id: Id50b1e4fd3186da4e75b2cc1c226ced2f8d394ac
amera2/CaptureSequencer.h
a2acc96eadc02228b8a3366de3d05d3a6a81272c 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Enable ZSL by default.

Bug: 6910087
Change-Id: Ie774f28fbb943b2ac2c856872fd4cae68b40430c
amera2/Parameters.cpp
2f93127de30bbe17707ca8923c486d4494ffda37 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Enable ZSL by default.

Bug: 6910087
Change-Id: Ie774f28fbb943b2ac2c856872fd4cae68b40430c
amera2/Parameters.cpp
a80773ba36872943713d76c8485bed12ddc53499 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: ZSL: Do regular capture if AE is not satisfied." into jb-mr1-dev
9c6ec8213d8da486a61659b9c37b7a57a2c4bb1a 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: ZSL: Do regular capture if AE is not satisfied." into jb-mr1-dev
2274549ec18f63a285db871fa67abf42124d116e 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: ZSL: Do regular capture if AE is not satisfied.

- Check the AE state of the selected ZSL buffer; if it's not reporting
as CONVERGED or LOCKED, fall back to normal capture sequence
- Add more debugging for the ZSL queue.

Bug: 6910087
Change-Id: I77a4287580aa9ddbd58438477c40ce829555d0ca
amera2Client.cpp
amera2/CaptureSequencer.cpp
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
97b38a81ac989ccba02d726011a82541f14166df 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: ZSL: Do regular capture if AE is not satisfied.

- Check the AE state of the selected ZSL buffer; if it's not reporting
as CONVERGED or LOCKED, fall back to normal capture sequence
- Add more debugging for the ZSL queue.

Bug: 6910087
Change-Id: I77a4287580aa9ddbd58438477c40ce829555d0ca
amera2Client.cpp
amera2/CaptureSequencer.cpp
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
0e0a14013dc3c0c02f96ec486d70d0871747062c 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't be bothered by lack of faces.

Sometimes, people might want to photograph scenes with no faces. And
not have their log fill with errors when they do.

Bug: 7078231
Change-Id: Ibe5c08d51b49a3ea14203416fe7803a58de08dda
amera2/FrameProcessor.cpp
663c2cd909cb9c0699b4d58c1db7c6252afd77ea 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't be bothered by lack of faces.

Sometimes, people might want to photograph scenes with no faces. And
not have their log fill with errors when they do.

Bug: 7078231
Change-Id: Ibe5c08d51b49a3ea14203416fe7803a58de08dda
amera2/FrameProcessor.cpp
55619ef9beb0383b383f185f2e1b61a82745dbcd 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Filter out faces with 0 confidence.

Bug: 7078231
Change-Id: I559f1281359835e0489456091a5409ebc8f73479
amera2/FrameProcessor.cpp
a9f8d040146533a9c214473fd79cbd9dff44428d 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Filter out faces with 0 confidence.

Bug: 7078231
Change-Id: I559f1281359835e0489456091a5409ebc8f73479
amera2/FrameProcessor.cpp
063886eed72c1a12ff73953561d662b47e8230d5 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Change face detect/scene mode priority.

Explicit scene modes should override the implicit face priority scene
mode from enabling face detection, to match application/API
expectations.

Change-Id: I6f0f44fadeacfdc0594dd2fdc280e294d2d87df6
amera2/Parameters.cpp
d14de47262340d70fc11fe56159462b9b981067f 18-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Change face detect/scene mode priority.

Explicit scene modes should override the implicit face priority scene
mode from enabling face detection, to match application/API
expectations.

Change-Id: I6f0f44fadeacfdc0594dd2fdc280e294d2d87df6
amera2/Parameters.cpp
bd3a81653a9bbdf7aa9394d99f2fc9b7dabf68dc 15-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't play shutter sound when doing a video snapshot

Bug: 7171820
Change-Id: I11ec0900aff3cdf4b57ae1bfc75f7acfecf95098
amera2/CaptureSequencer.cpp
efb039e07c688c21122c938b008457bd4f555898 15-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Don't play shutter sound when doing a video snapshot

Bug: 7171820
Change-Id: I11ec0900aff3cdf4b57ae1bfc75f7acfecf95098
amera2/CaptureSequencer.cpp
d697d5c780b61d121249c51eeddd4b36cae877fb 14-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Revert "Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme.""

The changes this commit depends on are now submitted.

This reverts commit f54b1459cda7f585b4896671643b33bab8290964

Change-Id: If7f146ab7968d50fffd2174c2c5792bdc9d7724c
amera2/ZslProcessor.cpp
beb1416afd1d331b8e7e93d626f39267acce289a 14-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Revert "Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme.""

The changes this commit depends on are now submitted.

This reverts commit f54b1459cda7f585b4896671643b33bab8290964

Change-Id: If7f146ab7968d50fffd2174c2c5792bdc9d7724c
amera2/ZslProcessor.cpp
b362ce8130a345c3675f985e00411bb8fcbdc55e 14-Sep-2012 Igor Murashkin <iam@google.com> Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme."

This reverts commit 8a3016613dc684a6be11fdf643f9cc5cad817e8f

Change-Id: I3f1d4e9c13df838b8b6aa5696a6494140eac3e04
amera2/ZslProcessor.cpp
f54b1459cda7f585b4896671643b33bab8290964 14-Sep-2012 Igor Murashkin <iam@google.com> Revert "Camera2: Use FORMAT_ZSL until transition to new gralloc scheme."

This reverts commit 8a3016613dc684a6be11fdf643f9cc5cad817e8f

Change-Id: I3f1d4e9c13df838b8b6aa5696a6494140eac3e04
amera2/ZslProcessor.cpp
06068bffa9d226ab578e8dea5540179da89aebf9 14-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use FORMAT_ZSL until transition to new gralloc scheme.

Until all HAL implementations move to the new format negotiation
scheme, use CAMERA2_HAL_PIXEL_FORMAT_ZSL to indicate ZSL mode.

Bug: 6243944
Change-Id: Idf5d9f42e203903ba906d5df156100646b27404c
amera2/ZslProcessor.cpp
8a3016613dc684a6be11fdf643f9cc5cad817e8f 14-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use FORMAT_ZSL until transition to new gralloc scheme.

Until all HAL implementations move to the new format negotiation
scheme, use CAMERA2_HAL_PIXEL_FORMAT_ZSL to indicate ZSL mode.

Bug: 6243944
Change-Id: Idf5d9f42e203903ba906d5df156100646b27404c
amera2/ZslProcessor.cpp
2954fe9a1cf578c2ad54c2fefb79aeb2a3d220eb 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix ZSL bugs.

The ZSL processor was discarding buffers too often, and waiting for
new buffers with mutexes held.

Also adds basic fallback to regular capture in case the ZSL queue
doesn't contain a suitable buffer.

Bug: 7147043

Change-Id: I5721267ef08dbc87ef9d8ec47f333db5f67e41c1
amera2/CaptureSequencer.cpp
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
bdde5f884eaf270ab4b806849f3122a46cd872ce 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix ZSL bugs.

The ZSL processor was discarding buffers too often, and waiting for
new buffers with mutexes held.

Also adds basic fallback to regular capture in case the ZSL queue
doesn't contain a suitable buffer.

Bug: 7147043

Change-Id: I5721267ef08dbc87ef9d8ec47f333db5f67e41c1
amera2/CaptureSequencer.cpp
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
2fd313002a0e987ac01c037d5357e1572c4522c6 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Use full pixel array for ZSL stream" into jb-mr1-dev
d067489a23640a107e0a86f6de9b467d509deb36 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Use full pixel array for ZSL stream" into jb-mr1-dev
c4cb95449426b5715c6f737abb7eb95945f87166 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Configure ZSL at the right time." into jb-mr1-dev
2552036ac67472411082d894eb6e11623799d277 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Configure ZSL at the right time." into jb-mr1-dev
efd69bc6740cb20a9d8bf58ecdf16f411573c100 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use full pixel array for ZSL stream

For efficiency, use full pixel array size for the ZSL output/input
streams, instead of the final picture size.

Bug: 7139362
Change-Id: I98ad4f5a1ca283efe87ae60bf0cf39573e22d2f3
amera2/ZslProcessor.cpp
6e4db898bac9499a8abe7e6b6fbf729b78f6bd68 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use full pixel array for ZSL stream

For efficiency, use full pixel array size for the ZSL output/input
streams, instead of the final picture size.

Bug: 7139362
Change-Id: I98ad4f5a1ca283efe87ae60bf0cf39573e22d2f3
amera2/ZslProcessor.cpp
c33e4b59c48aff4c531ba33d03066b0fe101b8bf 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Configure ZSL at the right time.

ZSL enable was too early in the camera startup sequence, resulting it
being turned off most of the time.

Bug: 7148012
Change-Id: Ie144dd960d018a34b0bc77c88208ca22b7112772
amera2Client.cpp
amera2/Parameters.cpp
b075252349a4b40ddda791f2e1221ae0ce7e4cd1 12-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Configure ZSL at the right time.

ZSL enable was too early in the camera startup sequence, resulting it
being turned off most of the time.

Bug: 7148012
Change-Id: Ie144dd960d018a34b0bc77c88208ca22b7112772
amera2Client.cpp
amera2/Parameters.cpp
eb37db0ff21ab89d9870099d8fe7c073d58f1c6e 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera1: Fix enable shutter sound command error handling." into jb-mr1-dev
b063cb62ab371cced17a6288ebf54e7e6ca58982 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera1: Fix enable shutter sound command error handling." into jb-mr1-dev
ccd795f3c52e626b6eb37a9b6c6ad4ca2f68aa03 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera1: Fix enable shutter sound command error handling.

Return the error codes from calls to enableShutterSound to the caller,
and don't call the HAL with the enable shutter sound command.

Change-Id: Ibe4943bd1cd0fcd1832fd904f12dd2f78fec06a5
ameraClient.cpp
c5268e825d4a513ad857b7944a9f85dc478c1dc6 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera1: Fix enable shutter sound command error handling.

Return the error codes from calls to enableShutterSound to the caller,
and don't call the HAL with the enable shutter sound command.

Change-Id: Ibe4943bd1cd0fcd1832fd904f12dd2f78fec06a5
ameraClient.cpp
587879f29d1282f20f5043a840a40eefb68547c3 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Temporarily stop pre-allocation of recording stream.

When recordingHint is set, don't pre-allocate recording stream on
preview start.

Bug: 7137947
Change-Id: I06b5f6d7dbb21d4d0747974ba001b0c8929a0b02
amera2Client.cpp
14fe42d8d8d622f6fcdbd83df5f3932e24cd896e 11-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Temporarily stop pre-allocation of recording stream.

When recordingHint is set, don't pre-allocate recording stream on
preview start.

Bug: 7137947
Change-Id: I06b5f6d7dbb21d4d0747974ba001b0c8929a0b02
amera2Client.cpp
8ad3e8043415aaebe907f0556e973b1d7faf3b48 10-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Clean up the right streams.

Change-Id: I780c3e8e255f6a185e0edf1d76f35afdc74dff48
amera2/ZslProcessor.cpp
47512a7da600ababdfd052b574488b9e499c22f6 10-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Clean up the right streams.

Change-Id: I780c3e8e255f6a185e0edf1d76f35afdc74dff48
amera2/ZslProcessor.cpp
2a88b7130e50ea579401a4407847e57fd36eab85 07-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use face priority scene mode when face detect is enabled.

Per API specs, enabled face detection implies that metering, etc is
done based on faces.

Bug: 6243944
Change-Id: Ie35162226d70cc0f437e92e37be138e71e45e738
amera2/Parameters.cpp
61c0cc6af2c64d280bcfc1fcca3e3589172a5817 07-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use face priority scene mode when face detect is enabled.

Per API specs, enabled face detection implies that metering, etc is
done based on faces.

Bug: 6243944
Change-Id: Ie35162226d70cc0f437e92e37be138e71e45e738
amera2/Parameters.cpp
4c6b0b8fe86740a7cee1e179d0f55cbcd143d2d2 10-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Sanity check inputs better.

Bug: 7132141
Change-Id: I866a65dfe47464070a6ef4ac60be4801cb68327b
amera2/Parameters.cpp
4a02cc818607c0c145f91c3acb9181868a108f26 10-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Sanity check inputs better.

Bug: 7132141
Change-Id: I866a65dfe47464070a6ef4ac60be4801cb68327b
amera2/Parameters.cpp
fe140e882c578883238a2dd7793159c848a07b49 08-Sep-2012 James Painter <jpainter@google.com> Fix build

Change-Id: Ia4bebc4ecc850b42ebd4edd1ffed07e9bc2ec300
amera2Client.cpp
10894e509f777c6bd7e408a57f5cf21ee2b36a96 08-Sep-2012 James Painter <jpainter@google.com> Fix build

Change-Id: Ia4bebc4ecc850b42ebd4edd1ffed07e9bc2ec300
amera2Client.cpp
c3dbf1a40df85b75e5805382838a90416f69730f 06-Sep-2012 James Painter <jpainter@google.com> Camera2: Add a burst mode skeleton.

Bug: 6243944
Change-Id: I7f496ca1051571c68fdd99a6f85bf6a908a4e29a
ndroid.mk
amera2Client.cpp
amera2/BurstCapture.cpp
amera2/BurstCapture.h
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
amera2/JpegCompressor.cpp
amera2/JpegCompressor.h
amera2/Parameters.cpp
amera2/Parameters.h
e538206d15282afbc5b168d60b1026a5dfcd13c0 06-Sep-2012 James Painter <jpainter@google.com> Camera2: Add a burst mode skeleton.

Bug: 6243944
Change-Id: I7f496ca1051571c68fdd99a6f85bf6a908a4e29a
ndroid.mk
amera2Client.cpp
amera2/BurstCapture.cpp
amera2/BurstCapture.h
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
amera2/JpegCompressor.cpp
amera2/JpegCompressor.h
amera2/Parameters.cpp
amera2/Parameters.h
1a4d1536ed9b2fe2dbe67d564018eed848120400 07-Sep-2012 Alexander Ray <aray@google.com> Merge "Camera2: Increase zoom steps." into jb-mr1-dev
1c7ff022a91e4f966c23dcf11f6859c69c08841a 07-Sep-2012 Alexander Ray <aray@google.com> Merge "Camera2: Increase zoom steps." into jb-mr1-dev
f98cbbeb01aa15178c7a58f3c478ec1050dbe83e 30-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use the recordingHint parameter.

Use recordingHint to create recording and still capture streams up
front, and to use the recording template when doing preview.

Bug: 6243944

Change-Id: Ifeb624794849f734784b53a1a10ff2bfe8f1a357
amera2Client.cpp
amera2Client.h
5a4f93eaaab7518fd734fdc9f0f686d632f31a59 30-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use the recordingHint parameter.

Use recordingHint to create recording and still capture streams up
front, and to use the recording template when doing preview.

Bug: 6243944

Change-Id: Ifeb624794849f734784b53a1a10ff2bfe8f1a357
amera2Client.cpp
amera2Client.h
7d8b92bf72194896363ceef97e12a52ac1bb1e5c 06-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Delete all streams and stop all threads during shutdown.

Bug: 6243944
Change-Id: If13a1f91e8a07c1ec4f91183d1a4b261ec4f6d52
amera2Client.cpp
amera2/CallbackProcessor.cpp
amera2/JpegProcessor.cpp
amera2/ZslProcessor.cpp
cf70d3469332445dc3ffd09729da3538612b1bb2 06-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Delete all streams and stop all threads during shutdown.

Bug: 6243944
Change-Id: If13a1f91e8a07c1ec4f91183d1a4b261ec4f6d52
amera2Client.cpp
amera2/CallbackProcessor.cpp
amera2/JpegProcessor.cpp
amera2/ZslProcessor.cpp
33578836f930024306fb2a173d7da36d7f3d7dbf 07-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Play shutter and recording sounds.

Bug: 6987540

Change-Id: Icd441a757c4b68fc4988b3bfbef428adb8d1ba28
amera2Client.cpp
amera2Client.h
amera2/CaptureSequencer.cpp
609acc0c96bc2aedd42246862b537e045f5184b6 07-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Play shutter and recording sounds.

Bug: 6987540

Change-Id: Icd441a757c4b68fc4988b3bfbef428adb8d1ba28
amera2Client.cpp
amera2Client.h
amera2/CaptureSequencer.cpp
15405329ab08979a0614060b92d7b044c550cbbd 07-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Increase zoom steps.

10 is too low for smooth zoom; increase number to improve smoothness.

Bug: 7120794
Change-Id: I178cd3890ef37beeff97cadb9e92ceab6d2cad06
amera2/Parameters.h
161fac83b369f4873859a101b6a71efeb596bd4a 07-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Increase zoom steps.

10 is too low for smooth zoom; increase number to improve smoothness.

Bug: 7120794
Change-Id: I178cd3890ef37beeff97cadb9e92ceab6d2cad06
amera2/Parameters.h
2d6a503f548ac047f30995c4f74f58259ab9027b 03-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move locked states out of AE/AWB mode

Bug: 6243944

Change-Id: I7b609cc6c04c957d1f48c1a996263fa9c7b94000
amera2/Parameters.cpp
96150cfc6b9ae93b6c4b60b5c7889a7a90af5def 03-Sep-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move locked states out of AE/AWB mode

Bug: 6243944

Change-Id: I7b609cc6c04c957d1f48c1a996263fa9c7b94000
amera2/Parameters.cpp
69230df9905534cda15becd44c0109874c4be5f0 30-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Basic ZSL and precapture trigger support.

- Add capture sequencer to control still image capture process
- Use precapture trigger for standard capture in sequencer
- Add infrastructure for reprocessing streams
- Add ZSL processor to maintain ZSL queue
- Add ZSL capture sequence to sequencer

This patch sets up ZSL mode and precapture triggers.

For now, to enable zsl mode, set the system property camera.zsl_mode
to 1.

Bug: 6243944

Change-Id: Icf8cb1a83a7c11a152a11007c8f3c54f8ea1c70c
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
amera2/CallbackProcessor.cpp
amera2/CallbackProcessor.h
amera2/CameraMetadata.cpp
amera2/CameraMetadata.h
amera2/CaptureProcessor.cpp
amera2/CaptureProcessor.h
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
amera2/FrameProcessor.cpp
amera2/FrameProcessor.h
amera2/JpegProcessor.cpp
amera2/JpegProcessor.h
amera2/Parameters.cpp
amera2/Parameters.h
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
da6665cbd06ca58d3357c3002b7366d13e23f152 30-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Basic ZSL and precapture trigger support.

- Add capture sequencer to control still image capture process
- Use precapture trigger for standard capture in sequencer
- Add infrastructure for reprocessing streams
- Add ZSL processor to maintain ZSL queue
- Add ZSL capture sequence to sequencer

This patch sets up ZSL mode and precapture triggers.

For now, to enable zsl mode, set the system property camera.zsl_mode
to 1.

Bug: 6243944

Change-Id: Icf8cb1a83a7c11a152a11007c8f3c54f8ea1c70c
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
amera2/CallbackProcessor.cpp
amera2/CallbackProcessor.h
amera2/CameraMetadata.cpp
amera2/CameraMetadata.h
amera2/CaptureProcessor.cpp
amera2/CaptureProcessor.h
amera2/CaptureSequencer.cpp
amera2/CaptureSequencer.h
amera2/FrameProcessor.cpp
amera2/FrameProcessor.h
amera2/JpegProcessor.cpp
amera2/JpegProcessor.h
amera2/Parameters.cpp
amera2/Parameters.h
amera2/ZslProcessor.cpp
amera2/ZslProcessor.h
a289bf696e4b49e0a726fd07914f9dc178653efc 06-Sep-2012 James Dong <jdong@google.com> Fix an issue where the "mFrameCount" field was accessed without its containing object

Change-Id: I6077b61b3e718b9b44ff86ca669a59f96b0b256f
amera2Device.cpp
6638f3bd61df1e5d012bc600b7af4c1b4dd4a06b 06-Sep-2012 James Dong <jdong@google.com> Fix an issue where the "mFrameCount" field was accessed without its containing object

Change-Id: I6077b61b3e718b9b44ff86ca669a59f96b0b256f
amera2Device.cpp
314079efa77c07255b2a2794eba470fccd1541fb 31-Aug-2012 Shuzhen Wang <shuzhenw@quicinc.com> Camera: set vendor_ops on camera metadata.

This makes sure that vendor specific metadata can propogate through
the framework.

Change-Id: I3bd0ae4b889eb907caf7b305dbcb16abbbef0ea3
amera2Device.cpp
092fe44abd787fcb4377d90c63f2aa7120a4d267 31-Aug-2012 Shuzhen Wang <shuzhenw@quicinc.com> Camera: set vendor_ops on camera metadata.

This makes sure that vendor specific metadata can propogate through
the framework.

Change-Id: I3bd0ae4b889eb907caf7b305dbcb16abbbef0ea3
amera2Device.cpp
a1e4e309e9a32afa3a26576fa592789168db182e 28-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Require 2 JPEG thumbnail resolutions.

Include (0,0) as a required thumbnail resolution, to allow turning off
thumbnails.

Change-Id: I3c4efe2d6a4f576a11ce5b75a3d573812a100b80
amera2/Parameters.cpp
f128dc51c81e6b831806e0de505e4edbb02b7e71 28-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Require 2 JPEG thumbnail resolutions.

Include (0,0) as a required thumbnail resolution, to allow turning off
thumbnails.

Change-Id: I3c4efe2d6a4f576a11ce5b75a3d573812a100b80
amera2/Parameters.cpp
2863918926c82d6002de160c9d499be9b6a3856e 28-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move preview callback processing to its own thread.

To reduce delays for HAL callbacks, manage preview callbacks in their
own thread.

Bug: 6243944
Change-Id: I7bef56949ac889ffce4e031bf40291a771a46f3e
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2/CallbackProcessor.cpp
amera2/CallbackProcessor.h
d86a6880fe86bda21a9b53b240996fc410a512a5 28-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move preview callback processing to its own thread.

To reduce delays for HAL callbacks, manage preview callbacks in their
own thread.

Bug: 6243944
Change-Id: I7bef56949ac889ffce4e031bf40291a771a46f3e
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2/CallbackProcessor.cpp
amera2/CallbackProcessor.h
177bd3489e73ed86cf47c485c88292bf399bd48a 28-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move still capture processing to separate thread.

To avoid stalling HAL when it queues up new buffers for still capture,
process still captures in a separate thread. Also move Camera2Heap to
its own class so it can be used by the CaptureProcessor.

Bug: 6243944
Change-Id: Id38e2a52367c0985812fcd4fd9af3ef90beef43f
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2/Camera2Heap.h
amera2/CaptureProcessor.cpp
amera2/CaptureProcessor.h
ea0d51b5ed0b474433b02414f9133b835f972569 28-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move still capture processing to separate thread.

To avoid stalling HAL when it queues up new buffers for still capture,
process still captures in a separate thread. Also move Camera2Heap to
its own class so it can be used by the CaptureProcessor.

Bug: 6243944
Change-Id: Id38e2a52367c0985812fcd4fd9af3ef90beef43f
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2/Camera2Heap.h
amera2/CaptureProcessor.cpp
amera2/CaptureProcessor.h
a16733eeb9c40db4793bec408f29b4204e5f23b1 28-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Factor out FrameProcessor.

Move FrameProcessor to its own file, add necessary interfaces to
Camera2Client.

Bug: 6243944
Change-Id: I8d1b8280a65d2822461ebe6b6c9de17992b34276
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2/FrameProcessor.cpp
amera2/FrameProcessor.h
2e19c3c02957208371cdd491e6342ea7ddb440d9 26-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Factor out Camera2Client::Parameters

Move the parameter structure and the various utility methods using it
to its own class. Rename LockedParameters to SharedParameters to match
the Mutex naming convention.

Also move CameraMetadata to camera2 directory for organization.

No functional changes.

Bug: 6243944
Change-Id: Ie60b535936ecfda9bf23361d52604abf515c83d0
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
ameraMetadata.cpp
ameraMetadata.h
amera2/CameraMetadata.cpp
amera2/CameraMetadata.h
amera2/Parameters.cpp
amera2/Parameters.h
f17b6cf6aa7548ca82e7fed96d71db7821103e57 26-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix metering/focusing region coordinates, minor bugs

- Use active pixel array-based coordinates instead of the normalized
camera API coordinates for ae/awb/af regions
- Fix calculation of UV stride for YV12 format

Bug: 6243944
Change-Id: I80cbd989858b0a3cb75c6f536c145e16e44fdb25
amera2Client.cpp
amera2Client.h
c8474b68e435cd840ba66791fb09e3da59f1d93c 25-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move frame processing to its own thread.

To avoid blocking the HAL on possibly long-running binder calls,
move frame receiption and processing to its own thread.

Bug: 6243944
Change-Id: I6385be4410b2f68e2331755027afc10c342187cf
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
cab96a4a7a2900fa991ab77ae45ba8d4be97e054 24-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use CameraMetadata wrapper class.

Wrap the use of the camera_metadata library inside a CameraMetadata
class to avoid memory leaks, improve code clarity, and increase type
safety.

Bug: 6243944
Change-Id: I90ca592b5875e27e4c58ea1ca680582dc3c3b56a
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
ameraMetadata.cpp
ameraMetadata.h
30e65e7e2ec01e13e45b5e38552a34d2fbb3f866 21-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Replace MediaConsumer with BufferItemConsumer.

Get rid of MediaConsumer, which was largely duplicated code, and
replace it with the simpler BufferItemConsumer.

Bug: 6243944
Change-Id: I242d80c5fe39f2ee581ec8bb46f362997d994b0a
ndroid.mk
amera2Client.cpp
amera2Client.h
ediaConsumer.cpp
ediaConsumer.h
76dc8dacbb3e2a8c91cb526293270f9093cf8f8b 22-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Ignore NOT_FOUND errors for face detect mode on frame receipt.

Reduce log spamming due to incomplete implementations.

Change-Id: I6eb9d657591bd5f1476dd8c96e4a00b8a03e2a5e
amera2Client.cpp
228a53805808a24cb19fcf13b1f0bdc2ed89bbe1 13-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add support for preview callbacks

- Move camera overall state enum to be part of parameters
- No longer use ICameraLock to guard access to overall state enum
- Add callback flag management
- Add callback stream and management

Bug: 6243944

Change-Id: Ideb3dc523a23c05e440e429ebf838b1900a96573
amera2Client.cpp
amera2Client.h
amera2Device.cpp
ediaConsumer.cpp
3cc89794d92b833feff15ca76dfa196cc886e43f 17-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix SCENE_MODE

Now can set scene mode back to auto.

Bug: 7001465

Change-Id: Ia25ba54d13de662bef5bf79957987513a7313c18
amera2Client.cpp
8ce89d9e2b132bf58a030acec88acf0a998926a1 10-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Skeleton for output frame processing, plus face detect

- Plumbing for processing output metadata frames from the HAL
- Support for passing face detection metadata from said frames
to the application.
- Switch calls on ICameraClient interface to use separate mutex to
avoid deadlock scenarios with messages being communicated from the
HAL to the camera user while calls from the user to the service are
active.

Bug: 6243944

Change-Id: Id4cf821d9c5c3c0069be4c0f669874b6ff0d1ecd
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
603b12efa16e7afb4e6c75f6b353216c83e8e135 08-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Swap AF notification order, minor bug fix.

In continuous AF modes, when an AF trigger/cancel is received in the
middle of a passive AF scan, we want to send both an AF move stop
callback and an AF done callback. Swap the order of sending to
simplify life when the app just wants to pay attention to the AF done
callback during an active AF trigger.

Bug: 6243944
Change-Id: I127d1675bc37ef828ef89c70b8cfab75f9428a2f
amera2Client.cpp
amera2Device.cpp
174181eec57c963a2a17bd156d81c3f18b3ba75c 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add trigger support, and implement autofocus

- Add skeletons for all triggering actions into Camera2Device
- Add support for AF triggers to HAL
- Add support for AF notifications from HAL

Bug: 6243944
Change-Id: I21025440849ae41f7083e1dcb72c99f8e5b2d5f7
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
31d377b7622279034326fbd8b9803a738a39fb30 10-Aug-2012 James Dong <jdong@google.com> Update state only if calls to native window are successful

Change-Id: I7a20f3ca787e11ca9c8c904b257e3c8a4e529136
amera2Device.cpp
97197157cf619fb716710eb67915fdfa93502750 06-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Reduce redundant device dumpsys

Bug: 6243944
Change-Id: Ifdc15ee62156a7adfd133f0d0d8b772dd1e9d5a3
amera2Device.cpp
8da4cd7d706d9f551bf2d08cd8b61907a10cd38d 05-Aug-2012 James Dong <jdong@google.com> Fix a deadlock in commandSetVideoBufferCountL()

o The lock to be acquired in recordingEnabled() has aleady been acquired in sendCommand()
before the call to commandSetVideoBufferCountL().

Change-Id: I664d51ef449c9eb3576d5d56f73f29c98444ff3f
amera2Client.cpp
amera2Client.h
160d4af9d933fe9461bb213e5876fc5c8c2178c2 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add notification handling skeleton.

Wire up skeleton methods for handling all currently defined
notifications.

Bug: 6243944
Change-Id: I84b3f60111416ba6fbcdb086f1310225142e2b70
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
36cdfb185877a7f573621d19ed2b2e1cac13d62e 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Break out individual commands

- List all commands that need implementing in sendCommand
- Write skeleton methods for each one
- Implements playRecordingSound command
- Partially implements enableShutterSound command

Bug: 6243944
Change-Id: I7866df75adca09483f407d3a4f630e847dbc7721
amera2Client.cpp
amera2Client.h
983cf231ab2d176a14595cdae46ff1b0c239af47 02-Aug-2012 James Dong <jdong@google.com> Dynamically configure the number of video buffers used by camera source, if supported

o related-to-bug: 6920805

Change-Id: I413bb50954cc84e32ed40bcb713842dc7b58e2b6
amera2Client.cpp
amera2Client.h
ameraClient.cpp
15d7245ed2193e4956ea87998321cbc16a3b0a46 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Fix exposure compensation step value." into jb-mr1-dev
1bf1c000be916b5e3388ef9039beedda01fa2bdd 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Minor logging updates." into jb-mr1-dev
4a76bcea7a23356185c4fa9491d5a73256b80cd0 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Camera2: Check PIDs to ensure camera exclusive access." into jb-mr1-dev
d6f8e08a9ca7f2fe41717acd351426a7ecb0c175 03-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix exposure compensation step value.

Fix floating-point divide error.

Change-Id: I61b140c1090d6773b9b530d19a2ec03cf784b85e
amera2Client.cpp
750d74b0b64470dccdb7310bf33e0d0e582f2059 01-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Minor logging updates.

Improve double-verbose logging, report a few more errors/startup
conditions.

Bug: 6243944
Change-Id: I2e814f786b35f57b63220d1b7c39f39cb6c3ace3
amera2Device.cpp
3a609147811105d40766f8f8f5904bf71cb123cb 31-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Check PIDs to ensure camera exclusive access.

Bug: 6243944
Change-Id: I4b36af2c92b7266a4aa896a2b048c56b6406cb9a
amera2Client.cpp
amera2Client.h
9007619d1f786a75dae0fff31feadbf9aed9cfb8 02-Aug-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Shutter sound is heard at the end of the recorded video" into jb-mr1-dev
35f859b338c0922094ecfc37fb8157530df6b305 10-Jul-2012 Patric Frederiksen <patric.frederiksen@sonymobile.com> Shutter sound is heard at the end of the recorded video

On fast hardware, which is more common, the shutter sound is
played and recorded before video recording is stopped.

Before we call play shutter sound before calling stop recording.
With this fix we call play shutter sound after calling stop recording.

Change-Id: I06a3e65fd2700f1d2457fea5ff0f64500eac436f
ameraClient.cpp
428b77a2b94b74665a47375b3fdb893b98d71269 30-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Improve formatting of debugging dump

Bug: 6243944
Change-Id: Id8730357f3adcd96923132f9f702e296e0dfd357
amera2Client.cpp
amera2Device.cpp
ameraService.cpp
836b81f3c5a5bacb800f698f90ded6bd6e6bc5ce 27-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Improve threading safety

Merge mutex lock for accessing internal parameters with the parameter
structure, forcing a lock to be held before the parameters can be accessed.

Bug: 6243944
Change-Id: I86e44f395de0d80ff7c3ff3530f25b60015512d2
amera2Client.cpp
amera2Client.h
803cbf6190f16f7b2c43cbc51d0df21ec888abdd 26-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use more buffers for video encoding.

To avoid starvation, set the number of simultaneously available buffers
to the encoder to 8.

Bug: 6243944
Change-Id: I6d0e9f3c0426d62d374c0ae0d427bf5189141adf
amera2Client.cpp
amera2Client.h
78822d73af1e7f6b8b297fc7f98ef7f8257cc10a 19-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Revamp recording support to allow opaque formats.

- Avoid memcpy of buffer data by using metadata mode
- Temporarily add MediaConsumer BufferQueue class

Bug: 6243944
Change-Id: I7a8c4222b7dbd14f1b1d86fda06d38eb640e87c1
ndroid.mk
amera2Client.cpp
amera2Client.h
ediaConsumer.cpp
ediaConsumer.h
2267106c98f461b730c772a913da946c391a178c 21-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Stop preview: Wait until HAL is drained

Once camera returns from stopPreview, all preview activity needs to
have stopped. So wait until that's true.

Bug: 6243944
Change-Id: Ifa6cf171bd69015883e26dafb1e49e5ac098025a
amera2Client.cpp
9e4c3db01ba4eb1e5acbed113f78a31374900df6 20-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add more verbose logging

Until ATRACE works in emulator, add more verbose logs to help debugging

Bug: 6243944
Change-Id: Ic5fbf764f2717e5edd05d37e0f7d826f1d494179
amera2Client.cpp
amera2Device.cpp
898a9a9b867e5d209671feee4c92266f90a55aa3 20-Jul-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Fix recording bugs

- Release recording stream on shutdown
- Return recording gralloc buffers to queue when they are received by
camera service after recording has been stopped (which is normal
behavior thanks to pipeline latencies in camera pipelines)

Bug: 6243944
Change-Id: Ia13a501c726613fd1e404733456dbd10d7b00132
amera2Client.cpp
f5926136ad328e95a79336b051d6f853443eaab9 17-Jul-2012 Eino-Ville Talvala <etalvala@google.com> CameraService: Add more information to service dump.

Add dumpsys information even when there's no active client. Including:
- Camera module version / name / author
- Number of camera devices
- Static information for each device

Change-Id: Ib97e325f6be5f989b342d24f1ae17aa9e796f8ed
ameraService.cpp
9cca4c6d976d2d4127286e9eaa54d1b99880c25c 16-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add recording support

- Support startRecording/stopRecording
- Support lock/unlock/connect
- Some rearrangement of class definitions for clarity/consistency

Bug: 6243944

Change-Id: I00c600a798572d2f69bb3f2bab3d79e4bd9a91e5
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
1e5b2b3361ddd07259bf4b29820ca4aa5f3a861b 14-Jun-2012 Jamie Gennis <jgennis@google.com> Update ANativeWindow client code for sync

This change updates all the uses of ANativeWindow to use the new ANW functions
that accept and return Sync HAL fence file descriptors.

Change-Id: Id7db42d8d6380f8b440d88476ce9211c6225fb16
ndroid.mk
amera2Device.cpp
ameraHardwareInterface.h
2c08dc66c2980a50e90befe84f836b7ebf17fe94 15-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Move per-frame verbose logs to separate log enable

Bug: 6243944
Change-Id: I5850f8ceb2e603aa555cc71328f64d6a928694a0
amera2Device.cpp
c94cd19694ea0befe2eb22735c50b00070f006d9 15-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Handle preview orientation changes.

- Process sendCommand(CAMERA_CMD_SET_DISPLAY_ORIENTATION)

Bug: 6243944
Change-Id: I92d3bb13312d475703325230487d660a1cb7e0e5
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
be0573b93e2d6fa133579c885583af9ed16bc29d 15-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Connect camera parameters to HAL request entries.

- All fields in Camera.Parameters are mapped to HAL2 entries, and
communicated to the HAL.

- Preview stream properly updated on parameter changes

- Slight code rearrangment for improved clarity

Bug: 6243944
Change-Id: I2a1db5c148809a62ba3524fb659dd6065affff8e
amera2Client.cpp
amera2Client.h
11b7cdef9726f8270f12f6c393600e8fb3c469de 15-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Minor parameter restructuring

Will make it easier to update HAL-level parameters.

Bug: 6243944
Change-Id: I3acac3c532de440d46755ce3e1d819ad5ed2e106
amera2Client.cpp
amera2Client.h
3297daae9681004775012faba9181d65e097e00c 14-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add more dump information, connect HAL device dump

Bug: 6243944
Change-Id: I79a302f68786d815b9ab9984dbb31d237522416b
amera2Client.cpp
amera2Device.cpp
amera2Device.h
bfe00d2e46531ef546cd9422a4d533070cbed8af 14-Jun-2012 James Dong <jdong@google.com> am cc0df657: am e20435de: Merge "Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/" into jb-dev

* commit 'cc0df657cdc8316c2b816c562f269be1706f00ea':
Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/
3d51d5cb53cc630709a0ba78d0e60501a675f2d5 13-Jun-2012 James Dong <jdong@google.com> Add NOTICE and MODULE_LICENSE_APACH2 to libs build under /frameworks/av/

Change-Id: I0a3af3e2abdedebd5934f3d941d01c32cfc75e26
related-to-bug: 6647465
ODULE_LICENSE_APACHE2
OTICE
4ecfec32aca8749baeb634f7c961f804cb1e8f3e 13-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Improve error checking and debug logs.

Bug: 6243944
Change-Id: Ie61d89b733af7d1f653443bf64b767456127a455
amera2Client.cpp
amera2Client.h
amera2Device.cpp
d4bcfde6bf3e7b28e36f6ec66e6d9e5adebfa949 08-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Still image support

- Add stream / request creation for still image capture
- Add takePicture call
- Add callback handler
- Fix shutdown bugs (wait until requests have drained)

Bug: 6243944

Change-Id: Id73eb7090e61b40b90348d1eb262f641ea5f3229
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
6ed1ed1b3aa6fe01a72fa1c9fea3d6946adc3048 07-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Copy metadata buffers for streaming.

Using the passed-in buffer directly is incorrect; copy them so that
concurrent access can be controlled, and ownership is clear.

Bug: 6243944
Change-Id: Iad22c0dc166b7739e6c5dbfa39aac631b974c95a
amera2Device.cpp
amera2Device.h
bd4976a1651d5973836454f8a56871226ec000b5 07-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Improve ANativeWindow handling

- Properly set up scaling mode and transform on stream create
- More error checking/verbose logs on enqueue/dequeue

Bug: 6243944
Change-Id: Ic814e7f84a2016ed46ee2eb6832474f741f7cfd1
amera2Device.cpp
bd47b7bcfe7f5a97fef81143f4282c41590626fe 07-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Minor bugfixes and cleanup

- Use CameraParameter-defined enum strings instead of writing our own
- Remember last window binder sent properly

Bug: 6243944
Change-Id: I68b1d042becaa6ebb4776fd2865dc0a29db7b87e
amera2Client.cpp
6861a4e9f929c2cb4a3131244e01e676c5b28f55 07-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add setParameters call

- Validate new parameters and transfer to internal parameters

- Add several utility functions to convert between CameraParameter
strings and camera2/internal parameter enums

Bug: 6243944
Change-Id: I323798dbfa028066f4963a6357766a781dde7cb6
amera2Client.cpp
amera2Client.h
ac45eb3dfa7347f7b8c98be1111b2a5f9e344c46 07-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add basic concurrency guards.

- Serialize access through ICamera interface
- Serialize access to internal parameter structure

Bug: 6243944
Change-Id: I82c9811c1d059b2bca5cca7e3d73890120dbbe59
amera2Client.cpp
amera2Client.h
7f61084a428a5c7afbeff2fa9e9839baf9018020 07-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Add internal parameter state to dump.

Bug: 6243944
Change-Id: Id02943001ef92a9c5717b295eb4af1a18669b08b
amera2Client.cpp
amera2Client.h
3cca136b73b0f4d058019230eb2070cc23e2bbb0 07-Jun-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Use new param structure, improve static camera info queries

- Stop using CameraParameters for internal parameter storage, use a
straightforward structure instead.

- Improve querying for camera static characteristics for creating
defaults for API-facing CameraParameters.

Bug: 6243944

Change-Id: I965cdca7b242ef10ac1be931ebe7c186f997bb63
amera2Client.cpp
amera2Client.h
a189097d0c96fac9afa86e644312ffbb0027b124 31-May-2012 Eino-Ville Talvala <etalvala@google.com> Camera2: Switch to using ATRACE

Bug: 6243944
Change-Id: Ib2aa1875c72b20ae764d9de95b4122b736738df2
amera2Client.cpp
6db981c45a964f0d9df4c3451f064dff7954d78e 22-May-2012 Eino-Ville Talvala <etalvala@google.com> Camera service: Minimally functional preview for camera 2 devices.

- Camera app starts up
- Basic preview operation with defaults
- Shutdown sequence is very minimal

Bug: 6243944

Change-Id: I67673b7c1fc08956d218d99f9171e74a7a82bf07
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
611f61998863d3a3ffae4e5f2b723b7319c59ddf 31-May-2012 Eino-Ville Talvala <etalvala@google.com> Add basic Camera2Client dump, minor fixes to CameraService dump.

Bug: 6243944
Change-Id: I52caaa6146050c38976768e99b0eeea1d13a3f51
amera2Client.cpp
ameraService.cpp
f69c70ded4316ea3ee504ac779bd024433ed4ef7 21-May-2012 Eino-Ville Talvala <etalvala@google.com> Camera service: Initialization for camera2 clients and devices

- Refactor initialization code to hide device type from CameraService
- Add metadata queue class to Camera2Device
- Initialization of Camera2Device, Camera2Client
- Conversion from HAL2 device static metadata to camera API
parameters.

Bug: 6243944
Change-Id: I524145b45438e906d8493dae202704ce8f090aeb
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
ameraClient.cpp
ameraClient.h
ameraService.cpp
ameraService.h
09cf462a265c3e9bc84c518cc75d77a5b1d69012 29-May-2012 Eino-Ville Talvala <etalvala@google.com> DO NOT MERGE: Minimal fix for takePicture/previewCallback deadlock

- Caused by already held lock in camera service

- Introduce one more lock, mICameraLock, to control access to camera
client through ICamera binder interface.

- mLock is released before calling HAL takePicture, allowing HAL
callbacks to access camera client during takePicture processing.

Bug: 5804701
Change-Id: Ibcef4857a2c844c964afefa70f9cdccdd0a55fd0
ameraService.cpp
ameraService.h
61ab9f93315ea817cd1ac110e2a95da4dab6b4d1 17-May-2012 Eino-Ville Talvala <etalvala@google.com> Camera service: Add skeleton support for camera2 devices.

- Add Camera2Client, which maps the current android.hardware.Camera
API to the new camera2 semantics
- Add Camera2Device, a C++ wrapper for the HAL camera 2 device

No functionality besides create/destroy; all client methods return
error or null.

Bug: 6243944
Change-Id: I6bd5136fa1efd8279b8cd2d9847d9b0bb2862294
ndroid.mk
amera2Client.cpp
amera2Client.h
amera2Device.cpp
amera2Device.h
ameraService.cpp
ameraService.h
44631c2939369e66df7021b1f359ded319971d26 17-May-2012 Eino-Ville Talvala <etalvala@google.com> Merge "Break out CameraClient from CameraService."
5e08d60617fc63c2e41f9069ff89f5c00db2617d 16-May-2012 Eino-Ville Talvala <etalvala@google.com> Break out CameraClient from CameraService.

To allow for different low-level implementations of the current camera
API, the Client class inside CameraService has to be inheritable. This
change breaks it up into the common section accessed by the camera
service, and the full implementation for camera device HAL version 1.

The full implementation is moved out to CameraClient.h/.cpp.

There are no functionality changes, just code reorganization.

Bug: 6243944
Change-Id: I8a79b31a3ae3617198dc6bb5576a9f2e2d9c95de
ndroid.mk
ameraClient.cpp
ameraClient.h
ameraService.cpp
ameraService.h
ba3c33da6a8ecda13e584c617f3ae9a06a27fbaf 17-May-2012 Eino-Ville Talvala <etalvala@google.com> Remove old fake camera.

The fake camera implementation was moved to the emulator a while back.
No reason to keep around this old broken code that's not used
anywhere.

Change-Id: I5dd87f766821d6e85c5eefb7122047d4ec4a3225
ameraHardwareStub.cpp
ameraHardwareStub.h
annedJpeg.h
akeCamera.cpp
akeCamera.h
08ad5efcef90e24db2863c0f85972ed05fe848a2 18-Apr-2012 Wu-cheng Li <wuchengli@google.com> Remove new camera connect API.

Applications are not resumed under the lock screen now.
This API is not needed anymore.

bug:5584464
Change-Id: I115daf6b647348617ec0fc05b626878c945b9b29
ameraService.cpp
ameraService.h
d8973a71a3d1dd670e5dcdf6e94ec0cd45444eec 28-Mar-2012 Keun young Park <keunyoung@google.com> Fix deadlock in camera destruction after client app's crash

* why deadlock happened: when an app (CTS camera test) crashes while using
camera, its binder is closed and reference counter is decreased. If camera
is inside callback, sp<Client> inside callback will hold the Client instance,
and Client instance is destroyed when the callback ends as sp<Client> to hold
it no longer exists. The destructor of Client instance tries to clean up
camera H/W which tries to stop threads created by camera HAL including the
thread context where the callback is running. This causes deadlock where the
callback thread itself is waiting for itself to terminate.
Note that the deadlock will not happen if camera callback is not active. In
that case, closing of binder will force the destruction of Client instance,
and the destruction happens in binder thread.

* Fix: Forces Client descruction in binder thread
- remove sp<Client> from callbacks to prevent destruction in callback context
- add client lock to allow callback to use raw pointer safely. This prevents
the destructor from deleting the instance while callback is using it.
- add status change inside destructor with client lock to safely destroy Client

Bug: 6214383
Change-Id: Ic6d6396d4d95ce9e72a16ec2480ae65c100fe806
ameraService.cpp
ameraService.h
b12153e36ae5e514d96c77d660b327d1a8f5000f 16-Mar-2012 Glenn Kasten <gkasten@google.com> Add libmedia_native

Change-Id: Ib8cff8abd73723b793f08da99ad59549f219e0e7
ndroid.mk
2fd2440d0175ca3e196b01b7541a9e0d4ed9a694 24-Feb-2012 Wu-cheng Li <wuchengli@google.com> Add a new camera open API that allows taking the ownership.

The purpose is to let face unlock always get the camera
successfully. What happened was the camera applications may
have opened the camera in onResume under the lock screen.
This API lets face unlock take the camera from the camera
application. A new permission will be added, so other
applicatoins won't be able to take the camera from the face
unlock.

bug:5584464

Change-Id: Ib3d9dcbc2161815b68db42327dc01148453704c6
ameraService.cpp
ameraService.h
df712ea86e6350f7005a02ab0e1c60c28a343ed0 26-Feb-2012 Mathias Agopian <mathias@google.com> fix libgui header location

Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
ameraHardwareInterface.h
ameraService.cpp
9eeafeb52fecf90882e9b44eeefcb7c3e16aa915 25-Feb-2012 Mathias Agopian <mathias@google.com> remove dependency on android_native{s_priv|buffer}.h

Change-Id: Ie4b95f7061c240f37c504414259f92d72c4ffc89
ameraHardwareInterface.h
9f3d5919b45c360f88510f7455279aebe810d56b 26-Jul-2011 Eino-Ville Talvala <etalvala@google.com> Add ANativeWindow timestamp support to camera service.

This allows the camera HAL to set ANativeWindow timestamps, which
are used by SurfaceTexture.

Bug-Id: 5081132
Change-Id: I123ea4c9d1824fb72146fad81ad03d1491e0a7f8
ameraHardwareInterface.h
29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
ameraHardwareInterface.h
ameraHardwareStub.cpp
ameraService.cpp
0e5ace70ca8067fc2c3259fe041352d1dab7e1e2 07-Jan-2012 Eino-Ville Talvala <etalvala@google.com> am 4bc873e6: am 7944704e: Merge "Switch camera sounds to always use the system enforced audio stream." into ics-mr1

* commit '4bc873e6ff73200af866f8c9efca66ad8ed23682':
Switch camera sounds to always use the system enforced audio stream.
60a78ac9535878984b0777788760b9ee7465c5e6 06-Jan-2012 Eino-Ville Talvala <etalvala@google.com> Switch camera sounds to always use the system enforced audio stream.

Instead of picking between the music stream and the enforced audio
stream, change the camera service to always play sounds through
enforced system stream. Also update the currently-hidden CameraSound
API to match.

Bug: 5778365
Change-Id: I3cc64b1d1ff567dbac8020a665d5b19846197ff3
ameraService.cpp
ameraService.h
5ff1dd576bb93c45b44088a51544a18fc43ebf58 06-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/157065

Bug: 5449033
Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
ameraService.cpp
df64d15042bbd5e0e4933ac49bf3c177dd94752c 04-Jan-2012 Steve Block <steveblock@google.com> Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156801

Bug: 5449033
Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
ameraHardwareInterface.h
ameraService.cpp
b8a805261bf0282e992d3608035e47d05a898710 20-Dec-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/156016

Bug: 5449033
Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
ameraHardwareStub.cpp
ameraService.cpp
d620506220a15177942a8168d09c517740e908d0 14-Nov-2011 Wu-cheng Li <wuchengli@google.com> Add camera focus move callback.

bug:5534973
Change-Id: Iaadcb2738ad040f94849be30ee531326f6199431
ameraService.cpp
3856b090cd04ba5dd4a59a12430ed724d5995909 20-Oct-2011 Steve Block <steveblock@google.com> Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE

See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
ameraHardwareInterface.h
ameraHardwareStub.cpp
8888a75f01d904541e409e858d23e4150ace34b6 20-Oct-2011 Chih-Chung Chang <chihchung@google.com> Fix 5487571: Make sure shutter sound is played when it's enforced

Change-Id: I0c7adf452217b8308243836b40b1fba8f2029240
ameraService.cpp
ff4f55c8d77e276dbcceedb4e560ca1d91ba38ba 17-Oct-2011 Chih-Chung Chang <chihchung@google.com> Fix 5468644: Use the proper audio stream type to play sound.

Change-Id: I80dd37da277b1810959a2dbdd852078b26f70cf5
ameraService.cpp
ameraService.h
5861a9a98c641261c4807c976c750e4611b3a57d 06-Oct-2011 Tyler Luu <tluu@ti.com> Add initialize method to CameraHardwareInterface

Add intialize() method to CameraHardwareInterface so we can
return a proper error value to CameraService if open of camera
hardware module fails.

b/5405235

Change-Id: I09c627034ddd22a5753c5163392c4fcff301e0b9
Signed-off-by: Tyler Luu <tluu@ti.com>
Signed-off-by: Iliyan Malchev <malchev@google.com>
ameraHardwareInterface.h
ameraService.cpp
6c904e26d4cd7a79f589e613fa7b2866a9fccb15 07-Oct-2011 Chih-Chung Chang <chihchung@google.com> Merge "Allow shutter/recording sound to be adjusted unless it's forced."
b9f588677910cac6ffc0346092bfcfe1c6620b90 07-Oct-2011 Wu-cheng Li <wuchengli@google.com> Allow Camera.setDisplayOrientation to be called when preview is active.

bug:5422679

Change-Id: I4c936ab00428fc158b5947fe8f10b1028869bbdb
ameraService.cpp
90f4bc2a3d361252df898fa31a99f4120aeefb27 07-Oct-2011 Chih-Chung Chang <chihchung@google.com> Allow shutter/recording sound to be adjusted unless it's forced.

Change-Id: I7080d5f50a87f92c8e9395d4cf8f927a6760fa70
ameraService.cpp
a8e409f8f9b40737d0b03355894b5e141d0aff6b 30-Aug-2011 Wu-cheng Li <wuchengli@google.com> Add video snapshot camera parameter.

The API is still hidden.

bug:5187868

Change-Id: I59e1b5774ca32be049723d1a0887faa90d8884bb
ameraService.cpp
57c86189bc07d9ccb0fd044e66df736d0bf19639 29-Jul-2011 Wu-cheng Li <wuchengli@google.com> Pass camera frame metadata from camera service to Java.

bug:4460717
Change-Id: I2fae6e1dfca6b8f3a5ee5716fc7817f5417bf657
ameraService.cpp
ameraService.h
c3da3434cb57f47284ea06bb9065eaa2fe033efb 30-Jul-2011 Mathias Agopian <mathias@google.com> connect/disconnect is now called from our EGL wrapper

the original connect/disconnect hooks are deprecated
and replace by api_connect/api_disconnect. the original
hooks are no no-ops.
api_connect/api_disconnect is now only called from the
android framework.

Bug: 5057915
Change-Id: I8ca64cd1acd6cabf915bf54689ec2e5f6dfa495a
ameraService.cpp
ff09ef8f18eed29bce50c7817df2fd52d2b50cf6 27-Jul-2011 Wu-cheng Li <wuchengli@google.com> Add frame metadata parameter to camera data_callback.

bug:4460717
Change-Id: Ib47d7d7df20af8155a719f3dabefe030893bfebc
ameraHardwareInterface.h
ameraHardwareStub.cpp
ameraService.cpp
ameraService.h
85fb61eb8b39d4d3fcebc796c3f7ade1d58567aa 27-Jul-2011 Iliyan Malchev <malchev@google.com> libcameraservice: call put_parameters on camera HAL

Change-Id: I492d1034ade50f9e157141debaa9783a90a04a91
Signed-off-by: Iliyan Malchev <malchev@google.com>
ameraHardwareInterface.h
2cd60e3069e93c11676019c8405d3941cd2ac5b7 19-Jul-2011 Wu-cheng Li <wuchengli@google.com> Merge "Disconnect the native window in CameraService::Client::disconnect."
7574da5a501fc9289fee49fdaf1fdb9d47dae2b6 19-Jul-2011 Wu-cheng Li <wuchengli@google.com> Disconnect the native window in CameraService::Client::disconnect.

bug:5048372
Change-Id: I6886907a672ddf5580b988ca5bc13e3dc26d4385
ameraService.cpp
9bc7af17974f448291a44912566ec7472a0d798b 19-Jul-2011 Mathias Agopian <mathias@google.com> use SurfaceTexture new scaling mode in SF

SF now obeys SurfaceTexture's scaling mode instead
of inferring it from the buffer's size

Change-Id: I4d50e9851abedd7e64bfcfc8af9eefb9fb668529
ameraService.cpp
630e65cc858d7592446c5f9174e713e29d58588b 19-Jul-2011 Jamie Gennis <jgennis@google.com> Merge "CameraService: (dis)connect from preview windows"
0ed3ec00d0242c9dc77532fe0cf0082645b6662c 14-Jul-2011 Jamie Gennis <jgennis@google.com> CameraService: (dis)connect from preview windows

This change makes CameraService connect and disconnect from preview
windows (Surfaces and SurfaceTextures) that get set.

Change-Id: I726971688367d5ce0d9aa90c44168037bce33deb
ameraService.cpp
ameraService.h
619d29fa1f5efab134441418d82a82a573b4de46 09-Jul-2011 Jeff Brown <jeffbrown@google.com> Eliminate single-process mode.
Bug: 5010576

Change-Id: Id450dc83efed4897d1e4ff451530fed14457aace
ameraHardwareStub.h
1e06f435434681f8750cc21763868fd025e8480e 17-Jun-2011 Sundar Raman <sunds@ti.com> CameraService: Decouple dequeue and lock

Decouple lockBuffer from dequeueBuffer. Add lock_buffer to preview_stream_ops,
so HALs will be fully in charge of managing buffers.

Change-Id: I7b53487d618bdf08ba904c5a0f41af462a7ca773
Signed-off-by: Iliyan Malchev <malchev@google.com>
ameraHardwareInterface.h
4ca2c7c913f8bd4ada13aca56d36045d42d1e00f 01-Jun-2011 Wu-cheng Li <wuchengli@google.com> Add framework support for camcorder zoom.

The purpose of ICameraRecordingProxy and ICameraRecordingProxyListener is to
allow applications using the camera during recording.

Camera service allows only one client at a time. Since camcorder application
needs to own the camera to do things like zoom, the media recorder cannot
access the camera directly during recording. So ICameraRecordingProxy is a proxy
of ICamera, which allows the media recorder to start/stop the recording and
release recording frames. ICameraRecordingProxyListener is an interface that
allows the recorder to receive video frames during recording.

ICameraRecordingProxy
startRecording()
stopRecording()
releaseRecordingFrame()

ICameraRecordingProxyListener
dataCallbackTimestamp()

The camcorder app opens the camera and starts the preview. The app passes
ICamera and ICameraRecordingProxy to the media recorder by
MediaRecorder::setCamera(). The recorder uses ICamera to setup the camera in
MediaRecorder::start(). After setup, the recorder disconnects from camera
service. The recorder calls ICameraRecordingProxy::startRecording() and
passes a ICameraRecordingProxyListener to the app. The app connects back to
camera service and starts the recording. The app owns the camera and can do
things like zoom. The media recorder receives the video frames from the
listener and releases them by ICameraRecordingProxy::releaseRecordingFrame.
The recorder calls ICameraRecordingProxy::stopRecording() to stop the
recording.

The call sequences are as follows:
1. The app: Camera.unlock().
2. The app: MediaRecorder.setCamera().
3. Start recording
(1) The app: MediaRecorder.start().
(2) The recorder: ICamera.unlock() and ICamera.disconnect().
(3) The recorder: ICameraRecordingProxy.startRecording().
(4) The app: ICamera.reconnect().
(5) The app: ICamera.startRecording().
4. During recording
(1) The recorder: receive frames from ICameraRecordingProxyListener.dataCallbackTimestamp()
(2) The recorder: release frames by ICameraRecordingProxy.releaseRecordingFrame().
5. Stop recording
(1) The app: MediaRecorder.stop()
(2) The recorder: ICameraRecordingProxy.stopRecording().
(3) The app: ICamera.stopRecording().

bug:2644213

Change-Id: I15269397defc25cbbcae16abc071c8349c123122
ameraService.cpp
01bded1246cd770b54b8011527f5c29e1b5663e3 16-Jun-2011 Wu-cheng Li <wuchengli@google.com> Merge "Allow camera to be disabled via Device Policy Manager"
afcedc9e6f17d8213d9bd8f6c36643dcc816d0ef 11-Jun-2011 Iliyan Malchev <malchev@google.com> CameraService: return stide when dequeueing a buffer

Change-Id: I11c7f0b57f7d619cdc392b2d34c538ae898de7ac
Signed-off-by: Iliyan Malchev <malchev@google.com>
ameraHardwareInterface.h
26adde897188059057b3ffcfde1d60171fc6888c 07-Jun-2011 Iliyan Malchev <malchev@google.com> frameworks/base: updates for camera HAL memory management

-- when the camera HAL allocates memory
-- it requests is as N buffers by S bytes each
-- it may specify a file descriptor to get mmapped; if -1, then we use ashmem
-- when issuing data and data-timestamp callbacks, the camera HAL specifies a
buffer index
-- range checking is performed on the buffer indices
-- memory requested by a camera HAL is not incStrong'ed, and needs to be
expliciftly released by the camera HAL (by calling the release method on the
camera_memory_t handle)

Change-Id: I0f09603aa786c238590e7288388ab673787e6032
Signed-off-by: Iliyan Malchev <malchev@google.com>
ameraHardwareInterface.h
a3355430a36bbfa7b2c0d90eb30834f1c5dac337 20-May-2011 Wu-cheng Li <wuchengli@google.com> Allow camera to be disabled via Device Policy Manager

bug:4185309

Change-Id: I8be89d892b8f540fd05913c93f97b92346a0a282
ameraService.cpp
8ce2364512f7c32c824f5ec5719688830ba72427 01-May-2011 Iliyan Malchev <malchev@google.com> frameworks/base: android_native_buffer_t -> ANativeWindowBuffer

Change-Id: Idc2eabaa805bb6d308ebb315872623f28d428417
Signed-off-by: Iliyan Malchev <malchev@google.com>
ameraHardwareInterface.h
8951a97b1f8462c37e740ea5082eea0445d2c501 15-Apr-2011 Iliyan Malchev <malchev@google.com> frameworks/base: switch CameraService to a HAL module

This patch changes CameraService to load a camera HAL module, instead of
linking directly against a library that implements the CameraHardwareInterface
class.

CameraHardwareInterface no longer defines the API to the camera HAL. Instead,
this is now in HAL header hardware/camera.h. We keep CamerHardwareInterface as
a class local to CameraService, which wraps around the new HAL calls. In the
future, we may remove this class entirely and have CameraService call the HAL
methods directly.

Change-Id: I5c61ac40078fc0b50bbac5881a556fe6c8837641
Signed-off-by: Iliyan Malchev <malchev@google.com>
ndroid.mk
ameraHardwareInterface.h
ameraService.cpp
ameraService.h
9e626526453f91999bdf3de4c2ec8e55c5d90511 15-Apr-2011 Iliyan Malchev <malchev@google.com> frameworks/base: include system/core header camera.h in Camera.h

We define struct CameraInfo in this camera/Camera.h, even though an identical
struct camera_info is defined in hardware/camera.h (but not in
hardware/camera_defs.h). We may not export struct definitions from the HAL
into headers which may find their way into the NDK.

This commit also renames FRAME_CALLBACK_FLAG_xxx to CAMERA_FRAME_CALLBACK_xxx.

Change-Id: I3e2ddd01d61bf5371ff2fc1a397995e0f1ee11f8
Signed-off-by: Iliyan Malchev <malchev@google.com>
ameraService.cpp
fce7a473248381cc83a01855f92581077d3c9ee2 20-Apr-2011 Dima Zavin <dima@android.com> audio/media: convert to using the audio HAL and new audio defs

Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5
Signed-off-by: Dima Zavin <dima@android.com>
ameraService.cpp
8b1027d3f873fc15c70f8645f1856936b69241a4 06-Apr-2011 Mathias Agopian <mathias@google.com> remove more unused references to ISurface

Change-Id: I2201f1ca2bb8f203a081d94a0134f798778dfbef
ameraService.cpp
ameraService.h
108dddf924d714c811dd565b8f4c7a0178cca2f2 29-Mar-2011 Iliyan Malchev <malchev@google.com> frameworks/base: some camera-interface cleanup

Methods getNumberOfVideoBuffers() and getVideoBuffer() as well as struct
image_rect_struct are no longer used (instead, the necessary information is
passed through ANativeWindow.)

Change-Id: If4b11446fc9ccbde1f6b45bc70c0d0b8e54376eb
Signed-off-by: Iliyan Malchev <malchev@google.com>
ameraService.cpp
ameraService.h
5f7fcf29a7475a20cf38bf72da67746135d504c3 26-Mar-2011 Mathias Agopian <mathias@google.com> merge libsurfaceflinger_client into libgui

this is the first step in unifying surfacetexture and surface.
for this reason the header files were not moved, as most of them
will eventually go away.

NOTE: currently we keep libsurfaceflinger_client.so as an empty
library to workaround prebuilt binaries wrongly linking against
it.

Change-Id: I130f0de2428e8579033dc41394d093f4e1431a00
ndroid.mk
8eb69d60c09c1c4683066a94c889df28d0e9d233 17-Mar-2011 James Dong <jdong@google.com> Fix missing AOSP copyright headers for more files

o Update the copyright date on InputDispatcher_test.cpp and InputReader_test.cpp
because these two files were moved from other places to the current location,
and were actually created in 2010.

bug - 4119349

Change-Id: Ic93b81ddafb58e9e72a2e9e02ca3d9f173d6dca7
annedJpeg.h
e468ac57f6e8afc6078c76d4eb1ac327112a3de0 18-Feb-2011 James Dong <jdong@google.com> Application-managed callback buffer support for raw image

bug - 3292153

Change-Id: I9789f7c5cde3a3889d7375e881181e9152d95fc2
ameraService.cpp
ameraService.h
bfa33aae4f54c0020a0568b16a3acb7b30b6ca3d 20-Dec-2010 Jamie Gennis <jgennis@google.com> Add camera service support for SurfaceTexture.

This change enables the use of a SurfaceTexture in place of a Surface as
the destination of camera preview frames.

Change-Id: Ic70d404c8fe261e9d5da6f1de93d6babb5b191cb
ndroid.mk
ameraService.cpp
ameraService.h
986ef2ad4c96952711d87af481f3afb40aa10775 09-Dec-2010 James Dong <jdong@google.com> We requires camera hal's implementation should not track the ref count of any outstanding video frames and ignore
releaseRecordingFrame() call after it receives disableMsgType(CAMERA_MSG_VIDEO_FRAME).

Change-Id: I2ecb9b3b11dab6bf868ccf8effda1b8df5bcde3c
ameraService.cpp
03dfce9672b36c1a334959a602f909b8410bec50 08-Dec-2010 Mathias Agopian <mathias@google.com> remove support for PUSH_BUFFER surfaces and overlays

the same functionality is now supported through
the h/w composer HAL, and YUV support in the GPU.

Change-Id: I8146605449954b8e8fd7f78810b7d873c2d8f5bf
ameraService.cpp
ameraService.h
6baa5de62a91b151af7a19036706b3d45143a32e 07-Dec-2010 James Dong <jdong@google.com> Don't drop video frames but to release them.

bug - 3259009

Change-Id: Ib7634f10a7fe7b7ce7014b79b07957d194bae1a7
ameraService.cpp
e4db265e478bdac2381d85cf3dd41bbda14271b4 23-Nov-2010 Eric Laurent <elaurent@google.com> Revert "Temporary workaround for issue 3187563"

This reverts commit 065299b58d1c00cd24e442fa192561decf7b1fec.

The work around for issue 3187563 is not needed any more since the new kernel
DMA driver implementation (commit 7953250be7c9a1c3417e21b20032b571d495d218)
fixes the root cause.

Change-Id: Ibaac2826b63c8e5825ae2e5cab2fb2f0e51ab7b4
ameraService.cpp
e3aac34f9e0d825aaad597f70e2b3dcb615ef313 12-Nov-2010 Eric Laurent <elaurent@google.com> Temporary workaround for issue 3187563

The audio HAL does not always handle properly simultaneous input and output stream
state changes. This happens in particular when starting video record because output
stream starts and stops while input is active.

Temporary disable the video record jingle the time the audio HAL issues are solved.

Change-Id: I3b923d81af543a335deae9e22d7f396bb5791d91
ameraService.cpp
e09591eff55fdff1868b32c3e046c62f800330fc 14-Oct-2010 Wu-cheng Li <wuchengli@google.com> Mirror the camera preview if the camera is front-facing.

bug:3095272
Change-Id: Ib1c1d1edc06a33e9d4d2dcb42bc1dd2c25b1310c
ameraService.cpp
ameraService.h
e2ad6734eccc4b9ea7857c747ff9469a9c11ba09 19-Oct-2010 James Dong <jdong@google.com> Camera framework change required for 0-memcpy recording

bug - 3042125

Change-Id: I46eb7a10b5394086b353fd73e4503beceeed76f1
ameraService.cpp
ameraService.h
012716a857641a977afd16ff6be4bf66fc403884 08-Oct-2010 Wu-cheng Li <wuchengli@google.com> Fix camera display orientation.

bug:3036262
Change-Id: I6fc3dc381fcfaceba09fd5bd14afb85045b3d676
ameraService.cpp
ameraService.h
b36f2df1daf7e733be7c51f93792f8fc4252544c 28-Sep-2010 Wu-cheng Li <wuchengli@google.com> resolved conflicts for merge of 191a25e1 to master

Change-Id: I6f4940e337a992bf84e50bc1d22432593937499c
4a73f3da3501db6e95473a4a653d6319c6d618e2 24-Sep-2010 Wu-cheng Li <wuchengli@google.com> The old overlay should be destroyed if orientation changes.

Previously the orientation was wrong after suspend and resume.
When the camera app is resumed behide the lock screen, it
orinteation is portrait. When users slide to unlock the screen,
surfaceChanged is called and the orientation is landscape.
The camera app stops the preview, sets the display orientation,
and starts the preview. Overlay should be destroyed if the
orientation has changed.

bug:3031640
Change-Id: I38b527f9ea78c91b538463292152c023383b4695
ameraService.cpp
ameraService.h
3b7b358d1a45844ca427626554ff81f472fd1583 15-Sep-2010 Nipun Kwatra <nkwatra@google.com> Added command type to play recording sound.

Added CAMERA_CMD_PLAY_RECORDING_SOUND command type to play recording
sound through sendCommand. This is currently needed by time lapse
recording using still mode capture, which disables the shutter sound
but needs to play the recording sound.

Change-Id: I376aa40f45b6064fd862abc065456b06fc338020
ameraService.cpp
b5ca4618a722a21f084fe8bfc1c2992749ccd3f0 12-Sep-2010 Nipun Kwatra <nkwatra@google.com> Adding enable/disable option for sendCommand()

- Added enum CAMERA_CMD_ENABLE_SHUTTER_SOUND which corresponds to
command type for enabling/disabling shutter sound.
- The implementation checks if it is legal to disable shutter sound.
If it is, then any process can disable the sound. If not, then only
the mediaserver process is allowed to do this. Currently time lapse
capture needs this functionality to disable shutter sound when still
mode is used to capture time lapse video.

Change-Id: Id147a3bcc6a345c2c6a6d52bf98fd8292386bb19
ameraService.cpp
ameraService.h
0667de7038238c31af77865eb6d83c5ae9ca1b1e 04-Sep-2010 Wu-cheng Li <wuchengli@google.com> Only enable CAMERA_MSG_PREVIEW_FRAME when necessary.

Now camera driver uses ANativeWindow for display.
CameraService should not request preview callback from
camera hardware if applications have not requested it.

bug:2951018
Change-Id: I85f74ea4a61104feca018867bc9d6dfe3a9479f5
ameraService.cpp
3abe8d29864d3e8a9f40be43e5faa10e57a4fac5 01-Sep-2010 Wu-cheng Li <wuchengli@google.com> Remove setPreviewDisplay in CameraService::Client::~Client().

mSurface is released in destructor and setPreviewWindow(0) is
called in Client::disconnect(). setPreviewDisplay is not needed
in destructor.

bug:2964479
Change-Id: I329901659a2af407816c34e02f37143b28183a89
ameraService.cpp
8f3e6aa2951358c0dea593a2448171a3f97cc0eb 24-Aug-2010 Jamie Gennis <jgennis@google.com> Add the setPreviewWindow camera HAL API to the camera stub.

Change-Id: Ic669f9d5f5ae8f1fe5bd055f55aa4a18fa6d84cd
ameraHardwareStub.cpp
ameraHardwareStub.h
4b79168835965cf0fc41ebe2a367e22b4cb20d08 11-Aug-2010 Jamie Gennis <jgennis@google.com> Change the framework to use the new camera preview path.

This change makes the camera HAL interface take an ANativeWindow interface from
which all the camera preview buffers will be allocated. The framework code
running in application processes now passes a Surface object rather than an
ISurface to the camera server via Binder when setting the preview surface. The
camera server then forwards that Surface object (which implements the
ANativeWindow interface) to the camera HAL, which uses it to communicate with
SurfaceFlinger to allocate the camera preview buffers.

Change-Id: Ie438f721559cd7de5e4f848a26d96360dda07b5f
ameraService.cpp
ameraService.h
b7a67942823e8339eb298238f117aaa6d7b63111 18-Aug-2010 Wu-cheng Li <wuchengli@google.com> Handle the camera open failure better.

Check if camera hardware is NULL to avoid mediaserver crash.

Change-Id: Ibde0251f30bdb6b36a5d5380222d7be25ec9449c
ameraService.cpp
ameraService.h
9da2070b6d6d20550de7da61478c325f0928d020 30-Jul-2010 Jean-Baptiste Queru <jbq@google.com> resolved conflicts for merge of 27eecb70 to gingerbread

Change-Id: If064f2f4950fc1a4ff38e6927fe2120af76b26f1
5462fc9a38fa8c9dff434cd53fa5fb1782ae3042 15-Jul-2010 Mathias Agopian <mathias@google.com> added BinderService<> template to help creating native binder services

Change-Id: Id980899d2647b56479f8a27c89eaa949f9209dfe
ameraService.cpp
ameraService.h
65ab47156e1c7dfcd8cc4266253a5ff30219e7f0 15-Jul-2010 Mathias Agopian <mathias@google.com> move native services under services/

moved surfaceflinger, audioflinger, cameraservice

all native services should now reside in this location.

Change-Id: Iee42b83dd2a94c3bf5107ab0895fe2dfcd5337a8
ndroid.mk
ameraHardwareStub.cpp
ameraHardwareStub.h
ameraService.cpp
ameraService.h
annedJpeg.h
akeCamera.cpp
akeCamera.h