@@ -393,12 +393,23 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, Span<const StreamRole
V4L2VideoDevice::Formats fmts;
Size size;
std::optional<ColorSpace> colorSpace;
+ StreamDirection direction;
if (roles.empty())
return config;
- Size sensorSize = data->sensor_->resolution();
+ /*
+ * When running memory to memory, without an actual sensor, we can't ask for its size.
+ * We'll make a CameraSensorMemory, to match the raw input stream configuration in due
+ * course, but for now use a placeholder size in this case.
+ */
+ Size sensorSize = Size(640, 480);
+ if (data->sensor_)
+ sensorSize = data->sensor_->resolution();
+
for (const StreamRole role : roles) {
+ direction = StreamDirection::Output;
+
switch (role) {
case StreamRole::Raw:
size = sensorSize;
@@ -410,6 +421,15 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, Span<const StreamRole
bufferCount = 2;
break;
+ case StreamRole::RawInput:
+ size = sensorSize;
+ /* Placeholder value to prevent warnings, the application should override. */
+ pixelFormat = formats::SBGGR12;
+ colorSpace = ColorSpace::Raw;
+ bufferCount = 2;
+ direction = StreamDirection::Input;
+ break;
+
case StreamRole::StillCapture:
fmts = data->ispFormats();
pixelFormat = formats::YUV420;
@@ -495,6 +515,7 @@ PipelineHandlerBase::generateConfiguration(Camera *camera, Span<const StreamRole
cfg.pixelFormat = pixelFormat;
cfg.colorSpace = colorSpace;
cfg.bufferCount = bufferCount;
+ cfg.direction = direction;
config->addConfiguration(cfg);
}
Support the RawInput stream role, which makes a raw stream that is marked as an input (for example, for Bayer re-processing). Signed-off-by: David Plowman <david.plowman@raspberrypi.com> --- .../pipeline/rpi/common/pipeline_base.cpp | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-)