summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-08-10 16:56:51 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-10-25 09:56:00 +0100
commit42f5a750016840a0c1722d32d8975262932f12d6 (patch)
tree9e4ff5efbc71a13ec939a4cb066e29e43af4731c /src
parent1402152ad35017a817b1ead55e60ace9353efbdb (diff)
libcamera: camera: Create a CameraControlValidator
Create a Camera-specific CameraControlValidator for the Camera instance. This will allow requests to use a single validator instance without having to construct their own. Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/camera.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index 71809bcd..400a7cf0 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -19,6 +19,7 @@
#include <libcamera/stream.h>
#include "libcamera/internal/camera.h"
+#include "libcamera/internal/camera_controls.h"
#include "libcamera/internal/pipeline_handler.h"
/**
@@ -367,6 +368,12 @@ Camera::Private::~Private()
*/
/**
+ * \fn Camera::Private::validator()
+ * \brief Retrieve the control validator related to this camera
+ * \return The control validator associated with this camera
+ */
+
+/**
* \var Camera::Private::queuedRequests_
* \brief The list of queued and not yet completed requests
*
@@ -665,6 +672,7 @@ Camera::Camera(std::unique_ptr<Private> d, const std::string &id,
{
_d()->id_ = id;
_d()->streams_ = streams;
+ _d()->validator_ = std::make_unique<CameraControlValidator>(this);
}
Camera::~Camera()