libcamera: pipeline: rkisp1: Export stream formats to applications

The information about stream format is available but not exported to
applications, fix this.

Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Niklas Söderlund 2020-08-07 15:54:47 +02:00
parent 8b9309d382
commit 1c57ff4729

View file

@ -582,7 +582,13 @@ CameraConfiguration *PipelineHandlerRkISP1::generateConfiguration(Camera *camera
if (roles.empty())
return config;
StreamConfiguration cfg{};
std::map<PixelFormat, std::vector<SizeRange>> streamFormats;
for (const PixelFormat &format : RKISP1_RSZ_MP_FORMATS)
streamFormats[format] =
{ { RKISP1_RSZ_MP_SRC_MIN, data->sensor_->resolution() } };
StreamFormats formats(streamFormats);
StreamConfiguration cfg(formats);
cfg.pixelFormat = formats::NV12;
cfg.size = data->sensor_->resolution();