Only set FRAME_RATE to grid counts in case grid is used. In case grid is
not used (for example, in HEIC encoder case), set it to a predefined
value.
Test: Vendor testing
Bug: 140249376
Change-Id: I6b32bd435aa38f05004710ba667807ca841e4a5e
The previous logic was wrong(!) where DATASPACE_UNKNOWN shouldn't be
used as an initializtion condition.
Test: CTS and vendor testing
Bug: 139820060
Change-Id: I6b59d40ff796d48fe1804b45c189004f1ecc8c18
Bug: 133508924
Bug: 138135733
android.permission.CAMERA and android.permission.SYSTEM_CAMERA are both
required by a client process to access system only cameras.
Test: Advertise the back camera as system only;
1) don't give Camera2 SYSTEM_CAMERA permissions,
Camera2 can't connect to the back camera
2) give Camera2 SYSTEM_CAMERA permissions, Camera2 successfully
connects.
3) 3P app can't connect to any camera if all cameras are
advertised as SYSTEM_ONLY_CAMERAs.
Test: CTS CameraDeviceTest, CameraManagerTest
Change-Id: I0309462f962d9c8c92564ef6781b2aae1485a933
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
The HAL is allowed to notify RESULT_ERROR for physical sub-cameras.
Fix the condition check to allow absent physical metadata in such case.
Test: Partner testing and camera CTS
Bug: 138727686
Change-Id: I411a64d6fec2e06bc60a82fade65a02caab0ceca
Also remove the expected argument in addProviderLocked method as
we now can query from device manifest for instance names.
Test: manually modify Pixel3 manifest to test, CTS
Bug: 136010319
Merged-In: Ib57fd84ad8f22aac2a82920e03148cff2592daae
Change-Id: Ib57fd84ad8f22aac2a82920e03148cff2592daae
Replace the item MIME type with value supported
by the dynamic depth specification.
Bug: 138399780
Test: runtest -x
cts/tests/camera/src/android/hardware/camera2/cts/ImageReaderTest.java
-m testDynamicDepth
Change-Id: Ib51dd69e6de7da3269eccfa6b671fe95a269b4d6
This is to reduce application confusion when switching between back and
front cameras.
Test: Observe dumpsys on a phone with NIR camera device
Bug: 133141567
Change-Id: I0c11b99fc3a0304d54562548d109df8c56ba1db1
unlinkToDeath is no longer required, (this change in behavior is to
avoid leaks) so holding onto ActivityManager here (still calling
unlinkToDeath to avoid a log, but may for instance remove all
unlinkToDeath calls in the future).
Exempt-From-Owner-Approval: approval received on AOSP CL, only
whitespace difference here.
Bug: 134576445
Test: boot
Change-Id: I273f77aac2b80ba9be70197cc3842f83a11bbd1c
Original logic was comparing an overridden format int, switch
to use a const original format.
Test: partner device, Pixel 3 CTS
Bug: 136456900
Change-Id: I03d6e190770ee05e40446c417e323f546fdc2689
Also remove the expected argument in addProviderLocked method as
we now can query from device manifest for instance names.
Test: manually modify Pixel3 manifest to test, CTS
Bug: 136010319
Change-Id: Ib57fd84ad8f22aac2a82920e03148cff2592daae
By checking the expected duration for all inflight requests to
finish and only log when it takes more than a threshold (5 secs)
to process all inflight requests and the list is long.
Test: manual testing
Bug: 135927862
Change-Id: Iaa2c593f1e69f63b1da7d35d73c696de3510cd2c
Make sure 'jpeg_destroy_compress()' is always called
before leaving 'encodeGrayscaleJpeg()'.
Additionally fix misspelling of 'intrinsic'.
Bug: 135622974
Test: atest
cts/tests/camera/src/android/hardware/camera2/cts/StillCaptureTest.java#testDynamicDepth
--generate-baseline=12
Change-Id: I55c1f86881ba05aac6aac6981df5fcb276c9d4da
With the new dataSpace/format override logic, during
finishConfiguration, we shouldn't check mDataSpaceOverride flag anymore
because now mDataSpaceOverride will be true for reconfigure.
Instead, we should check if the new override is the same as old
override.
Test: testPrepare on HAL device with dataSpace override
Bug: 134800141
Change-Id: I1ddc258100dfd7e3c2cc86f9e476d8d52c710e3f
Since vendor native clients don't have package names, appOps reporting
would be inaccurate for them. In order to avoid that, we stop appOps
reporting for vendor clients.
Bug: 132718220
Test: AImageReaderVendorTest, use hal client for cameraserver, GCA(sanity)
Change-Id: Ie6f80e8ab530aa755df57f8d25d9f1a15a20d7f7
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Starting from HAL device version 3.5, the format and dataSpace for
IMPLEMENTATION_DEFINED pixel format uses original instead of overridden
values.
This makes HAL interface behavior consistent in that HAL doesn't need to
distinguish between first-time configureStreams and subsequent
reconfigure.
Test: Camera CTS and partner testing
Bug: 131864007
Change-Id: Ie5fdc7e9b6c11c1c96a069262b9458455855bcef
This patch fixes several issues:
* Change the timing the acquire fence FD is closed: we used to
close the FD when the buffer is returned from HAL. This patch
changes that to after the request is sent to HAL (or failed
to send to HAL)
* Cleanup inflight buffer map if the request fails to be sent to
HAL
* With the CL, the acquire fence FDs are now closed by
- HalInterface::processBatchCaptureRequests if the HIDL
processCaptureRequests call succeeds and HAL is running
in binderized mode (for passthrough mode the FD is owned
by HAL if the HIDL call succeeds)
- Camera3Device::cleanupFailedRequests otherwise
Test: Camera CTS tests
Bug: 132594861
Change-Id: I5f67ae9e7b8008738bd9a24246d754a6a3669b0c
We no longer have code path running non-HIDL interface.
This cleanup also simplifies some logic needed for fixing
b/132594861
Bug: 132594861
Test: Camera CTS
Change-Id: If15ea359a1a59c5a8e7a59818ce4db8120000bc4
Depth samples with low confidence can skew the
near/far values and impact the range inverse coding.
Avoid using such samples when searching for the near
and far points and clamp their values if necessary.
Bug: 132248813
Test: Camera CTS
Change-Id: I7dc134b50e46c664f9fc8750b9b9b37c416c9afe
Add below logical camera support to dumpsys:
- Physical camera id to stream info.
- Physical camera request/result metadata.
- Physical camera metadata in tag monitor.
Also fixed an issue of missing vendor tags in physical metadata.
Test: Run physical streams and observe dumpsys
Bug: 111940580
Change-Id: I02889b213ff5e7ec29506c0483ef40de9d107ccb
Override the oom_adj scores of vendor clients from to PERCEPTIBLE_APP_ADJ.
Override the process state of vendor clients to to PROCESS_STATE_PERSISTENT_UI.
This is in order for app processes to take priority over vendor clients.
For example, this could help in the case of the default camera app and
face auth contending for resources from the lock screen.
Bug: 132117718
Test: manual test on lockscreen, try to double press and open camera app
while a vendor client is connected to a contending camera device.
Change-Id: Ie5fabb59c876cb02eb706f3dda8f748c69e3c063
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
HAL ZSL request may be out-of-order compared to normal/reprocess
requests. Allow such case to improve shot lantecy.
Test: Camera CTS, 3P camera app sanity test.
Bug: 120604717
Change-Id: Id994efbe392094cdae694afaa2d159bc9c49d5f0
Also fix a issue for finishConfiguration is unintentionally
delayed till first capture request.
Test: Camera CTS + partner device testing
Bug: 126390310
Change-Id: Ibca740a7160cbf41e01884dbcef8ba51eb4c75f7
The clear function of vector will release memory,
so mBins will use overflow.
Test: enable asan for cameraserver
Bug: 131103281
Change-Id: Iaaa353332d7ac3992f018aa667fb8ef20a810f20
Signed-off-by: zhangshuxiao <zhangshuxiao@xiaomi.com>
- RAW capability can exist for multi-camera even if physical cameras are
of different sizes/capabilities.
- FOV for all processes streams must be the same regardless of logical
or physical streams.
- All metadata tags related to pixelArray/preCorrectionActiveArray/activeArray
needs to be mapped properly by the camera HAL.
- Do distortion correction mapping for physical subcamera as well.
Test: Build and read docs, camera CTS, ITS.
Bug: 118906351
Bug: 126220135
Change-Id: I29a61fc3a603561c1d74dc2261600ce4cd3d34cd
These things are ceaseless: /
code reviews, design docs - /
off-by-one errors making a mess
Test: atest CtsCameraTestCases
Bug: 129561652
Change-Id: I807d7ad4740ffe267053fe5da2080f9ecb45aa72
To improve camera launch performance, cache the proxy service
interface. System tracing indicates fetching the interface can take
up to 8-10 ms during real camera opens, which is a percent or two
of total camera startup time.
Test: atest CameraCtsTestCases
Bug: 130173970
Change-Id: Icdf5218b04f608b897dcbf2085f971b04a913f3b
For Camera1-HAL3 shim, the camera ID filtering logic is revised to
handle case of multiple logical cameras facing the same direction,
and are backed by same/different set of physical camera IDs.
Example 1 (all facing back):
ID1 = ID3 + ID4
ID2 = ID5 + ID6
Example 2 (all facing back):
ID5 = ID1 + ID2
ID6 = ID3 + ID4
In both examples, only ID1 will be advertised to camera1 app.
Test: Check cameras on devices with multiple logical cameras
Test: Camera CTS
Bug: 113705942
Change-Id: I76f370938b3311bbe7adcac8eddf8b6cf08e4571
1. Change Camera3Device logs to ALOGV
2. In Camera3OutputStream, only log before we mark stream state
to STATE_ABANDONED
3. Also changed BUFFER_ERROR log to ALOGV
Test: manually check log of GCA mode switch
Bug: 125415787
Change-Id: Ibd83b7010932a8be25d85573d9c9dce9c394f6bb
The physical camera device ID must be present as part
of the capture result extras in case of corresponding
result failure notification.
Bug: 128835627
Test: Camera CTS,
AImageReaderVendorTest
--gtest_filter=AImageReaderVendorTest.LogicalCameraPhysicalStream
Change-Id: I042af8bd85eaadd389b059c2833f352ceb2f40fc
Bug: 120407707
Test: CTS
Test: Use camera to take pictures / record videos (sanity)
Change-Id: I7b29c337d0e217d2eb6a62e2c75ccc550d795e61
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Additionally initializey the stream id to invalid negative
value in case the Hal tries to verify it during stream
combination queries.
Bug: 128450197
Test: Camera CTS
Change-Id: Ife058e22ef72ee84be82799ed397ca49cd8ea99f
Lazy loading of sound files can speed up camera startup more than 60ms,
it gives users a great experience. Many apps do not playSound when camera
open or they may use their own audio files. so we load audio files as needed.
Bug: 128432959
Test: install wechat app,open camera,use systrace to see the uiThread wait time.
Change-Id: I3b3697cf9d0d919b88276f6d8e7fdd84578f4fcd
Fix the long (>1s) dequeueBuffer call when a stream is managed by
Camera3BufferManager and its consumer end discards free buffers.
Test: CTS, no more long dequeBuffer call in GCA mode switch
Bug: 126054873
Change-Id: I03d6526b076796bb44f15cc2c4a092ff3d04fc1d
Camera service listeners must be able to receive
information about camera access permission changes.
Bug: 121379978
Test: Camera CTS
Change-Id: I2e13fdd35a267901a3caa0e0ce78ab1cea83e7ab
Return buffers managed by HAL buffer manager in disconnect.
Test: kill HAL process and check for buffer leak in cameraserver
Bug: 126889012
Change-Id: I83173c5eaae13ee11eb3f185e7204a2dd8855b4e
Set bufferSize in @3.4::Stream::bufferSize for JPEG_APP_SEGMENTS stream.
Bug: 124999074
Test: Build
Change-Id: I6f24f4273b0d3d18b1bdbf263fc12ed48e857004
Bug: 125464062
Test: GCA (sanity)
Test: Connect to a camera device using a HAL process, change the device user and connect again;
connection is successful
Change-Id: Ia25b961baa396fd383d089e400c6d877b9875955
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
Use libyuv's optimized CopyRow function to improve performance of YUV
tiling.
Bug: 124781199
Test: Camera CTS
Test: TestingCamera2 smoke test
Change-Id: I6af6678099655b7e35ddaccf7cd9aa817ec64a9c
Depth and confidence maps require physical rotation in
case the source color image has similar physical rotation.
The EXIF orientation value will be kept consistent and
set to 0 in case of physical rotation.
Bug: 123699590
Test: Manual using application,
adb shell /data/nativetest64/cameraservice_test/cameraservice_test
--gtest_filter=DepthProcessorTest.*
Change-Id: I5cdd41c89368a1841d53f2195790aa1b55258495
Depth and confidence maps should always use the same
EXIF orientation as the main color image.
Bug: 123699590
Test: Manual using application,
Camera CTS,
adb shell /data/nativetest64/cameraservice_test/cameraservice_test
--gtest_filter=DepthProcessorTest.*
Change-Id: I0d887798e8717cdff81aba10d595dc3ccfe99197
In case the Camera3Device enters a bad state, the
RequestThread can continue to run after disconnect()
completes. This can potentially cause instabilities
because some of the Camera3Device member variables
will become invalid after disconnect() but are still
accessible in code paths triggered by RequestThread.
Avoid using potentially invalid reference by checking
the respective strong pointer.
Bug: 123293729
Test: Manual using application,
Camera CTS
Change-Id: If3305840db89537593370b7f57bccbb257e49cbd
Use static and dynamic metadata to override Exif tags.
Also added back a missing ATRACE_ASYNC_ENDs statement.
Test: Camera CTS
Test: ERROR_BUFFER of internal streams is propagated to app
Test: ERROR_RESULT only results in EXIF not being overridden
Bug: 124066183
Change-Id: Id2c69c6bee04ae724ff5f190b2dd96d0159700c9
1. Fix off by one error in signalStreamFlush call
2. Make sure signalStreamFlush is called before we toggle request
thread idle (which might cause another thread finishing
waitUntilIdle() and thus start calling configureStreams)
Test: Pixel 3 + camera CTS
Bug: 120986771
Change-Id: Ifd6f77ef628ee200c024c7c6a05bde20937c745d
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
When a composite stream is deleted, the previously connected output
surface needs to be disconnected. Otherwise when the composite stream is
re-created with the same output surface, connect() will fail.
Test: TestingCamera2, and Camera CTS
Bug: 79465976
Bug: 109735087
Bug: 124072769
Change-Id: I254238235d306f9be8152110b1c55a7ada46424a
Session parameter changes will by default trigger internal stream
reconfiguration. If possible query Hal whether this sequence
is required for specific parameter values.
Bug: 122609098
Test: Manual using application
Change-Id: I9eaa55b0a552d9753122c16f9470779e2ed8ffec
- 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
hwservicemanager now guarantees clients will be held for ~5s before the
callback onClients(false) is called and they are allowed to exit.
Test: On walleye_svelte, manually observe camera behavior and the
lifetime of the lazy camera service process.
Change-Id: Iafbdd73f439da3a4f0fecb069e356d30aa2732b5
Add AIDL method for device-wide physical state updates (such as
folding/unfolding), and wire it up to the new camera provider HAL call.
Also clean up camera provider startup sequence - devices were being enumerated before
the new lazy HAL interface pointers were set up, resulting in many repeated calls
to getService even for a non-lazy HAL.
Also add unit test for CameraProviderManager to verify its section of
the callpath, as well as tests to check that the provider HAL and
hardware service manager aren't queried more than expected during
initialization.
Test: atest cameraservice_test
Change-Id: I5ec60fd9d93b7a2fe4d1a5854fad720a972fe8ea
Failing to add dynamic depth camera characteristics
must not have any additional side effects for the
device info constructor.
In case we encounter any issues report the failure and
try to continue with the intitialization.
Additionally fix a minor typo and remove a debug log.
Bug: 123660999
Test: Manual using application,
Camera CTS
Change-Id: I7b4e723ce3bcaf0e5d4c313ba17bca965e8964d8
We had a typo for which vector we were erase()ing from in an
error case. We fix that typo here.
Test: TreeHugger
Change-Id: Id1d38a5c1955e19415ca2e1c84a3f58763bf83c8
Move all depth photo specific processing in a separate
library and link to it dynamically.
Bug: 109735087
Test: Camera CTS
Change-Id: I00a20b26fc9a1d127ad962a36b5b554dd36f0d41
Add the necessary logic to support dynamic depth metadata.
Bug: 109735087
Test: Manual using application,
Camera CTS
Change-Id: Ic4710872dc596bc718270e1c79d4da53fb850875
Composite dynamic depth streams will be supported
in case camera devices include:
- Dense depth streams which are not exclusive.
- Jpeg/Blob output with sizes that either match depth
or are with similar aspect ratio.
Make a guesstimate regarding the dynamic depth minimum
frame and stall durations.
Bug: 109735087
Test: Manual using application,
Camera CTS
Change-Id: I8a89c7895cf57ce4408e41b1afae9c85d48c4e07
Test: Manually verified apps cannot use the camera when sensor privacy \
is enabled.
Bug: 110842805
Change-Id: Ic3fed8272e90f3f64e0f6c342569c27e1a476014
The support inclues:
- Physical camera specific stream support,
- Physical camera result metadata, and
Test: Newly added NDK CTS test pass
Test: Newly added VNDK test pass
Bug: 120566141
Bug: 115532726
Change-Id: I939b81522ca6c518c0e54ded5d3615f9973a6a65
Drop camera HAL references when unused.
Use ro.camera.enableLazyHal property to toggle behavior on or off.
* If true, the cameraserver drops references to ICameraProvider HALs
when they are not being used for either camera or torch.
* If false (or unset), stores a strong reference to each ICameraProvider
that is registered. This is the same as the old behavior.
Bug: 79374634
Test: Apply CL that lets camera HAL exit when unused. Open camera/enable
torch, close camera/disable torch, check ps -A to see if HAL exits.
Change-Id: I1842f9bf9e862ab74e4ec8aa72fc46fc47782ed0
Add new VendorTagDescriptor member to ProviderInfo, allowing it to cache
the descriptor
Test: Use torch, camera, and run cameraservice_test
Change-Id: Iba5af5dc890b3188a9e55ff5c71421aceec14cbb
In case the app doesn't provide sessionParameters, the VNDK should still
allow endConfigure() to be called to the camera service.
Test: Run test app and observe camera streams properly
Bug: 120505813
Change-Id: Ifa72dca61b8e25cd433d2c02c70b1c8e5e097228
Receive app state updates from ActivityManager and use it to implement
concurrent capture policy.
Bug: 111438757
Test: Manual test with solotester app concurrently with Camera, Duo and
Assistant
Change-Id: I979ad4ecc8b926abb64e1b321b43bd7bd442a8f1
This is to handle lazy hal, where cameraserver doesn't know HAL goes
away.
Test: Observe that the between QS Torch Tile and Camera App is correct.
Bug: 79374634
Merged-In: I2f802b1c409ba3581f0fcacfc0ac5f6059391139
Change-Id: I2f802b1c409ba3581f0fcacfc0ac5f6059391139
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>
Cached 3.5 HIDL session needs to be released
in order to destroy the session implementation
on provider side.
Test: Camera CTS
Bug: 119939541
Change-Id: I8b4c403b7bb9f3ac481e240701b5aaad505fdf2e
libmediandk brings in many unneeded dependencies which results in
an abnormal increase in vss. AImageReader_getHGBPFromHandle has been
moved to libmediautils.
Test: mm -j64
Test: showmap <pid of cameraserver> vss before change: 50628
Test: showmap <pid of cameraserver> vss after change: 31256
Change-Id: I4de95d08ae514c252a1e01f3b03e0021c821b72a
Signed-off-by: Jayant Chowdhary <jchowdhary@google.com>
using transaction id directly is not recommended
so remove permission check in onTransact() and add it into notifySystemEvent()
Bug: 119525871
Test: m -j
Change-Id: I0f2feb5204876fa9b56b9cdb096f25d2226025ec
Merged-In: I0f2feb5204876fa9b56b9cdb096f25d2226025ec
This is to handle lazy hal, where cameraserver doesn't know HAL goes
away.
Test: Observe that the between QS Torch Tile and Camera App is correct.
Bug: 79374634
Change-Id: I2f802b1c409ba3581f0fcacfc0ac5f6059391139
using transaction id directly is not recommended
so remove permission check in onTransact() and add it into notifySystemEvent()
Bug: 119525871
Test: m -j
Change-Id: I0f2feb5204876fa9b56b9cdb096f25d2226025ec
The old implementation only toggle idle when waitUnitlDrained
is explicitly called, but there are some cases where
application don't need to call waitUntilDrained but can still
expect the device goes into idle.
Test: CTS on Pixel3 equipped with webcam HAL
Bug: 109829698
Change-Id: I48c26abcc9c2f1263c2360611c935fc317745e59
Support runtime "SessionConfiguration" queries by camera
clients.
Bug: 111593096
Test: adb shell /data/nativetest64/camera_client_test/camera_client_test
--gtest_filter=CameraClientBinderTest.CheckBinderCameraDeviceUser,
Camera CTS
Change-Id: I1505e7bccdce468490b46ad4546e459354a4cda3
- Add dummy CFA pattern for monochrome camera.
- Handle monochrome camera in DngCreator.
- Fix up static and dynamic metadata tags related to monochrome camera
for older version of devices.
Test: Camera CTS
Test: Capture a DNG file and inspect with LightRoom
Bug: 70216652
Change-Id: I68d2b3d77b7f81bdc9e4129c2a8af10a4f18db3b
SignalPipelineDrain will be sent after the request
thread has stopped sending capture requests so
HAL can expect no more capture requests are sent
after they receive this call.
Test: CTS
Bug: 109829698
Change-Id: I6f75c28ff0998a8edc80f9af9ebe727c585ea6e9
mOutputStreams access used to be protected by mLock, but that has
changed due to:
- Treble interface switched from passing stream pointer to
stream index
- The buffer management API runs in HAL callback thread
Test: CTS
Bug: 109829698
Change-Id: I3561b197f46f07d2a15bb4f52b096f36c73a0407
For some resolutions input HeifWriter surfaces have much higher
acquired buffer count compared to the maximum Hal buffer for the
respective use case. From the tests so far shared streaming doesn't
seem to be affected by the imbalance and the splitter is able to
support this case.
Bug: 110161669
Test: Camera CTS
Change-Id: I129221b0f35e45c8b26f27f94910a6edda8d675b
In case HAL process crashes, addStates() should still send torch state
callback to the app if observer is registered.
Test: Kill HAL process and observe Flashlight icon in quicksettings
Test: Camera CTS
Bug: 117949686
Change-Id: Icee1891ef3993ebb0e7eed2dc281db8cd6106e84
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
The maximum acquired count of the input buffer queue during surface
sharing should be set considering the total maximum acquired count of
individual registered outputs and also the current acquired count
of the input buffer queue. The reason the two can be different is
due to the fact that individual outputs can acquire and also block
buffers from the input. The latter portion contains all buffers
which are still queued but not acquired. This can happen in case
some output acquires the maximum amount of buffers possible then
stops consuming entirely and the camera client continues to reference
it in subsequent capture requests.
To handle this, track the number of acquired buffers in the input
queue and expand (or contract) the maximum acquired count only if
possible. The maximum shouldn't change otherwise because the blocked
buffers could still be used by the unresponsive output at some
later point in time.
Bug: 117982710
Test: Camera CTS
Change-Id: Ia4e743efdf59cb0c9baaea492f78c37d0f2c95b3
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