diff options
Diffstat (limited to 'src/android')
-rw-r--r-- | src/android/camera_hal_manager.cpp | 9 | ||||
-rw-r--r-- | src/android/camera_hal_manager.h | 2 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/android/camera_hal_manager.cpp b/src/android/camera_hal_manager.cpp index 37ba0135..063080a0 100644 --- a/src/android/camera_hal_manager.cpp +++ b/src/android/camera_hal_manager.cpp @@ -28,6 +28,15 @@ LOG_DECLARE_CATEGORY(HAL); * their static information and to open and close camera devices. */ +CameraHalManager::~CameraHalManager() +{ + if (isRunning()) { + exit(0); + /* \todo Wait with a timeout, just in case. */ + wait(); + } +} + int CameraHalManager::init() { /* diff --git a/src/android/camera_hal_manager.h b/src/android/camera_hal_manager.h index 8228623a..502115cf 100644 --- a/src/android/camera_hal_manager.h +++ b/src/android/camera_hal_manager.h @@ -24,6 +24,8 @@ class CameraProxy; class CameraHalManager : public libcamera::Thread { public: + ~CameraHalManager(); + int init(); CameraProxy *open(unsigned int id, const hw_module_t *module); |