[libcamera-devel] [PATCH RFC 4/7] android: camera_device: support when no Direct stream is found
Mattijs Korpershoek
mkorpershoek at baylibre.com
Fri Sep 15 09:57:28 CEST 2023
As the comment states, it's possible that the first element in
streamConfig.streams is a Internal stream.
In that case sourceStream stays a nullptr and all the Mapped streams are
mapped towards a nullptr.
Make sure that the Mapped streams are mapped to an Internal stream in case
that's the first element.
Signed-off-by: Mattijs Korpershoek <mkorpershoek at baylibre.com>
---
src/android/camera_device.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index 1f7ce4402b63..d34bae715a47 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -724,7 +724,8 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list)
* be used when constructing the subsequent mapped
* streams.
*/
- if (stream.type == CameraStream::Type::Direct)
+ if (stream.type == CameraStream::Type::Direct ||
+ stream.type == CameraStream::Type::Internal)
sourceStream = &streams_.back();
}
}
--
2.41.0
More information about the libcamera-devel
mailing list