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>
This commit is contained in:
parent
5b64f64745
commit
f868f08c21
1 changed files with 2 additions and 2 deletions
|
@ -1211,7 +1211,7 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list)
|
||||||
stream->priv = static_cast<void *>(&streams_[i]);
|
stream->priv = static_cast<void *>(&streams_[i]);
|
||||||
|
|
||||||
/* Defer handling of MJPEG streams until all others are known. */
|
/* Defer handling of MJPEG streams until all others are known. */
|
||||||
if (format == formats::MJPEG)
|
if (stream->format == HAL_PIXEL_FORMAT_BLOB)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
StreamConfiguration streamConfiguration;
|
StreamConfiguration streamConfiguration;
|
||||||
|
@ -1228,7 +1228,7 @@ int CameraDevice::configureStreams(camera3_stream_configuration_t *stream_list)
|
||||||
camera3_stream_t *stream = stream_list->streams[i];
|
camera3_stream_t *stream = stream_list->streams[i];
|
||||||
bool match = false;
|
bool match = false;
|
||||||
|
|
||||||
if (streams_[i].format != formats::MJPEG)
|
if (stream->format != HAL_PIXEL_FORMAT_BLOB)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* Search for a compatible stream */
|
/* Search for a compatible stream */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue