OSDN Git Service

Camera2: create new streams if surface size has changed
authorMikael Persson <mikael.persson@intel.com>
Thu, 26 Nov 2015 11:34:29 +0000 (12:34 +0100)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 20 Jul 2016 09:53:21 +0000 (17:53 +0800)
commitcc3ababef81aa72cbd72fa4c3fbe1d39eed3bbed
tree3abe1b30497359807ee0ef11c5d91d83d698c1a7
parent3de279599ab2828a2a08c03da087b3faedf1f844
Camera2: create new streams if surface size has changed

When a new capture session is created, the old streams
are re-used if same surface and rotation. However, if the
surface has changed size, we must re-create the stream
to ensure HAL is configured properly, which includes
setting up proper sensor resolution.

This is an issue in e.g. CTS testNoiseReductionModes
and testEdgeModeControl, where a new preview with different
size can be setup without first stopping the previous one.
The same preview surface is used here, but with changed size.

Change-Id: I3b88a95209e83cf1cef0f4d1f791c87b0feb093f
Tracked-On: https://jira01.devtools.intel.com/browse/OAM-10333
Signed-off-by: Mikael Persson <mikael.persson@intel.com>
Reviewed-on: https://android.intel.com:443/441205
core/java/android/hardware/camera2/impl/CameraDeviceImpl.java