[libcamera-devel] [PATCH v4 07/10] android: camera_device: Use Android format
Jacopo Mondi
jacopo at jmondi.org
Sat Sep 12 12:11:26 CEST 2020
When iterating the camera3_stream_t received from the Android camera
framework to identify the MJPEG streams, the format check was performed
on the CameraStream created when iterating the non-MJPEG streams and not
on the format actually requested by Android. As the next patches will
remove the creation of CameraStream instances for MJPEG streams, use the
camera3_stream format to prepare for that.
Reviewed-by: Hirokazu Honda <hiroh at chromium.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
---
src/android/camera_device.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp
index e2c73ff4c4ce..af2905007b28 100644
--- a/src/android/camera_device.cpp
+++ b/src/android/camera_device.cpp
@@ -1211,7 +1211,7 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list)
stream->priv = static_cast<void *>(&streams_[i]);
/* Defer handling of MJPEG streams until all others are known. */
- if (format == formats::MJPEG)
+ if (stream->format == HAL_PIXEL_FORMAT_BLOB)
continue;
StreamConfiguration streamConfiguration;
@@ -1228,7 +1228,7 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list)
camera3_stream_t *stream = stream_list->streams[i];
bool match = false;
- if (streams_[i].format != formats::MJPEG)
+ if (stream->format != HAL_PIXEL_FORMAT_BLOB)
continue;
/* Search for a compatible stream */
--
2.28.0
More information about the libcamera-devel
mailing list