summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/rpi/common/pipeline_base.h
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>2023-09-21 18:55:41 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-09-27 14:41:29 +0300
commit40d50263f553c10f2ed8b30a6d473553c8163674 (patch)
tree03b984271cdc1e5ae68e16938156520413ee87eb /src/libcamera/pipeline/rpi/common/pipeline_base.h
parentf446c23842d080bdc2e8a81fe4328762e22e39ec (diff)
libcamera: rpi: Handle SensorConfiguration
Handle the SensorConfiguration provided by the application in the pipeline validate() and configure() call chains. During validation, first make sure SensorConfiguration is valid, then handle it to compute the sensor format. For the VC4 platform where the RAW stream follows the sensor's configuration adjust the RAW stream configuration to match the sensor configuration. Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/rpi/common/pipeline_base.h')
-rw-r--r--src/libcamera/pipeline/rpi/common/pipeline_base.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h
index dbabc61e..81b2b7d2 100644
--- a/src/libcamera/pipeline/rpi/common/pipeline_base.h
+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h
@@ -42,6 +42,7 @@ namespace RPi {
/* Map of mbus codes to supported sizes reported by the sensor. */
using SensorFormats = std::map<unsigned int, std::vector<Size>>;
+class RPiCameraConfiguration;
class CameraData : public Camera::Private
{
public:
@@ -72,7 +73,8 @@ public:
V4L2VideoDevice *dev;
};
- virtual CameraConfiguration::Status platformValidate(std::vector<StreamParams> &rawStreams,
+ virtual CameraConfiguration::Status platformValidate(RPiCameraConfiguration *rpiConfig,
+ std::vector<StreamParams> &rawStreams,
std::vector<StreamParams> &outStreams) const = 0;
virtual int platformConfigure(const V4L2SubdeviceFormat &sensorFormat,
std::optional<BayerFormat::Packing> packing,