summaryrefslogtreecommitdiff
path: root/src/android/camera_hal_manager.h
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2021-12-01 16:53:38 +0900
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-12-01 13:46:39 +0200
commit3536473e06f9abe5027b25db3b97900bf474bccf (patch)
treebb35ef7b99d7b6616e4df85ba9bfc20738351e8c /src/android/camera_hal_manager.h
parent923cf7f40a7f1875874384b30a7c8dcb1f23467a (diff)
android: Consolidate mutex classes to Mutex and MutexLocker
std::mutex and std::unique_lock are used in android directories, mixing Mutex and MutexLocker. This consolidates them to Mutex and MutexLocker. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/android/camera_hal_manager.h')
-rw-r--r--src/android/camera_hal_manager.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/android/camera_hal_manager.h b/src/android/camera_hal_manager.h
index 192f2fc5..cc310f90 100644
--- a/src/android/camera_hal_manager.h
+++ b/src/android/camera_hal_manager.h
@@ -8,7 +8,6 @@
#pragma once
#include <map>
-#include <mutex>
#include <stddef.h>
#include <tuple>
#include <vector>
@@ -18,6 +17,7 @@
#include <system/camera_metadata.h>
#include <libcamera/base/class.h>
+#include <libcamera/base/thread.h>
#include <libcamera/camera_manager.h>
@@ -44,9 +44,6 @@ public:
private:
LIBCAMERA_DISABLE_COPY_AND_MOVE(CameraHalManager)
- using Mutex = std::mutex;
- using MutexLocker = std::unique_lock<std::mutex>;
-
static constexpr unsigned int firstExternalCameraId_ = 1000;
CameraHalManager();
@@ -64,7 +61,7 @@ private:
const camera_module_callbacks_t *callbacks_;
std::vector<std::unique_ptr<CameraDevice>> cameras_;
std::map<std::string, unsigned int> cameraIdsMap_;
- Mutex mutex_;
+ libcamera::Mutex mutex_;
unsigned int numInternalCameras_;
unsigned int nextExternalCameraId_;