diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2020-09-02 11:10:42 +0200 |
---|---|---|
committer | Jacopo Mondi <jacopo@jmondi.org> | 2020-09-18 11:31:56 +0200 |
commit | f868f08c21f6e4eadb2e61b28cb9524a0bb144ed (patch) | |
tree | 8693f849c6f1b5799275c358c566ca9a30fa3de0 /src/android/camera_device.cpp | |
parent | 5b64f647458ff721c9c3269e10ed8bf7462a4ab1 (diff) |
android: camera_device: Use Android format
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@chromium.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src/android/camera_device.cpp')
-rw-r--r-- | src/android/camera_device.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp index e2c73ff4..af290500 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 */ |