summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/camera.cpp8
-rw-r--r--src/libcamera/pipeline/imx8-isi/imx8-isi.cpp4
-rw-r--r--src/libcamera/pipeline/ipu3/ipu3.cpp4
-rw-r--r--src/libcamera/pipeline/rkisp1/rkisp1.cpp4
-rw-r--r--src/libcamera/pipeline/rpi/common/pipeline_base.cpp2
-rw-r--r--src/libcamera/pipeline/rpi/common/pipeline_base.h2
-rw-r--r--src/libcamera/pipeline/simple/simple.cpp4
-rw-r--r--src/libcamera/pipeline/uvcvideo/uvcvideo.cpp4
-rw-r--r--src/libcamera/pipeline/vimc/vimc.cpp4
-rw-r--r--src/py/libcamera/py_main.cpp5
10 files changed, 25 insertions, 16 deletions
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index 3e252f3b..0eecee76 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -937,7 +937,7 @@ const std::set<Stream *> &Camera::streams() const
* \return A CameraConfiguration if the requested roles can be satisfied, or a
* null pointer otherwise.
*/
-std::unique_ptr<CameraConfiguration> Camera::generateConfiguration(const StreamRoles &roles)
+std::unique_ptr<CameraConfiguration> Camera::generateConfiguration(Span<const StreamRole> roles)
{
Private *const d = _d();
@@ -971,6 +971,12 @@ std::unique_ptr<CameraConfiguration> Camera::generateConfiguration(const StreamR
}
/**
+ * \fn std::unique_ptr<CameraConfiguration> \
+ * Camera::generateConfiguration(std::initializer_list<StreamRole> roles)
+ * \overload
+ */
+
+/**
* \brief Configure the camera prior to capture
* \param[in] config The camera configurations to setup
*
diff --git a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp
index 449d9012..9bdfff0b 100644
--- a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp
+++ b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp
@@ -104,7 +104,7 @@ public:
bool match(DeviceEnumerator *enumerator) override;
std::unique_ptr<CameraConfiguration>
- generateConfiguration(Camera *camera, const StreamRoles &roles) override;
+ generateConfiguration(Camera *camera, Span<const StreamRole> roles) override;
int configure(Camera *camera, CameraConfiguration *config) override;
int exportFrameBuffers(Camera *camera, Stream *stream,
@@ -739,7 +739,7 @@ StreamConfiguration PipelineHandlerISI::generateRawConfiguration(Camera *camera)
std::unique_ptr<CameraConfiguration>
PipelineHandlerISI::generateConfiguration(Camera *camera,
- const StreamRoles &roles)
+ Span<const StreamRole> roles)
{
ISICameraData *data = cameraData(camera);
std::unique_ptr<ISICameraConfiguration> config =
diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 355cb0cb..a81c817a 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -135,7 +135,7 @@ public:
PipelineHandlerIPU3(CameraManager *manager);
std::unique_ptr<CameraConfiguration> generateConfiguration(Camera *camera,
- const StreamRoles &roles) override;
+ Span<const StreamRole> roles) override;
int configure(Camera *camera, CameraConfiguration *config) override;
int exportFrameBuffers(Camera *camera, Stream *stream,
@@ -390,7 +390,7 @@ PipelineHandlerIPU3::PipelineHandlerIPU3(CameraManager *manager)
}
std::unique_ptr<CameraConfiguration>
-PipelineHandlerIPU3::generateConfiguration(Camera *camera, const StreamRoles &roles)
+PipelineHandlerIPU3::generateConfiguration(Camera *camera, Span<const StreamRole> roles)
{
IPU3CameraData *data = cameraData(camera);
std::unique_ptr<IPU3CameraConfiguration> config =
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 91a3c607..6efa79f2 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -148,7 +148,7 @@ public:
PipelineHandlerRkISP1(CameraManager *manager);
std::unique_ptr<CameraConfiguration> generateConfiguration(Camera *camera,
- const StreamRoles &roles) override;
+ Span<const StreamRole> roles) override;
int configure(Camera *camera, CameraConfiguration *config) override;
int exportFrameBuffers(Camera *camera, Stream *stream,
@@ -611,7 +611,7 @@ PipelineHandlerRkISP1::PipelineHandlerRkISP1(CameraManager *manager)
std::unique_ptr<CameraConfiguration>
PipelineHandlerRkISP1::generateConfiguration(Camera *camera,
- const StreamRoles &roles)
+ Span<const StreamRole> roles)
{
RkISP1CameraData *data = cameraData(camera);
diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
index df748292..d438bdb6 100644
--- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
@@ -381,7 +381,7 @@ V4L2DeviceFormat PipelineHandlerBase::toV4L2DeviceFormat(const V4L2VideoDevice *
}
std::unique_ptr<CameraConfiguration>
-PipelineHandlerBase::generateConfiguration(Camera *camera, const StreamRoles &roles)
+PipelineHandlerBase::generateConfiguration(Camera *camera, Span<const StreamRole> roles)
{
CameraData *data = cameraData(camera);
std::unique_ptr<CameraConfiguration> config =
diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.h b/src/libcamera/pipeline/rpi/common/pipeline_base.h
index 6b19b56c..f648e810 100644
--- a/src/libcamera/pipeline/rpi/common/pipeline_base.h
+++ b/src/libcamera/pipeline/rpi/common/pipeline_base.h
@@ -214,7 +214,7 @@ public:
BayerFormat::Packing packingReq);
std::unique_ptr<CameraConfiguration>
- generateConfiguration(Camera *camera, const StreamRoles &roles) override;
+ generateConfiguration(Camera *camera, Span<const StreamRole> roles) override;
int configure(Camera *camera, CameraConfiguration *config) override;
int exportFrameBuffers(Camera *camera, libcamera::Stream *stream,
diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index 050285fd..7495587c 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -316,7 +316,7 @@ public:
SimplePipelineHandler(CameraManager *manager);
std::unique_ptr<CameraConfiguration> generateConfiguration(Camera *camera,
- const StreamRoles &roles) override;
+ Span<const StreamRole> roles) override;
int configure(Camera *camera, CameraConfiguration *config) override;
int exportFrameBuffers(Camera *camera, Stream *stream,
@@ -1044,7 +1044,7 @@ SimplePipelineHandler::SimplePipelineHandler(CameraManager *manager)
}
std::unique_ptr<CameraConfiguration>
-SimplePipelineHandler::generateConfiguration(Camera *camera, const StreamRoles &roles)
+SimplePipelineHandler::generateConfiguration(Camera *camera, Span<const StreamRole> roles)
{
SimpleCameraData *data = cameraData(camera);
std::unique_ptr<CameraConfiguration> config =
diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
index 277465b7..38f48a5d 100644
--- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
+++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp
@@ -75,7 +75,7 @@ public:
PipelineHandlerUVC(CameraManager *manager);
std::unique_ptr<CameraConfiguration> generateConfiguration(Camera *camera,
- const StreamRoles &roles) override;
+ Span<const StreamRole> roles) override;
int configure(Camera *camera, CameraConfiguration *config) override;
int exportFrameBuffers(Camera *camera, Stream *stream,
@@ -180,7 +180,7 @@ PipelineHandlerUVC::PipelineHandlerUVC(CameraManager *manager)
std::unique_ptr<CameraConfiguration>
PipelineHandlerUVC::generateConfiguration(Camera *camera,
- const StreamRoles &roles)
+ Span<const StreamRole> roles)
{
UVCCameraData *data = cameraData(camera);
std::unique_ptr<CameraConfiguration> config =
diff --git a/src/libcamera/pipeline/vimc/vimc.cpp b/src/libcamera/pipeline/vimc/vimc.cpp
index 204f5ad7..00e6f4c6 100644
--- a/src/libcamera/pipeline/vimc/vimc.cpp
+++ b/src/libcamera/pipeline/vimc/vimc.cpp
@@ -85,7 +85,7 @@ public:
PipelineHandlerVimc(CameraManager *manager);
std::unique_ptr<CameraConfiguration> generateConfiguration(Camera *camera,
- const StreamRoles &roles) override;
+ Span<const StreamRole> roles) override;
int configure(Camera *camera, CameraConfiguration *config) override;
int exportFrameBuffers(Camera *camera, Stream *stream,
@@ -191,7 +191,7 @@ PipelineHandlerVimc::PipelineHandlerVimc(CameraManager *manager)
std::unique_ptr<CameraConfiguration>
PipelineHandlerVimc::generateConfiguration(Camera *camera,
- const StreamRoles &roles)
+ Span<const StreamRole> roles)
{
VimcCameraData *data = cameraData(camera);
std::unique_ptr<CameraConfiguration> config =
diff --git a/src/py/libcamera/py_main.cpp b/src/py/libcamera/py_main.cpp
index 5a5f1a37..01fb15a9 100644
--- a/src/py/libcamera/py_main.cpp
+++ b/src/py/libcamera/py_main.cpp
@@ -208,7 +208,10 @@ PYBIND11_MODULE(_libcamera, m)
})
/* Keep the camera alive, as StreamConfiguration contains a Stream* */
- .def("generate_configuration", &Camera::generateConfiguration, py::keep_alive<0, 1>())
+ .def("generate_configuration", [](Camera &self, const std::vector<StreamRole> &roles) {
+ return self.generateConfiguration(roles);
+ }, py::keep_alive<0, 1>())
+
.def("configure", [](Camera &self, CameraConfiguration *config) {
int ret = self.configure(config);
if (ret)