summaryrefslogtreecommitdiff
path: root/src/android
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-04-12 22:46:38 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-07-06 19:58:36 +0300
commit2c661f360be1446b5a80ac95f3a5940d2e2d426b (patch)
treeb245a6764bf5053f808e09efe202bba61e29f2e3 /src/android
parent143b252462b9b795a1286a30349348642fcb87f5 (diff)
android: Disable copy and move for CameraHalManager
The CameraHalManager should be instantiated once only, and never copied or moved. Disable copying and moving. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Diffstat (limited to 'src/android')
-rw-r--r--src/android/camera_hal_manager.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/android/camera_hal_manager.h b/src/android/camera_hal_manager.h
index db9354a7..3f6d302a 100644
--- a/src/android/camera_hal_manager.h
+++ b/src/android/camera_hal_manager.h
@@ -17,6 +17,8 @@
#include <hardware/hardware.h>
#include <system/camera_metadata.h>
+#include <libcamera/base/class.h>
+
#include <libcamera/camera_manager.h>
#include "camera_hal_config.h"
@@ -40,6 +42,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>;