[libcamera-devel] [PATCH v2 06/13] libcamera: pipeline: rkisp1: Export stream formats to applications
Niklas Söderlund
niklas.soderlund at ragnatech.se
Mon Sep 14 16:21:42 CEST 2020
The information about stream format is available but not exported to
applications, fix this.
Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
---
* Changes since v1
- Fix s/applicaitons/applications/ in subject
- Cap the max resolution reported to the sensor resolution.
---
src/libcamera/pipeline/rkisp1/rkisp1.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index e3802c76003268f6..a6cb16c0638f8d85 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -587,7 +587,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();
--
2.28.0
More information about the libcamera-devel
mailing list