[libcamera-devel,v4,1/8] libcamera: camera: Allow unspecified roles for generateConfiguration

Message ID 20200706153808.2340919-2-kieran.bingham@ideasonboard.com
State Superseded
Headers show
Series
  • android: Multi-stream support
Related show

Commit Message

Kieran Bingham July 6, 2020, 3:38 p.m. UTC
Providing an empty set of roles is permitted to generate an empty
configuration from the pipeline handlers.

Overload the generateConfiguration() function such that not specifying a
roles parameter will use an empty set, and return an empty
configuration.

Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
---
 include/libcamera/camera.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h
index 9c0e58f7864b..4d1a4a9f52ec 100644
--- a/include/libcamera/camera.h
+++ b/include/libcamera/camera.h
@@ -89,7 +89,7 @@  public:
 	const ControlList &properties();
 
 	const std::set<Stream *> &streams() const;
-	std::unique_ptr<CameraConfiguration> generateConfiguration(const StreamRoles &roles);
+	std::unique_ptr<CameraConfiguration> generateConfiguration(const StreamRoles &roles = {});
 	int configure(CameraConfiguration *config);
 
 	Request *createRequest(uint64_t cookie = 0);