diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/camera.h | 12 | ||||
-rw-r--r-- | include/libcamera/internal/pipeline_handler.h | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h index 5bb06584..004bc894 100644 --- a/include/libcamera/camera.h +++ b/include/libcamera/camera.h @@ -7,6 +7,7 @@ #pragma once +#include <initializer_list> #include <memory> #include <set> #include <stdint.h> @@ -105,7 +106,16 @@ public: const ControlList &properties() const; const std::set<Stream *> &streams() const; - std::unique_ptr<CameraConfiguration> generateConfiguration(const StreamRoles &roles = {}); + + std::unique_ptr<CameraConfiguration> + generateConfiguration(Span<const StreamRole> roles = {}); + + std::unique_ptr<CameraConfiguration> + generateConfiguration(std::initializer_list<StreamRole> roles) + { + return generateConfiguration(Span(roles.begin(), roles.end())); + } + int configure(CameraConfiguration *config); std::unique_ptr<Request> createRequest(uint64_t cookie = 0); diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h index 4c4dfe62..c96944f4 100644 --- a/include/libcamera/internal/pipeline_handler.h +++ b/include/libcamera/internal/pipeline_handler.h @@ -49,7 +49,7 @@ public: void release(Camera *camera); virtual std::unique_ptr<CameraConfiguration> generateConfiguration(Camera *camera, - const StreamRoles &roles) = 0; + Span<const StreamRole> roles) = 0; virtual int configure(Camera *camera, CameraConfiguration *config) = 0; virtual int exportFrameBuffers(Camera *camera, Stream *stream, |