[libcamera-devel] [PATCH 1/2] android: Disable copy and move for CameraHalManager
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Jul 5 01:36:19 CEST 2021
The CameraHalManager should be instantiated once only, and never copied
or moved. Disable copying and moving.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/android/camera_hal_manager.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/android/camera_hal_manager.h b/src/android/camera_hal_manager.h
index db9354a73140..ee3fb3ad48e9 100644
--- a/src/android/camera_hal_manager.h
+++ b/src/android/camera_hal_manager.h
@@ -18,6 +18,7 @@
#include <system/camera_metadata.h>
#include <libcamera/camera_manager.h>
+#include <libcamera/class.h>
#include "camera_hal_config.h"
@@ -40,6 +41,8 @@ public:
void setCallbacks(const camera_module_callbacks_t *callbacks);
private:
+ LIBCAMERA_DISABLE_COPY_AND_MOVE(CameraHalManager)
+
using Mutex = std::mutex;
using MutexLocker = std::unique_lock<std::mutex>;
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list