summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-08-07 15:54:47 +0200
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2020-09-28 23:53:45 +0200
commit1c57ff47290d3a835c72951a78f035291ec93cb3 (patch)
treee6773182cdeefcd1a66fb9c0fd03149880810b22
parent8b9309d38208e944ff31d6c79875d91b9578cdc9 (diff)
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>
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index e52aadcf..27191b18 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -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();