Notable fixes:
- Rework FrameProcessorBase so it accept and work with
offline sessions.
- Erase internal composite streams from offline stream list.
Bug: 135142453
Test: Camera CTS
Change-Id: I9dbc01e62fa94c1e0bfb84a8ddaa9e39ab4a7e34
When an app sets SCALER_ROTATE_AND_CROP to AUTO, the camera service
needs to select the right ROTATE_AND_CROP mode given the application
UI state at the moment, received from the window manager.
In addition, some of the metadata in the active array coordinate
system needs to be converted to/from the cropped+rotated coordinate
system to ensure roundtripping UI information works as before.
Also ensure that the available rotate and crop metadata field is
always available, with a value of NONE if nothing else.
This commit adds support for doing the coordinate transforms and
overriding AUTO to a concrete value; it does not wire up a connection
to another system service to receive the correct override value, but
does add a command to set the override value for all current camera
clients.
Test: New CTS tests pass, unit tests for RotateAndCropMapper pass
Bug: 134631897
Change-Id: Icc45530e2cfbaf838a1e4d04e4fd2aef8122e8e1
Currently, we will set -1.0 as the default focal length for external
camera even if camera HAL provides the information. We should respect
the information if it is provided.
Bug: 141517606
Test: cts-tradefed run commandAndExit cts -m CtsCameraTestCases -t
android.hardware.cts.CameraTest#testJpegExif
Change-Id: Iae38ed0243a386187e29c5c4549d92ca24f58d0d
Bug: 136595429
Test: atest CtsAppOpsTestCases (now including two new test cases that
open a camera with a null and a non-null feature)
Change-Id: Idfb8f8049dff536525d4f081151c79d980d76c69
Depending on timing, legacy camera clients that try to
disconnect may observe a random delay while waiting
for the capture sequencer thread to exit from its
respective 'threadLoop'. The delay there can be as much as
'kWaitDuration'.
To improve the average disconnect latency use a separate
and much smaller timeout when managing idle state.
Bug: 143557484
Test: atest cts/tests/camera/src/android/hardware/cts/
Change-Id: I164b3d37182cac776c0064047a5ef5b5a0f8b314
This change renames the IMemory raw pointer accessors to
unsecure*() to make it apparent to coders and code reviewers
that the returned buffer may potentially be shared with
untrusted processes, who may, after the fact, attempt to
read and/or modify the contents. This may lead to hard to
find security bugs and hopefully the rename makes it harder
to forget.
The change also attempts to fix all the callsites to make
everything build correctly, but in the processes, wherever the
callsite code was not obviously secure, I added a TODO requesting
the owners to either document why it's secure or to change the
code. Apologies in advance to the owners if there are some false
positives here - I don't have enough context to reason about all
the different callsites.
Test: Completely syntactic change. Made sure code still builds.
Change-Id: I5fb99aa797c488406083178a6b05355d98710d3b
Camera preview stop only waits until the
current capture request is sent to Hal and
then immediately flushes the device.
Depending on timing and the pending request
queue size within CameraHal the current camera
client parameters may get flushed before
they are able to reach the end of the
processing pipeline.
Avoid this by waiting for the current request
id to appear in the incoming results.
Bug: 139330668
Test: Camera CTS, manual using application
Change-Id: I18de85557e8e76bfbe6d69b1eb2a5c36ed64e803
onBufferReleased is no longer reliable indicator of capture
error due to HAL buffer manager feature. Switch to listen
to error callback from HAL directly.
Test: API1 CTS + Pixel 3
Bug: 123952355
Change-Id: I7362942f19356583ec66f259b01e963a1af3a205
- Derive HEIC capabilities from camera HAL and media framework.
- Add HeicCompositeStream to encode camera buffers to HEIC buffers.
- Add ExifUtils to overwrite JPEG APP segments and send to media codec.
- Add NDK enums and corresponding format support.
Test: Camera CTS
Bug: 79465976
Change-Id: I0a885e76335f3eba4be0fd42241edb0b7349f284
Add the necessary logic to support dynamic depth metadata.
Bug: 109735087
Test: Manual using application,
Camera CTS
Change-Id: Ic4710872dc596bc718270e1c79d4da53fb850875
capture fps range depend on intent which is different between still capture and video snapshot.
Bug: 119841034
Change-Id: Ib7c653c5f32c451631f208bf7353c06340c43b18
Signed-off-by: Lei Yuan <leiyuan@asrmicro.com>
Currently we always sync using the latest request id
before standard capture. The purpose is to avoid
sending triggers and 3A mode settings out of sync to
Hal. However during regular capture the precapture
trigger is not always used so we should be able to
skip the device sync in this case. This can enable
capture requests to arrive in Hal with one preview
frame earlier.
Bug: 79682338
Test: Camera CTS
Change-Id: I9ea0b03968266d5c8f1e187358f13a21d394ff90
In case the camera device supports ZSL, avoid dropping
preview buffers while video recording is active. Preview
must not get interrupted in this case.
Bug: 117640175
Test: Manual using application, Camera CTS
Change-Id: I9021b4c46428e008298ddef0a86972640b0afa41
Merged-In: I9021b4c46428e008298ddef0a86972640b0afa41
(cherry picked from commit 6c79c9aa7f)
The legacy camera shim layer currently uses various heuristics
in order to determine valid supported preview/video/snapshot
sizes and formats. This makes the code complex and in some
cases the result is not optimal in terms of power and
performance. If the camera supports recommended stream
configurations, then use the suggested stream
configurations to generate the above supported lists.
Bug: 64029608
Test: Camera CTS
Change-Id: I6ed1d50b3d1a854421f3d119be2e32211e8a4c35
In case the camera device supports ZSL, avoid dropping
preview buffers while video recording is active. Preview
must not get interrupted in this case.
Bug: 117640175
Test: Manual using application, Camera CTS
Change-Id: I9021b4c46428e008298ddef0a86972640b0afa41
Add a wrapper around calls to IPCThreadState to
account for the fact that remote HIDL calls may use binder function
implementations internally.Therefore, we need to know whether we are on
a binder / hwbinder thread and call the appropriate IPCThreadState /
hardware::IPCThreadState function internally.
Bug: 110364143
Test: GCA
Test: Third party app
Test: camera CTS (no new failures).
Change-Id: Ibad03fafd2ccc53a5352a6df45cf8f641bc7a3bf
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Updating of the mDevice sp<> is racy.
This change will cause the Camera3Device object lives until
the client is destructed (which can be a few seconds after
camera app closed and GC kicking in to delete the client)
The benefit is the dumpDevice can remain lock free.
Also fix a problem where we call virtual function disconnect in
Camera3Device destructor.
Test: the double free problem cannot reproduce
Bug: 112639939
Change-Id: I77762db8f59cf33891631d13fc3bdb3830ae08fb
When shutter sound is ON, even if application calls takePicture
without CAMERA_MSG_SHUTTER, the camera service should still play
shutter sound.
Also remove the code using ro.camera.sound.forced since it's
not used any more.
Test: 3rd party app on device with enforced shutter sound
Bug: 111995040
Change-Id: I0d2e888b7f17eff5e5bff8d0f3ec3da7f7ad97b7
This is consistent with the default focal length set by the API1-HAL3
shim.
Test: Camera CTS, FOV test for CtsVerifier
Bug: 110445633
Change-Id: I4ecfb32c7cecdd9c56e04b25cf4d92a86122b2cb
Clients using the legacy API translation layer will
default to face priority scene in case this mode is
supported by the camera device.
Bug: 110259811
Test: Manual using application,
Camera CTS
Change-Id: I370f222c73ea6e133bb6cb334ced2e33a26bb8c5
FrameProcessor will always gather the complete 3A
state before notifying clients. This could introduce
unnecessary delays for camera devices that support
partial results. To avoid this check the pending 3A
state for each algorithm individually and notify about
state changes as soon as possible.
Bug: 110058858
Test: Manual using application,
Camera CTS
Change-Id: Ie197b2adcd884f1296f621f62cef8d53c9dc99c1
- API1 + HAL3: Enable HIGH_QUALITY correction for still capture use
cases, FAST for others
- HAL3: When distortion correction is enabled, map coordinate metadata from
corrected to original in capture requests, and from original to corrected
in capture results.
Test: Camera CTS
Bug: 79885994
Change-Id: I79e25d278fe69099770c749f42956fc8e878f7cf
ZSL frames were getting completely discarded in case of fixed
focus camera sensors. This can have performance impact for
legacy camera clients.
Bug: 80482772
Test: Manual using application,
Camera CTS
Change-Id: Ic98c8624226e960cffdcbfcee0b3e34adaf720fb
With the change to update slowJpeg flag on the fly, it becomes
possible a jpeg stream is deleted during active streaming.
Test: TestingCamera change still picture size from small to large
Bug: 72261327
Change-Id: Ia01b47926ab03cdfe1e0aa10fcf61ff984ba4e2c
The client API level should be part of the service proxy
notifications.
Bug: 68653614
Test: Manual using application
Change-Id: Id8a9fb51a8ba91795283c846b55a9343cf8505df
- Cleanup legacy camera_module_t callbacks
- Order API1 compatible cameras by their ID: numeric strings first
- Dynamically updating number of cameras when device is
added/removed
- Make sure the following methods are always called without holding
mServiceLock
- onDeviceStatusChange
- updateStatus
- addStates/removeStates
- Centralized all addState/removeState calls in onDeviceStatusChange
- Passing api1CameraId (number) and cameraDeviceId (string) to various
client classes.
- Allow FOV information to not present for external camera
- Update API1 preview/video size logic to exclude < ~30fps sizes
Bug: 64874137
Change-Id: Ied6b7141fdad30e3d1c3fcacc5b69ca350fdeb24