diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-04-12 22:46:38 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2021-07-06 19:58:36 +0300 |
commit | fe70472e9b17922ac49eec600d3ecf74e30da227 (patch) | |
tree | fd6c6c09a14081844924a89827f6ad3ed14a2c8d /src/android/camera_device.h | |
parent | 2c661f360be1446b5a80ac95f3a5940d2e2d426b (diff) |
android: Disable copy and move for CameraDevice
Instances of the CameraDevice class should never be copied or moved, as
they represent resources, Disable copying and moving for the class.
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/camera_device.h')
-rw-r--r-- | src/android/camera_device.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/android/camera_device.h b/src/android/camera_device.h index 3361918d..d085a27f 100644 --- a/src/android/camera_device.h +++ b/src/android/camera_device.h @@ -14,6 +14,7 @@ #include <hardware/camera3.h> +#include <libcamera/base/class.h> #include <libcamera/base/log.h> #include <libcamera/base/message.h> #include <libcamera/base/thread.h> @@ -66,6 +67,8 @@ protected: std::string logPrefix() const override; private: + LIBCAMERA_DISABLE_COPY_AND_MOVE(CameraDevice) + CameraDevice(unsigned int id, std::shared_ptr<libcamera::Camera> camera); struct Camera3RequestDescriptor { |